Display Mode
Direction Mode
Theme Color
Theme Cover
Version
Public API version information.
GET /api/v0/version
Public
Get API version and current version string.
Example
curl \
  -s https://ragavan.com/api/v0/version
Response
HTTP 200
{
  "version": "0.x.y",
  "api": "v0"
}
Response parameters
Schema: Version
NameTypeDescription
versionstringSemantic version of server
apistringAPI namespace (e.g., 'v0')
Authentication
Login and token management for Admin and users.
GET /api/v0/auth
Bearer
Get authenticated profile (validate token).
Example
curl \
  -s https://ragavan.com/api/v0/auth \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{
  "user": "admin",
  "type": "Admin"
}
Response parameters
Schema: AuthProfile
NameTypeDescription
userstringPrincipal name
typestring'Admin' or 'User'
Agents
Agent lifecycle and management endpoints (protected).
GET /api/v0/agents
Bearer
List agents.
Query parameters
NameTypeReqDescription
statestringnoFilter by state (e.g., init|idle|busy|slept)
Example
curl \
  -s https://ragavan.com/api/v0/agents \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
[{"name":"demo","created_by":"admin","state":"idle","description":null,"parent_agent_name":null,"created_at":"2025-01-01T12:00:00Z","last_activity_at":"2025-01-01T12:10:00Z","metadata":{},"tags":[],"is_published":false,"published_at":null,"published_by":null,"publish_permissions":{"code":true,"secrets":true,"content":true},"idle_timeout_seconds":300,"busy_timeout_seconds":900,"idle_from":"2025-01-01T12:10:00Z","busy_from":null}]
Response parameters
Schema: Agent[]
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
POST /api/v0/agents
Bearer
Create agent.
Body fields
NameTypeReqDescription
namestringyesAgent name; must match ^[A-Za-z][A-Za-z0-9-]{0,61}[A-Za-z0-9]$
descriptionstring|nullnoOptional human-readable description
metadataobjectnoArbitrary JSON metadata (default: {})
tagsstring[]noArray of tags; each tag must be alphanumeric (A-Za-z0-9), no spaces/symbols (default: [])
secretsobject<string,string>noKey/value secrets map (default: empty)
instructionsstring|nullnoOptional instructions
setupstring|nullnoOptional setup script or commands
promptstring|nullnoOptional initial prompt
idle_timeout_secondsint|nullnoIdle timeout seconds (default 300)
busy_timeout_secondsint|nullnoBusy timeout seconds (default 900)
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"demo","description":"Demo agent"}'
Response
HTTP 200
{"name":"demo","created_by":"admin","state":"init","description":"Demo agent","parent_agent_name":null,"created_at":"2025-01-01T12:00:00Z","last_activity_at":null,"metadata":{},"tags":[],"is_published":false,"published_at":null,"published_by":null,"publish_permissions":{"code":true,"secrets":true,"content":true},"idle_timeout_seconds":300,"busy_timeout_seconds":900,"idle_from":null,"busy_from":null}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
GET /api/v0/agents/{name}
Bearer
Get agent by name.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s https://ragavan.com/api/v0/agents/<name> \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"name":"demo","created_by":"admin","state":"idle","description":"Demo agent","parent_agent_name":null,"created_at":"2025-01-01T12:00:00Z","last_activity_at":"2025-01-01T12:10:00Z","metadata":{},"tags":[],"is_published":false,"published_at":null,"published_by":null,"publish_permissions":{"code":true,"secrets":true,"content":true},"idle_timeout_seconds":300,"busy_timeout_seconds":900,"idle_from":"2025-01-01T12:10:00Z","busy_from":null}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
PUT /api/v0/agents/{name}
Bearer
Update agent by name.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Body fields
NameTypeReqDescription
metadataobject|nullnoReplace metadata (omit to keep)
descriptionstring|nullnoUpdate description
tagsstring[]|nullnoReplace tags array; each tag must be alphanumeric (A-Za-z0-9), no spaces/symbols
idle_timeout_secondsint|nullnoUpdate idle timeout seconds
busy_timeout_secondsint|nullnoUpdate busy timeout seconds
Example
curl \
  -s \
  -X PUT \
  https://ragavan.com/api/v0/agents/<name> \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"description":"Updated"}'
Response
HTTP 200
{"name":"demo","created_by":"admin","state":"idle","description":"Updated","parent_agent_name":null,"created_at":"2025-01-01T12:00:00Z","last_activity_at":"2025-01-01T12:20:00Z","metadata":{},"tags":[],"is_published":false,"published_at":null,"published_by":null,"publish_permissions":{"code":true,"secrets":true,"content":true},"idle_timeout_seconds":300,"busy_timeout_seconds":900,"idle_from":"2025-01-01T12:20:00Z","busy_from":null}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
PUT /api/v0/agents/{name}/state
Bearer
Update agent state (generic).
Path parameters
NameTypeReqDescription
namestringyesAgent name
Body fields
NameTypeReqDescription
statestringyesNew state (e.g., init|idle|busy|slept)
Example
curl \
  -s \
  -X PUT \
  https://ragavan.com/api/v0/agents/<name>/state \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"state":"idle"}'
Response
HTTP 200
{"success":true,"state":"idle"}
Response parameters
Schema: StateAck
NameTypeDescription
successbooleantrue on success
statestringNew state value
POST /api/v0/agents/{name}/busy
Bearer
Set agent busy.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/busy \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"success":true,"state":"busy","timeout_status":"paused"}
Response parameters
Schema: BusyIdleAck
NameTypeDescription
successbooleantrue on success
statestring'busy' or 'idle'
timeout_statusstring'paused' (busy) or 'active' (idle)
POST /api/v0/agents/{name}/idle
Bearer
Set agent idle.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/idle \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"success":true,"state":"idle","timeout_status":"active"}
Response parameters
Schema: BusyIdleAck
NameTypeDescription
successbooleantrue on success
statestring'busy' or 'idle'
timeout_statusstring'paused' (busy) or 'active' (idle)
POST /api/v0/agents/{name}/sleep
Bearer
Put agent to sleep.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/sleep \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"name":"demo","created_by":"admin","state":"slept",...}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
POST /api/v0/agents/{name}/wake
Bearer
Wake agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Body fields
NameTypeReqDescription
promptstring|nullnoOptional prompt to send on wake
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/wake \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"get ready"}'
Response
HTTP 200
{"name":"demo","created_by":"admin","state":"init",...}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
POST /api/v0/agents/{name}/remix
Bearer
Remix agent (create a new agent from parent).
Path parameters
NameTypeReqDescription
namestringyesParent agent name
Body fields
NameTypeReqDescription
namestringyesNew agent name; must match ^[A-Za-z][A-Za-z0-9-]{0,61}[A-Za-z0-9]$
metadataobject|nullnoOptional metadata override
codebooleannoCopy code (default true)
secretsbooleannoCopy secrets (default true)
contentbooleannoCopy content (always true in v0.4.0+)
promptstring|nullnoOptional initial prompt
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/remix \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"demo-copy","code":true,"secrets":false,"prompt":"clone and adjust"}'
Response
HTTP 200
{"name":"demo-copy","created_by":"admin","state":"init",...}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
POST /api/v0/agents/{name}/publish
Bearer
Publish agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Body fields
NameTypeReqDescription
codebooleannoAllow code remix (default true)
secretsbooleannoAllow secrets remix (default true)
contentbooleannoPublish content (default true)
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/publish \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"code":true,"secrets":false,"content":true}'
Response
HTTP 200
{"name":"demo","is_published":true,"published_at":"2025-01-01T12:30:00Z",...}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
POST /api/v0/agents/{name}/unpublish
Bearer
Unpublish agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/unpublish \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"name":"demo","is_published":false,"published_at":null,...}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
DELETE /api/v0/agents/{name}
Bearer
Delete agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s \
  -X DELETE \
  https://ragavan.com/api/v0/agents/<name> \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
Response parameters
No JSON body.
Agent Responses
Composite input→output exchanges with live items (protected).
GET /api/v0/agents/{name}/responses
Bearer
List responses for agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Query parameters
NameTypeReqDescription
limitintnoMax responses (0..1000, default 100)
offsetintnoOffset for pagination (default 0)
Example
curl \
  -s https://ragavan.com/api/v0/agents/<name>/responses?limit=20 \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
[{"id":"uuid","agent_name":"demo","status":"completed","input":{"text":"hi"},"output":{"text":"hello","items":[]},"created_at":"2025-01-01T12:00:00Z","updated_at":"2025-01-01T12:00:10Z"}]
Response parameters
Schema: ResponseObject[]
NameTypeDescription
idstringResponse ID (UUID)
agent_namestringAgent name
statusstring'pending'|'processing'|'completed'|'failed'
inputobjectUser input JSON (e.g., { text: string })
outputobjectAgent output JSON (see items structure)
created_atstring (RFC3339)Creation timestamp
updated_atstring (RFC3339)Last update timestamp
POST /api/v0/agents/{name}/responses
Bearer
Create a response (user input). Supports blocking when background=false.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Body fields
NameTypeReqDescription
inputobjectyesUser input; shape: { text: string }
backgroundbooleannoDefault true. If false, request blocks up to 15 minutes until the response reaches a terminal status (completed|failed). Returns 504 on timeout. If true or omitted, returns immediately (typically status=pending).
Example
curl \
  -s \
  -X POST \
  https://ragavan.com/api/v0/agents/<name>/responses \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"input":{"text":"hello"},"background":false}'
Response
HTTP 200
{"id":"uuid","status":"completed",...}
HTTP 504
{"message":"Timed out waiting for response to complete"}
Response parameters
Schema: ResponseObject
NameTypeDescription
idstringResponse ID (UUID)
agent_namestringAgent name
statusstring'pending'|'processing'|'completed'|'failed'
inputobjectUser input JSON (e.g., { text: string })
outputobjectAgent output JSON (see items structure)
created_atstring (RFC3339)Creation timestamp
updated_atstring (RFC3339)Last update timestamp
PUT /api/v0/agents/{name}/responses/{id}
Bearer
Update a response (agent-only typical). Used to append output.items and mark status.
Path parameters
NameTypeReqDescription
namestringyesAgent name
idstringyesResponse id
Body fields
NameTypeReqDescription
status'pending'|'processing'|'completed'|'failed'noStatus update
inputobjectnoOptional input update; replaces existing input JSON
outputobjectnoOutput update; shape: { text?: string, items?: [] }
Example
curl \
  -s \
  -X PUT \
  https://ragavan.com/api/v0/agents/<name>/responses/<id> \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"status":"completed","output":{"text":"done","items":[{"type":"final","text":"done"}]}}'
Response
HTTP 200
{"id":"uuid","status":"completed",...}
Response parameters
Schema: ResponseObject
NameTypeDescription
idstringResponse ID (UUID)
agent_namestringAgent name
statusstring'pending'|'processing'|'completed'|'failed'
inputobjectUser input JSON (e.g., { text: string })
outputobjectAgent output JSON (see items structure)
created_atstring (RFC3339)Creation timestamp
updated_atstring (RFC3339)Last update timestamp
GET /api/v0/agents/{name}/responses/count
Bearer
Get response count for agent.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s https://ragavan.com/api/v0/agents/<name>/responses/count \
  -H "Authorization: Bearer <token>"
Response
HTTP 200
{"count":123,"agent_name":"demo"}
Response parameters
Schema: Count
NameTypeDescription
countintCount value
agent_namestringAgent identifier
Published Agents (Public)
Publicly visible agents and details.
GET /api/v0/published/agents
Public
List all published agents.
Example
curl \
  -s https://ragavan.com/api/v0/published/agents
Response
HTTP 200
[
  {
    "name": "demo",
    "created_by": "admin",
    "state": "idle",
    "description": "Demo agent",
    "parent_agent_name": null,
    "created_at": "2025-01-01T12:00:00Z",
    "last_activity_at": "2025-01-01T12:00:00Z",
    "metadata": {},
    "tags": ["example"],
    "is_published": true,
    "published_at": "2025-01-01T12:30:00Z",
    "published_by": "admin",
    "publish_permissions": {"code": true, "secrets": false, "content": true},
    "idle_timeout_seconds": 300,
    "busy_timeout_seconds": 900,
    "idle_from": "2025-01-01T12:10:00Z",
    "busy_from": null
  }
]
Response parameters
Schema: Agent[]
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
GET /api/v0/published/agents/{name}
Public
Get details of a published agent by name.
Path parameters
NameTypeReqDescription
namestringyesAgent name
Example
curl \
  -s https://ragavan.com/api/v0/published/agents/<name>
Response
HTTP 200
{
  "name": "demo",
  "created_by": "admin",
  "state": "idle",
  "description": "Demo agent",
  "parent_agent_name": null,
  "created_at": "2025-01-01T12:00:00Z",
  "last_activity_at": "2025-01-01T12:00:00Z",
  "metadata": {},
  "tags": ["example"],
  "is_published": true,
  "published_at": "2025-01-01T12:30:00Z",
  "published_by": "admin",
  "publish_permissions": {"code": true, "secrets": false, "content": true},
  "idle_timeout_seconds": 300,
  "busy_timeout_seconds": 900,
  "idle_from": "2025-01-01T12:10:00Z",
  "busy_from": null
}
Response parameters
Schema: Agent
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobject{ code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
Error Format
On error, endpoints return an HTTP status and a JSON body:
{
  "message": "Error description"
}
Response Object
Standard object returned by /api/v0/agents/{name}/responses endpoints.
NameTypeDescription
idstringResponse ID (UUID)
agent_namestringAgent name
statusstringOne of: pending, processing, completed, failed
inputobjectUser input JSON (typically { text: string })
outputobjectAgent output JSON with fields below
created_atstring (RFC3339)Creation timestamp (UTC)
updated_atstring (RFC3339)Last update timestamp (UTC)
output fields
NameTypeDescription
textstringFinal assistant message (may be empty while processing)
itemsarrayOrdered list of structured items (see “Items Structure”)
  • GET list is ordered by created_at ascending.
  • Update semantics: output.text replaces; output.items appends; other output keys overwrite.
  • Typical input is { text: string }, but arbitrary JSON is allowed.
Items Structure (output.items)
The output.items array captures step-by-step progress, tool usage, and final output. Items are appended in order.
The tool_result.output value may be plain text or structured JSON. The UI renders JSON objects/arrays directly and falls back to strings for text outputs.
Item types
typeShapePurpose
commentary{ type, channel: 'analysis', text }Internal thinking/analysis. Hidden in UI unless details are shown.
tool_call{ type, tool, args }Declares a tool invocation with arguments.
tool_result{ type, tool, output }Result of the preceding matching tool_call.
final{ type, channel: 'final', text }Final assistant answer (mirrors output.text).
Examples
{
  "type": "commentary",
  "channel": "analysis",
  "text": "Thinking about the approach…"
}
{
  "type": "tool_call",
  "tool": "bash",
  "args": {
    "command": "ls -la",
    "cwd": "/agent/code"
  }
}
{
  "type": "tool_result",
  "tool": "bash",
  "output": "[exit_code:0]\nREADME.md\nsrc/"
}
{
  "type": "final",
  "channel": "final",
  "text": "All set! Here are the results…"
}
Notes: Tool outputs may be truncated for size; the UI pairs each tool_call with the next tool_result having the same tool.
Common Response Schemas
Version
NameTypeDescription
versionstringSemantic version of server
apistringAPI namespace (e.g., v0)
Auth Profile
NameTypeDescription
userstringPrincipal name
typestringAdmin or User
Token Response
NameTypeDescription
tokenstringJWT token
token_typestringAlways Bearer
expires_atstring (RFC3339)Expiry timestamp
userstringPrincipal name associated with token
rolestringadmin or user
Operator Object
NameTypeDescription
userstringOperator username
descriptionstring|nullOptional description
activebooleanAccount active flag
created_atstring (RFC3339)Creation timestamp
updated_atstring (RFC3339)Last update timestamp
last_login_atstring|null (RFC3339)Last login timestamp, if any
Agent Object
NameTypeDescription
namestringAgent name (primary key)
created_bystringOwner username
statestringinit|idle|busy|slept
descriptionstring|nullOptional description
parent_agent_namestring|nullParent agent name if remixed
created_atstring (RFC3339)Creation timestamp
last_activity_atstring|null (RFC3339)Last activity timestamp
metadataobjectArbitrary JSON metadata
tagsstring[]Array of alphanumeric tags
is_publishedbooleanPublished state
published_atstring|null (RFC3339)When published
published_bystring|nullWho published
publish_permissionsobjectFlags object: { code: boolean, secrets: boolean, content: boolean }
idle_timeout_secondsintIdle timeout
busy_timeout_secondsintBusy timeout
idle_fromstring|null (RFC3339)When idle started
busy_fromstring|null (RFC3339)When busy started
Count Object
NameTypeDescription
countintCount value
agent_namestringAgent identifier the count pertains to
Agent Busy/Idle Response
NameTypeDescription
successbooleanAlways true on success
statestringbusy or idle
timeout_statusstringpaused (busy) or active (idle)
Agent State Update Response
NameTypeDescription
successbooleanAlways true on success
statestringNew state string