Skip to main content

Agents API

Create, manage, and interact with agents.
All agent endpoints that require authentication are scoped to the authenticated user’s data through row-level security. You can only access agents that belong to your account.

List agents

Returns all agents owned by the authenticated user. When no session is present, returns an empty list instead of a 401 error.

Response

Create agent

The POST /api/agents endpoint is deprecated. Use POST /api/agents/provision to create agents.

Get agent

Requires authentication and ownership of the agent.

Response

Errors

Update agent

PUT /api/agents/:id is deprecated. Use PUT /api/agents/:id/config to update agent configuration.

Delete agent

DELETE /api/agents/:id is deprecated. Use the lifecycle endpoints to manage agent state (for example, POST /api/instance/:userId/stop).

Provision agent

Provisions a new agent. Requires an active subscription unless the caller is an admin.
Provisioning requests may be processed asynchronously through the background task queue. The agent is created immediately with a provisioning status and transitions to running once the gateway confirms the deployment. If gateway provisioning fails, the status changes to error.

Request body

The agent limit is determined by the subscription plan on the authenticated user’s account (starter: 1, pro: 3, enterprise: 100). It cannot be overridden in the request body.

Admin bypass

Admin users (configured via ADMIN_EMAILS) are exempt from the following restrictions:
  • Subscription requirement — admins can provision agents without an active subscription (the 402 error is not returned).
  • Agent limit — admins receive an elevated agent slot limit instead of the plan-based cap.

Response (201 Created)

Errors

List provisioned agents

Requires session authentication.

Response

Errors

Get agent configuration

Returns the current configuration for an agent. Requires authentication and ownership.

Response

Errors

Update agent configuration

Updates the configuration for an agent. Requires authentication and ownership. The request body is forwarded to the backend.

Errors

Get agent logs

GET /api/agents/:id/logs is deprecated. This endpoint is not currently implemented and may be removed in a future release.

Get agent messages

Returns paginated messages for an agent. Requires authentication and ownership.

Query parameters

Response

Errors

Get agent stats

Returns live container metrics when available, with a mock fallback.

Response (live)

Response (mock fallback)

When the backend is unavailable, mock data is returned with "status": "mock":

Agent lifecycle

Lifecycle operations use the /api/instance/:userId endpoint pattern. These endpoints require session authentication and proxy to the backend agent management service.

Start agent

Stop agent

Restart agent

Update agent image

Triggers an image update on the backend.

Repair agent

Returns the backend response directly.

Reset agent memory

Returns the backend response directly.

Lifecycle error responses

All lifecycle endpoints return the following shape on failure:

Get instance details

Returns the current status and metadata for an agent instance.

Response

Get instance stats

Returns resource usage statistics for an agent instance.

Response

Get agent gateway token

Returns an auto-generated gateway token for the agent. A new token is created if none exists.

Errors

Agent verification

Agents can be verified using multiple verification types: eas (Ethereum Attestation Service), coinbase, ens, or webauthn.

Get verification status

Verify agent

Request body

Response

Errors

Remove verification

Provision with channel tokens

Provisions a new agent with messaging channel tokens. No authentication is required. Rate-limited per IP. At least one channel token is required. The request is proxied to the backend provisioning service. A dedicated Mux live stream is automatically created for the agent. The backend may enqueue the provisioning job to the provision queue for asynchronous processing.

Request body

The free plan value is deprecated. The provisioning service now requires a paid plan (solo, collective, label, or network) and a valid Stripe subscription. Requests with plan set to free return 402 Payment Required with code: "PAYMENT_REQUIRED".
The following request fields are deprecated and no longer accepted: whatsappPhoneNumberId, whatsappBusinessAccountId, discordGuildId, discordChannelId.

Response

The proxy returns a filtered subset of the backend response:
The /api/provision proxy returns only success, userId, subdomain, url, streamKey, and liveStreamId. Additional fields such as agentId, aiProvider, aiProviderConfig, plan, playbackUrl, hls, rtmp, status, createdAt, and metadata are available when calling the backend provisioning service directly.

Errors

Agent interaction

Unified endpoint for interacting with agents. All requests require session authentication. The userId is always bound to the authenticated session and cannot be overridden by the client.

GET actions

Pass the action query parameter to select the operation.

List endpoints

Returns available endpoints and version information when no action is specified.

Health

List sessions

Get session

Returns the full session including messages.

Memory

Returns the last 10 messages from the active session (truncated to 100 characters each).

Skills

Returns skills available on the agent instance.

Credentials

Returns which credentials are configured for the agent.

POST actions

Pass the action field in the request body.

Chat

Create session

Update skill

Set credential

Errors

Send message

Requires session authentication.

Request body

Response

Errors

List messages

Returns the message history. Requires session authentication.

Response

Errors