Agent API

Create and manage automation agents for complex blockchain workflows.

POST/v1/agents/create

Create a new automation agent

Parameters

NameTypeRequiredDescription
typestringRequiredAgent type (transfer, swap, etc.)
configobjectRequiredAgent configuration

Example Response

{
  "success": true,
  "data": {
    "agentId": "agent_12345",
    "status": "pending",
    "createdAt": "2023-10-15T12:00:00Z"
  }
}
GET/v1/agents/{agentId}

Get agent details

Parameters

NameTypeRequiredDescription
agentIdstringRequiredAgent ID

Example Response

{
  "success": true,
  "data": {
    "agentId": "agent_12345",
    "type": "transfer",
    "status": "active",
    "config": {
      "source": "7UX2i7SucgLMQcfZ75s3VXmZZY4YRUyJN9X1RgfMoDUi",
      "destination": "2qXKEbUeNYwWUYmPRSZJKQP4DjVWvDTxjwUP1pFi4VGY",
      "amount": 1.5,
      "token": "SOL",
      "schedule": "daily"
    },
    "createdAt": "2023-10-15T12:00:00Z",
    "lastRunAt": "2023-10-16T12:00:00Z",
    "nextRunAt": "2023-10-17T12:00:00Z"
  }
}
DELETE/v1/agents/{agentId}

Delete an agent

Parameters

NameTypeRequiredDescription
agentIdstringRequiredAgent ID

Example Response

{
  "success": true,
  "data": {
    "deleted": true
  }
}
GET/v1/agents/list

List all agents

Parameters

NameTypeRequiredDescription
typestringOptionalFilter by agent type
statusstringOptionalFilter by agent status
limitnumberOptionalNumber of agents to return (default: 10, max: 100)
offsetnumberOptionalOffset for pagination

Example Response

{
  "success": true,
  "data": {
    "agents": [
      {
        "agentId": "agent_12345",
        "type": "transfer",
        "status": "active",
        "createdAt": "2023-10-15T12:00:00Z"
      },
      {
        "agentId": "agent_67890",
        "type": "swap",
        "status": "paused",
        "createdAt": "2023-10-14T10:30:00Z"
      }
    ],
    "total": 2,
    "limit": 10,
    "offset": 0
  }
}