Overview
Agents are autonomous AI entities that process messages, execute tools, and maintain conversation context. Each agent has its own manifest, model, tools, and session history.Spawn Agent
Create a new agent from a TOML manifest:POST /api/agents
Request Body
string
required
Agent manifest in TOML format. Maximum size: 1MB.
string
Optional Ed25519-signed manifest JSON for enhanced security.
Response
string
UUID of the newly spawned agent
string
Name of the agent from the manifest
Error Responses
List Agents
Get all active agents with enriched metadata:GET /api/agents
Get Agent
Retrieve detailed information about a specific agent:GET /api/agents/{id}
Send Message
Send a message to an agent and receive a complete response:POST /api/agents/{id}/message
Request Body
string
required
The message to send to the agent. Maximum size: 64KB.
array
Array of file attachment references from prior uploads.
Response
string
The agent’s text response (with
<think> tags stripped)integer
Total input tokens consumed across all iterations
integer
Total output tokens generated across all iterations
integer
Number of LLM turns taken (agent loop iterations)
number
Estimated cost in USD (null if unavailable)
Error Responses
Stream Message (SSE)
Send a message and receive a streaming response via Server-Sent Events:POST /api/agents/{id}/message/stream
Event Types
Get Agent Session
Retrieve the agent’s conversation history:GET /api/agents/{id}/session
Change Agent Mode
Switch the agent’s operational mode:PUT /api/agents/{id}/mode
Request Body
enum
required
Delete Agent
Terminate an agent and release its resources:DELETE /api/agents/{id}
Tool Profiles
Get available tool profiles and their included tools:GET /api/profiles
WebSocket Connection
Connect to an agent via WebSocket for real-time bidirectional communication:WebSocket connections support Bearer authentication. See Authentication for details.
Next Steps
Memory API
Store and retrieve agent memories
Workflows API
Orchestrate multi-agent pipelines