Skip to main content

List Available Agents

Get all agents available to the user. Endpoint: GET /agents Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
cURL Example
curl -X GET "https://api.circuit.org/v1/agents"    -H "Authorization: Bearer user_session_token"
Response
Returns Agents
Array<{
  id: number;
  name: string;
  description: string | null;
  createdAt: string;
  updatedAt: string;
  createdBy: {
    id: number;
    username: string;
  };
  imageUrl: string | null;
  category: string;
  shortDescription: string | null;
  allowedWalletTypes: string[];
  allowedExecutionModes: ("manual" | "auto")[];
  totalSessions: number;
  userSessions: number;
  totalRuns: number;
  totalTransactions: number;
  networks: string[];
  tokensTraded: Array<{
    network: string;
    type: string;
    address: string | null;
    tokenId: string | null;
    imageUrl: string | null;
  }>;
  tvlUsd: number;
  volumeUsd: number;
  roi7dPercent: number | null;
  roi30dPercent: number | null;
  roi1yrPercent: number | null;
  roiInceptionPercent: number | null;
}>
Empty Agents
[]

Get Agent Details

Retrieve detailed information about a specific agent. Endpoint: GET /agents/:id Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
Path ParameterDescription
idAn agent ID from GET /agents response
cURL Example
curl -X GET "https://api.circuit.org/v1/agents/1"    -H "Authorization: Bearer user_session_token"
Response
Agent Details
{
  id: number;
  name: string;
  description: string | null;
  createdAt: string;
  updatedAt: string;
  createdBy: {
    id: number;
    username: string;
  };
  imageUrl: string | null;
  shortDescription: string | null;
  allowedWalletTypes: string[];
  allowedExecutionModes: ("manual" | "auto")[];
  defaultSleepIntervalMinutes: number;
  agentVersion: string | null;
  sdkVersion: string | null;
  totalSessions: number;
  totalRuns: number;
  distinctUsers: number;
  totalTransactions: number;
  networks: string[];
  tokensTraded: Array<{
    network: string;
    type: string;
    address: string | null;
    tokenId: string | null;
    imageUrl: string | null;
  }>;
  tvlUsd: number;
  volumeUsd: number;
  roi7dPercent: number | null;
  roi30dPercent: number | null;
  roi1yrPercent: number | null;
  roiInceptionPercent: number | null;
}

Get Agent Historical Stats

This REST endpoint is not currently available. Historical stats are accessible via the tRPC API. This section is provided for reference and will be updated when the REST endpoint is enabled.
Retrieve performance statistics for an agent. Endpoint: GET /agents/:id/historical-stats Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
Path ParameterDescription
idAn agent ID from GET /agents response
Query ParameterDescription
formatTime format - “day”, “week”, “month”, “year” (defaults to “day”)
cURL Example
# Default format (day)
curl -X GET "https://api.circuit.org/v1/agents/1/historical-stats?format=week"    -H "Authorization: Bearer user_session_token"
Response
Success
{
  id: number;
  totalPeriodWeightedRoi: number | null;
  transactions: Array<{
    timestamp: string;
    count: number;
  }>;
  roi: Array<{
    timestamp: string;
    weightedAvgHourlyReturn: number | null;
  }>;
  tvl: Array<{
    timestamp: string;
    totalTvlUsd: number;
  }>;
}
Format Options
  • day: 24 hourly data points (last 24 hours)
  • week: 7 daily data points (last 7 days)
  • month: 30 daily data points (last 30 days)
  • year: 365 daily data points (last 365 days)

Start Agent Session

Begin running an agent on a specific wallet. Endpoint: POST /agents/start Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
BodyDescription
agentId: numberAn agent ID from GET /agents response
walletId: numberUser’s Wallet ID from GET /wallets response
allocations: arraySee below
mode: "auto" | "manual"Optional execution mode. Defaults to "auto" if omitted.
allocations Object Properties
PropertyTypeRequiredDescription
networkstringtrueNetwork identifier (for example, "ethereum:1" or "solana")
addressstringtrueToken contract address. For native EVM tokens use "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; for native SOL use "11111111111111111111111111111111".
tokenIdstring | nullfalseToken ID for NFTs of multi-token contracts. Use null for fungible tokens (default: null)
amountstringtrueMaximum amount to allocate in smallest unit (wei for Ethereum, lamports for Solana)
cURL Example
curl -X POST "https://api.circuit.org/v1/agents/start"    -H "Authorization: Bearer user_session_token"    -H "Content-Type: application/json"    -d '{
    "agentId": 1,
    "walletId": 456,
    "mode": "auto",
    "allocations": [
      {
        "network": "ethereum:1",
        "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "tokenId": null,
        "amount": "100000000000000"
      }
    ]
  }'
Response
Success Start
{
  sessionId: number;
}

Stop Agent Session

Stop a running agent session. Endpoint: DELETE /agents/stop/:sessionId Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
Path ParameterDescription
sessionIdSession ID from POST /agents/start response
cURL Example
curl -X DELETE "https://api.circuit.org/v1/agents/stop/789"    -H "Authorization: Bearer user_session_token"
Response
Success
{
  success: boolean;
}

Get Agent Logs

Retrieve execution logs for a specific agent session. Endpoint: GET /agents/logs/:sessionId Request
HeaderDescription
Authorization: Bearer {token}User’s session token acquired from authentication
Path ParameterDescription
sessionIdSession ID from POST /agents/start response
cURL Example
curl -X GET "https://api.circuit.org/v1/agents/logs/789"    -H "Authorization: Bearer user_session_token"
Response
Returns Logs
Array<{
  id: number;
  sessionId: number;
  type: string;
  message: string;
  createdAt: string;
}>
Empty Logs
[]