Create Agent
Create an autonomous or supervised agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"name": "Trading Bot Alpha",
"walletId": "550e8400-e29b-41d4-a716-446655440000",
"executionMode": "autonomous",
"allowedIntents": ["transfer_sol", "swap", "query_balance"],
"budgetLamports": 100000000
}' \
http://localhost:3000/api/v1/agents
Request Body
Agent name (1-128 characters)
Wallet UUID for this agent (auto-created if omitted)
allowedIntents
array
default:"[transfer_sol, transfer_spl, query_balance]"
Array of allowed transaction types
Autonomous execution configuration (see Autonomy Config)
Response
stopped, running, or paused
Array of allowed transaction types
Autonomy Configuration
For autonomous agents, configure decision rules and scheduled steps:
{
"name": "Autonomous Trader",
"executionMode": "autonomous",
"autonomy": {
"enabled": true,
"mode": "execute",
"cadenceSeconds": 30,
"maxActionsPerHour": 60,
"steps": [
{
"id": "periodic-balance-check",
"type": "query_balance",
"protocol": "system-program",
"intent": {},
"cooldownSeconds": 60,
"maxRuns": 100
}
],
"rules": [
{
"id": "low-balance-alert",
"when": [
{"metric": "balance_lamports", "op": "lt", "value": 1000000}
],
"then": {
"type": "query_balance",
"protocol": "system-program",
"intent": {}
},
"cooldownSeconds": 300
}
]
}
}
Enable autonomous execution
execute (real) or paper (simulation)
Heartbeat interval (1-86400)
Maximum actions per hour (1-3600)
Array of scheduled execution steps
Array of condition-based decision rules
List Agents
List all agents.
curl -H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents
Get Agent
Retrieve agent details.
curl -H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000
Path Parameters
Update Agent Capabilities
Update agent’s allowed intents and execution mode.
curl -X PUT \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"allowedIntents": ["transfer_sol", "swap", "stake", "query_balance"],
"executionMode": "supervised",
"budgetLamports": 200000000
}' \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/capabilities
Path Parameters
Request Body
Updated array of allowed transaction types
Updated autonomy configuration
Start Agent
Start a stopped agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/start
Path Parameters
Stop Agent
Stop a running agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/stop
Path Parameters
Pause Agent
Pause a running agent with optional reason.
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{"reason": "Manual review required"}' \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/pause
Path Parameters
Request Body
Resume Agent
Resume a paused agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/resume
Path Parameters
Get Agent Budget
Retrieve agent budget and spending information.
curl -H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/budget
Path Parameters
Response
Amount spent in current 24-hour period
{
"status": "success",
"data": {
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"walletId": "550e8400-e29b-41d4-a716-446655440000",
"budgetLamports": 100000000,
"spentLamportsToday": 5000000,
"updatedAt": "2026-03-08T12:00:00.000Z"
}
}
Get Autonomy State
Retrieve current autonomous execution state.
curl -H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/autonomy/state
Path Parameters
Issue Capability Manifest
Issue a signed capability manifest for an agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"allowedIntents": ["transfer_sol", "swap"],
"allowedProtocols": ["system-program", "jupiter"],
"ttlSeconds": 3600
}' \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/manifest/issue
Path Parameters
Request Body
Array of transaction types the manifest allows
Array of protocols the manifest allows
Manifest validity duration in seconds (max: 2,592,000 / 30 days)
Response
Manifest issuer identifier
Allowed transaction types
Verify Capability Manifest
Verify a capability manifest signature and validity.
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"manifest": {
"issuer": "agentic-wallet-runtime",
"version": "1.0.0",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"allowedIntents": ["transfer_sol"],
"allowedProtocols": ["system-program"],
"issuedAt": "2026-03-08T12:00:00.000Z",
"expiresAt": "2026-03-08T13:00:00.000Z",
"nonce": "abc123def456",
"signature": "sig..."
}
}' \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/manifest/verify
Path Parameters
Request Body
Complete capability manifest object
Response
{
"status": "success",
"data": {
"valid": true,
"reason": "Manifest is valid and not expired"
}
}
Execute Agent Intent
Execute a transaction intent on behalf of an agent.
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"type": "transfer_sol",
"protocol": "system-program",
"intent": {
"destination": "7xKLvUhXW9XqHZzN3Jw8wVHGK6R4tN2gqV9mP3kL5eXy",
"lamports": 1000000
},
"gasless": false
}' \
http://localhost:3000/api/v1/agents/123e4567-e89b-12d3-a456-426614174000/execute
Path Parameters
Request Body
Transaction type (must be in agent’s allowedIntents)
Protocol-specific intent payload
Use gasless submission if supported
Response
Returns a transaction object (same as POST /api/v1/transactions).
This endpoint enforces agent capabilities, budget limits, and policy rules.
Agent Execution Modes
Autonomous ModeAgent executes based on configured rules and steps without manual intervention.Features:
- Scheduled steps with cooldown periods
- Conditional decision rules
- Rate limiting (maxActionsPerHour)
- Budget enforcement
- Policy evaluation
- Execute or paper mode
Use Cases:
- Automated trading bots
- Rebalancing agents
- Liquidity providers
- Monitoring agents
Supervised ModeAgent requires explicit execution calls via the API.Features:
- Manual intent execution
- Policy evaluation
- Budget enforcement
- Capability restrictions
Use Cases:
- User-controlled agents
- Multi-approval workflows
- High-value operations
- Testing and development
Treasury Operations
See Treasury API for agent budget allocation and rebalancing.
Strategy Operations
Backtest and paper trading for agents:
Backtest Strategy
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"walletId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Test Strategy",
"minimumPassRate": 0.7,
"steps": [
{
"type": "query_balance",
"protocol": "system-program",
"intent": {},
"timestamp": "2026-03-08T12:00:00.000Z"
}
]
}' \
http://localhost:3000/api/v1/strategy/backtest
Execute Paper Trade
curl -X POST \
-H "x-api-key: dev-api-key" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"walletId": "550e8400-e29b-41d4-a716-446655440000",
"type": "swap",
"protocol": "jupiter",
"intent": {
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000",
"slippageBps": 50
}
}' \
http://localhost:3000/api/v1/strategy/paper/execute
List Paper Trades
curl -H "x-api-key: dev-api-key" \
http://localhost:3000/api/v1/strategy/paper/123e4567-e89b-12d3-a456-426614174000