/v1/{resource}/{operation}. Agent endpoints live under /v1/agents/.
Get Agent Templates
Fetch the template metadata used to create or inspect agent projects. Endpoint:GET /v1/agents/templates
cURL Example
Check Start Readiness
Check whether one or more wallets have the assets needed to start an agent. Endpoint:GET /v1/agents/startReadinessBatch
Request
| Header | Description |
|---|---|
Authorization: Bearer {token} | User’s API auth token acquired from authentication |
| Query Parameter | Description |
|---|---|
agentId | Agent ID to evaluate |
walletIds | Wallet ID to evaluate. Repeat the parameter for multiple wallets. Omit entirely to evaluate all of the caller’s unarchived wallets. |
Start Agent Session
Begin running an agent on a specific wallet. Endpoint:POST /v1/agents/start
This endpoint is intended for browser clients that can derive fresh passkey PRF material for the operation. Do not store or reuse the masterKey value. The hosted session receives a server-held signing credential that does not expire while the session remains active.
This is a streaming operation: the response is an application/x-ndjson stream of progress lines (planning → executing → settling), terminated by a single result line. The client re-POSTs with the same idempotencyKey until the terminal line reports a terminal state ("done" or "failed").
Request
| Header | Description |
|---|---|
Authorization: Bearer {token} | User’s API auth token acquired from authentication |
| Body | Type | Required | Description |
|---|---|---|---|
agentId | number | true | Agent ID |
walletId | number | true | Agent wallet ID (where the agent runs and the allocation locks) from GET /v1/wallets/list |
allocationRaw | string | true | Target amount of the agent’s required asset to allocate, in raw base units (a non-negative integer string). The server derives the required asset from the agent, funds the wallet if short, and computes the final locked amount from post-funding balances. |
idempotencyKey | string | true | Client-generated UUID that collapses retried POSTs onto the same durable operation instead of starting a second session. |
sourceWalletId | number | false | Separate funding source; defaults to walletId. |
autoswapChoice | object | false | The binding source plan: { tokens: string[] } — the ordered token identities to fund from, in priority order. The server draws sources in exactly this order and swaps only these. Omit for the server default ranking. |
mode | "auto" | "manual" | false | Execution mode. Defaults to "auto". Must be in the agent’s allowedExecutionModes. |
settings | array | false | Session setting overrides: [{ key: string, value: { text } | { bool } | { number } }]. Required settings must be provided. |
masterKey | string | false | Fresh passkey-derived wallet-manager authority. Required only on the first start that provisions signing for the account; subsequent starts reuse the server-held credential. |
{ state: "working" }; on failure it returns { state: "failed", error: string }.
Get Agent Session Info
Retrieve the full detail for a running or stopped agent session you own — status, schedule, balances, ROI, and the agent it runs. Endpoint:GET /v1/agents/sessionInfoById
Request
| Header | Description |
|---|---|
Authorization: Bearer {token} | User’s API auth token acquired from authentication |
| Query Parameter | Description |
|---|---|
sessionId | Session ID returned by POST /v1/agents/start |
Stop Agent Session
Stop a running agent session. Endpoint:POST /v1/agents/unwind
This endpoint requires authorization for the session wallet (sessionWalletSign).
Request
| Header | Description |
|---|---|
Authorization: Bearer {token} | User’s API auth token acquired from authentication |
| Body | Description |
|---|---|
sessionId: number | Session ID returned by POST /v1/agents/start |