AgentOS automatically generates RESTful API endpoints for all your agents, teams, and workflows. This reference covers all available endpoints, request/response formats, and examples.
Base URL
All API endpoints are relative to your AgentOS server:
In production, replace with your actual domain:
https://api.yourdomain.com
Authentication
All endpoints (except /health) require authentication when security is enabled:
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
http://localhost:7777/agents
See the Authentication Guide for details on JWT tokens and RBAC.
Core Endpoints
Get Configuration
Retrieve the complete AgentOS configuration.
Returns OS configuration including available models, databases, agents, teams, workflows, and domain settings.
Required Scopes: system:read
curl http://localhost:7777/config
Response:
{
"id" : "my-agent-os" ,
"description" : "Production AI Assistant" ,
"available_models" : [ "gpt-4o" , "gpt-4.1" ],
"databases" : [ "9c884dc4-9066-448c-9074-ef49ec7eb73c" ],
"agents" : [
{
"id" : "research-agent" ,
"name" : "Research Agent" ,
"model" : "openai:gpt-4o"
}
],
"teams" : [
{
"id" : "research-team" ,
"name" : "Research Team"
}
],
"workflows" : [],
"session" : {
"dbs" : [
{
"db_id" : "9c884dc4-9066-448c-9074-ef49ec7eb73c" ,
"domain_config" : { "display_name" : "Sessions" }
}
]
},
"knowledge" : {
"knowledge_instances" : [
{
"id" : "agno_docs" ,
"name" : "Agno Docs" ,
"db_id" : "9c884dc4-9066-448c-9074-ef49ec7eb73c"
}
]
}
}
Health Check
Check if the AgentOS is running and healthy.
Returns health status. No authentication required.
Required Scopes: None (public endpoint)
curl http://localhost:7777/health
Response:
Agent Endpoints
List Agents
Get all available agents (filtered by user permissions).
Returns list of agents the authenticated user has access to.
Required Scopes: agents:read
curl http://localhost:7777/agents
Response:
{
"agents" : [
{
"id" : "research-agent" ,
"name" : "Research Agent" ,
"description" : "Agent for web research" ,
"model" : "openai:gpt-4o" ,
"tools" : [ "WebSearchTools" ],
"has_knowledge" : true ,
"has_memory" : true
}
]
}
Get Agent Details
Retrieve detailed information about a specific agent.
Returns complete agent configuration and capabilities.
Path Parameters:
agent_id (string, required) - The unique identifier of the agent
Required Scopes: agents:read or agents:{agent_id}:read
curl http://localhost:7777/agents/research-agent
Run Agent
Execute an agent with a message.
POST /agents/{agent_id}/runs
Creates a new agent run with the provided message and optional media.
Path Parameters:
agent_id (string, required) - The unique identifier of the agent
Form Data Parameters:
The input message or prompt for the agent
Session ID for conversation continuity. If not provided, a new session is created.
User identifier for tracking and personalization
Enable streaming responses via Server-Sent Events (SSE)
Image files to include in the request
Audio files to include in the request
Video files to include in the request
Document files to include in the request
Required Scopes: agents:run or agents:{agent_id}:run
Basic Run
With Session
With Image
Streaming
Python
curl -X POST http://localhost:7777/agents/research-agent/runs \
-F "message=What is quantum computing?"
Response:
{
"run_id" : "run_abc123" ,
"session_id" : "session_xyz789" ,
"agent_id" : "research-agent" ,
"content" : "Quantum computing is a type of computing that uses quantum-mechanical phenomena..." ,
"messages" : [
{
"role" : "user" ,
"content" : "What is quantum computing?"
},
{
"role" : "assistant" ,
"content" : "Quantum computing is..."
}
],
"metrics" : {
"time" : 2.5 ,
"input_tokens" : 12 ,
"output_tokens" : 150
},
"model" : "gpt-4o"
}
Get Agent Run
Retrieve details of a specific agent run.
GET /agents/{agent_id}/runs/{run_id}
Returns the complete run details including messages and metrics.
Path Parameters:
agent_id (string, required) - The agent identifier
run_id (string, required) - The run identifier
Required Scopes: agents:read or agents:{agent_id}:read
curl http://localhost:7777/agents/research-agent/runs/run_abc123
Team Endpoints
List Teams
Get all available teams.
Returns list of teams the authenticated user has access to.
Required Scopes: teams:read
curl http://localhost:7777/teams
Response:
{
"teams" : [
{
"id" : "research-team" ,
"name" : "Research Team" ,
"description" : "Team for collaborative research" ,
"model" : "openai:gpt-4o" ,
"members" : [
{ "id" : "researcher" , "name" : "Researcher" },
{ "id" : "analyst" , "name" : "Analyst" }
]
}
]
}
Run Team
Execute a team with a message.
POST /teams/{team_id}/runs
Creates a new team run. Team coordinates member agents to complete the task.
Path Parameters:
team_id (string, required) - The unique identifier of the team
Form Data: Same as agent runs (message, session_id, user_id, etc.)
Required Scopes: teams:run or teams:{team_id}:run
curl -X POST http://localhost:7777/teams/research-team/runs \
-F "message=Research and summarize quantum computing"
Workflow Endpoints
List Workflows
Get all available workflows.
Returns list of workflows the authenticated user has access to.
Required Scopes: workflows:read
curl http://localhost:7777/workflows
Response:
{
"workflows" : [
{
"id" : "content-workflow" ,
"name" : "Content Creation Workflow" ,
"description" : "Research and write content" ,
"steps" : [
{ "name" : "research" , "agent" : "researcher" },
{ "name" : "write" , "agent" : "writer" }
]
}
]
}
Run Workflow
Execute a workflow.
POST /workflows/{workflow_id}/runs
Creates a new workflow run. Executes all steps in sequence.
Path Parameters:
workflow_id (string, required) - The unique identifier of the workflow
Form Data: Same as agent runs (message, session_id, user_id, etc.)
Required Scopes: workflows:run or workflows:{workflow_id}:run
curl -X POST http://localhost:7777/workflows/content-workflow/runs \
-F "message=Create an article about AI"
Session Endpoints
List Sessions
Retrieve all sessions for a user or agent.
Returns list of conversation sessions.
Query Parameters:
Filter sessions by user ID
Filter sessions by agent ID
Maximum number of sessions to return
Required Scopes: sessions:read
curl "http://localhost:7777/sessions?user_id=user-123&limit=10"
Response:
{
"sessions" : [
{
"session_id" : "session_xyz789" ,
"user_id" : "user-123" ,
"agent_id" : "research-agent" ,
"created_at" : "2026-03-04T10:30:00Z" ,
"updated_at" : "2026-03-04T10:35:00Z" ,
"message_count" : 6
}
]
}
Get Session
Retrieve complete session history.
GET /sessions/{session_id}
Returns all messages and metadata for a session.
Path Parameters:
session_id (string, required) - The session identifier
Required Scopes: sessions:read
curl http://localhost:7777/sessions/session_xyz789
Response:
{
"session_id" : "session_xyz789" ,
"user_id" : "user-123" ,
"agent_id" : "research-agent" ,
"messages" : [
{
"role" : "user" ,
"content" : "What is quantum computing?" ,
"timestamp" : "2026-03-04T10:30:00Z"
},
{
"role" : "assistant" ,
"content" : "Quantum computing is..." ,
"timestamp" : "2026-03-04T10:30:05Z"
}
],
"memory" : {
"topics" : [ "quantum computing" , "technology" ],
"summary" : "User learning about quantum computing"
}
}
Delete Session
Delete a session and its history.
DELETE /sessions/{session_id}
Permanently deletes the session and all associated data.
Path Parameters:
session_id (string, required) - The session identifier
Required Scopes: sessions:delete
curl -X DELETE http://localhost:7777/sessions/session_xyz789
Knowledge Endpoints
List Knowledge Bases
Get all available knowledge bases.
Returns list of knowledge bases and their configurations.
Required Scopes: knowledge:read
curl http://localhost:7777/knowledge
Response:
{
"knowledge_instances" : [
{
"id" : "agno_docs" ,
"name" : "Agno Docs" ,
"description" : "Agno framework documentation" ,
"db_id" : "9c884dc4-9066-448c-9074-ef49ec7eb73c" ,
"table" : "agno_knowledge" ,
"document_count" : 150
}
]
}
Memory Endpoints
Get User Memory
Retrieve memory for a specific user.
Returns user memory including facts, preferences, and conversation summaries.
Query Parameters:
Required Scopes: memory:read
curl "http://localhost:7777/memory?user_id=user-123"
Metrics & Traces
Get Metrics
Retrieve execution metrics.
Returns performance metrics for agents, teams, and workflows.
Required Scopes: metrics:read
curl http://localhost:7777/metrics
Get Traces
Retrieve execution traces for debugging.
Returns OpenTelemetry traces for agent executions.
Query Parameters:
Maximum number of traces to return
Required Scopes: traces:read
curl "http://localhost:7777/traces?run_id=run_abc123"
WebSocket Endpoints
Stream Agent Responses
Connect via WebSocket for real-time streaming.
WebSocket endpoint for streaming agent responses.
Path Parameters:
agent_id (string, required) - The agent identifier
Query Parameters:
Example:
const ws = new WebSocket (
'ws://localhost:7777/ws/agents/research-agent?token=YOUR_JWT_TOKEN'
);
ws . onopen = () => {
ws . send ( JSON . stringify ({
message: 'What is quantum computing?' ,
session_id: 'session_xyz789'
}));
};
ws . onmessage = ( event ) => {
const data = JSON . parse ( event . data );
console . log ( 'Agent response:' , data . content );
};
Error Responses
All endpoints return standard HTTP status codes:
Status Code Description 200 Success 400 Bad Request - Invalid parameters 401 Unauthorized - Missing or invalid token 403 Forbidden - Insufficient permissions 404 Not Found - Resource doesn’t exist 422 Validation Error - Invalid request format 500 Internal Server Error 503 Service Unavailable - Feature not enabled
Error Response Format:
{
"detail" : "Error message describing what went wrong"
}
Examples:
// 401 Unauthorized
{
"detail" : "Invalid or expired token"
}
// 403 Forbidden
{
"detail" : "Access denied to run this agent"
}
// 404 Not Found
{
"detail" : "Agent with id 'unknown-agent' not found"
}
// 422 Validation Error
{
"detail" : [
{
"loc" : [ "body" , "message" ],
"msg" : "field required" ,
"type" : "value_error.missing"
}
]
}
Rate Limiting
AgentOS does not implement rate limiting by default. For production deployments, consider adding rate limiting via:
Nginx : Use limit_req module
API Gateway : AWS API Gateway, Kong, etc.
Application-level : FastAPI middleware like slowapi
Interactive Documentation
AgentOS automatically generates interactive API documentation:
Use these for testing endpoints and exploring the API.
Next Steps
Getting Started Build your first AgentOS application
Authentication Secure your API with JWT and RBAC