Icon

Test Mode

Jupiter AI Documentation

Comprehensive guide to building and deploying AI agents on Solana

Overview

Jupiter AI is a framework for creating and deploying autonomous AI agents on the Solana blockchain. It leverages state compression for efficient on-chain storage and provides a secure runtime environment for AI-powered decision making.

AI-Powered Agents

Deploy intelligent agents that can autonomously interact with Solana's ecosystem

Secure Runtime

Sandboxed execution environment with configurable permissions

State Compression

Efficient on-chain storage using Solana's state compression

Developer Tools

Comprehensive SDK and CLI tools for agent development

Getting Started

Check out our GitHub repository for detailed installation instructions, quick start guides, and comprehensive examples to help you get started with Jupiter AI.

Core Concepts

Agent Architecture

Jupiter AI agents are autonomous programs that run in a secure sandbox environment on Solana. Each agent consists of:

  • Executable bytecode (agent logic)
  • State storage (compressed on-chain)
  • Configuration parameters
  • Permission settings

State Compression

Jupiter AISPL uses Solana's state compression to efficiently store agent data on-chain:

  • Up to 10,000x reduction in storage costs
  • Concurrent merkle trees for efficient updates
  • Verifiable state transitions
  • Optimized for frequent updates

Code Examples

Creating an Agent

typescript
import { Connection, Keypair } from '@solana/web3.js'; import { AgentSPL, AgentConfig } from '@agentspl/sdk'; async function createAgent() { const connection = new Connection('https://api.devnet.solana.com'); const wallet = Keypair.generate(); const config: AgentConfig = { name: "Trading Agent", capabilities: ["READ_STATE", "EXECUTE_TX"], memory: 1024 * 1024, // 1MB maxCycles: 1000000, }; const agent = await AgentSPL.create( connection, wallet, config ); return agent; }

State Management

typescript
import { StateManager } from '@agentspl/sdk'; // Define agent state interface interface AgentState { balance: number; lastUpdate: number; strategy: { minProfit: number; maxSlippage: number; }; } // Initialize state manager const stateManager = new StateManager<AgentState>({ merkleDepth: 14, maxBufferSize: 64, canopyDepth: 11 }); // Update state await stateManager.update({ balance: 100, lastUpdate: Date.now(), strategy: { minProfit: 0.02, maxSlippage: 0.01 } });

Agent Execution

typescript
import { ExecutionContext } from '@agentspl/sdk'; // Create execution context const context = new ExecutionContext({ agent, stateManager, connection }); // Start agent execution await context.start(); // Execute specific strategy await context.execute('arbitrage', { markets: ['raydium', 'orca'], tokenPair: ['SOL', 'USDC'] }); // Monitor agent status context.on('status', (status) => { console.log('Agent status:', status); });