Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

Shipping an agent needs more than a /run endpoint. A live agent needs an API that can:
  • Run agents in streaming mode and as background jobs
  • Manage the sessions, memory, and learnings your agents accumulate
  • Inspect runs, traces, and metrics
  • Schedule recurring work
  • Gate sensitive tool calls on human approval
  • Resume paused runs once that approval comes back
AgentOS generates all of this for your agents, teams, and workflows automatically. Browse the live API at /docs or fetch the spec from /openapi.json on any AgentOS instance.

Interfaces

Agents need to be reachable over more than one interface. Define an agent once and AgentOS can expose it over any interface you opt into. REST and SSE are on by default; add an MCP server, WebSocket endpoints, A2A, or a Slack interface as needed. The agent code stays the same; only the interface layer changes.

The surface area

GroupWhat you can do
RunsCreate, list, cancel, continue paused runs, resume disconnected streams. Stream over SSE or run as background jobs.
SessionsCreate, list, rename, update, delete. Pull every run in a session. Scoped per user.
MemoryCreate, update, delete user memories. Search content, filter by topic, view per-user stats. Run optimization to compact token usage.
KnowledgeUpload files, text, URLs, or content from S3, GCS, SharePoint, GitHub. Search via vector, keyword, or hybrid. List sources, files in a source, content status.
EvalsRun accuracy, agent-as-judge, performance, and reliability evals. List, update, delete eval runs.
TracesList, search with a filter DSL, view full span trees, group by session. Inspect individual LLM calls and tool invocations.
MetricsDaily aggregated runs, sessions, users, token usage, model breakdown. Refresh on demand.
SchedulesCRUD, enable, disable, trigger now. List historical runs of a schedule.
ApprovalsList pending approvals, resolve them, count by user.
ComponentsVersion your agents, teams, and workflows. Manage drafts, publish, roll back to a previous version.
DatabaseMigrate one or all database schemas to a target version.

How a request looks

Run endpoints accept multipart/form-data so a single call can carry text, files, and media. The response shape is the same whether it’s an agent, a team, or a workflow:
curl -X POST http://localhost:8000/agents/my-agent/runs \
  -F "message=Hello" \
  -F "user_id=alice" \
  -F "session_id=thread-42" \
  -F "stream=false"
{
  "run_id": "run_abc123",
  "session_id": "thread-42",
  "user_id": "alice",
  "agent_id": "my-agent",
  "status": "completed",
  "content": "Hi Alice!",
  "created_at": "2026-04-24T20:15:00Z"
}
Pass stream=true for Server-Sent Events. Pass background=true to run async and poll for completion.

Adding your own routes

AgentOS is built on FastAPI. Register additional routes for webhooks, custom dashboards, integrations:
# `agent` is the same Agent instance you registered with AgentOS above
app = agent_os.get_app()

@app.post("/webhooks/stripe")
async def handle_stripe(event: dict):
    response = await agent.arun(
        f"Process Stripe event: {event}",
        user_id="system",
    )
    return {"ok": True, "agent_response": response.content}
The agent is a regular Python object. Call agent.run(...) or await agent.arun(...) from anywhere.

Auth

When authorization=True, every endpoint except /health and /openapi.json requires a valid JWT in the Authorization: Bearer ... header. AgentOS validates the token, extracts claims, and applies RBAC scopes per request before any agent code runs. See Security & Auth for the details.