API Reference
DAEMI exposes a REST API at /api. All endpoints accept and return JSON. The API is used by the Console and is available for direct integration.
Base URL
http://<daemi-server>/api
Agents
List agents
GET /api/agents
Returns all loaded agent profiles.
{
"agents": [
{ "agent_id": "koda", "name": "Koda", "role": "Coding Agent", "type": "agent" },
{ "agent_id": "aria", "name": "Aria", "role": "Research Assistant", "type": "agent" },
{ "agent_id": "tema", "name": "Tema", "role": "Software Team", "type": "team" }
]
}
Get agent
GET /api/agents/{agent_id}
Returns the full agent profile.
Reload agents
POST /api/agents/reload
Reloads all profiles from ~/.daemi/profiles/ without restarting the server.
Sessions
Create session
POST /api/sessions
{
"agent_id": "koda"
}
{
"session_id": "ses_abc123",
"agent_id": "koda",
"created_at": "2026-03-08T21:00:00Z"
}
Send message
POST /api/sessions/{session_id}/messages
{
"content": "Help me refactor this function."
}
Returns the agent response (streaming available via SSE — see below).
Stream session response (SSE)
POST /api/sessions/{session_id}/messages/stream
Content-Type: application/json
{ "content": "Your message here" }
Accept: text/event-stream. Returns token-by-token SSE stream.
List sessions
GET /api/sessions?agent_id={agent_id}&limit=20
Delete session
DELETE /api/sessions/{session_id}
Memory
Write to LTM
POST /api/agents/{agent_id}/memory/ltm
{
"content": "User prefers TypeScript over JavaScript.",
"type": "fact"
}
Clear LTM
DELETE /api/agents/{agent_id}/memory/ltm
danger
This permanently deletes all long-term memory for the agent. There is no undo.
Workflows
List workflows
GET /api/workflows
Get workflow
GET /api/workflows/{workflow_id}
Create workflow
POST /api/workflows
{ ...workflow JSON... }
Update workflow
PUT /api/workflows/{workflow_id}
{ ...workflow JSON... }
Delete workflow
DELETE /api/workflows/{workflow_id}
Run workflow
POST /api/workflows/{workflow_id}/runs
{
"inputs": { "key": "value" }
}
Returns immediately with run_id.
Stream run output (SSE)
GET /api/workflows/{workflow_id}/runs/{run_id}/stream
Get run status
GET /api/workflows/{workflow_id}/runs/{run_id}
List run history
GET /api/workflows/{workflow_id}/runs?limit=10&sort=recent
Scheduled Jobs
List jobs
GET /api/jobs
Create job
POST /api/jobs
{
"workflow_id": "weekly_research",
"name": "Weekly Digest",
"schedule": "0 8 * * 1",
"inputs": { "topic": "AI news" }
}
Update job
PATCH /api/jobs/{job_id}
{ "schedule": "0 9 * * 1-5" }
Run job now
POST /api/jobs/{job_id}/run
Delete job
DELETE /api/jobs/{job_id}
Plugins
List plugins
GET /api/plugins
{
"plugins": [
{
"name": "email",
"status": "active",
"tools": ["email_send", "email_read", "email_search", "email_list"]
}
]
}
Get plugin config
GET /api/plugins/{name}/config
Update plugin config
PUT /api/plugins/{name}/config
{ ...plugin config JSON... }
System
Server status
GET /api/system/status
{
"status": "ok",
"version": "0.x.x",
"agents_loaded": 3,
"plugins_active": 1,
"tool_graph_nodes": 42,
"uptime_seconds": 3600
}
System config
GET /api/system/config
Update system config
PATCH /api/system/config
{ "timezone": "America/Denver", "log_level": "info" }
Error Responses
All errors follow this shape:
{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "No agent with id 'unknown'",
"status": 404
}
}
Common error codes:
| Code | Status | Description |
|---|---|---|
AGENT_NOT_FOUND | 404 | Agent ID not found |
SESSION_NOT_FOUND | 404 | Session ID not found |
WORKFLOW_NOT_FOUND | 404 | Workflow ID not found |
VALIDATION_ERROR | 422 | Input failed schema validation |
PLUGIN_CONFIG_INVALID | 400 | Plugin config is missing required fields |
LLM_PROVIDER_ERROR | 502 | Upstream LLM provider returned an error |
INTERNAL_ERROR | 500 | Unexpected server error |