What is AgentOS?
AgentOS provides a complete infrastructure layer for your AI agents, including:- RESTful API endpoints for all agents, teams, and workflows
- WebSocket support for real-time streaming responses
- Authentication & authorization with JWT and RBAC
- Session management with automatic memory persistence
- Knowledge base integration with vector search
- Monitoring & observability with traces, metrics, and evaluations
- Scheduler for cron-based agent execution
- Approval workflows for human-in-the-loop operations
Key Features
FastAPI Integration
Built on FastAPI for high performance async operations with automatic OpenAPI documentation
Multi-Interface Support
Expose agents via REST API, WebSocket, Slack, A2A protocol, and custom interfaces
Production Security
JWT authentication, RBAC, CORS configuration, and audience verification out of the box
Observability
Built-in tracing, metrics collection, session tracking, and evaluation framework
Architecture
AgentOS follows a layered architecture:Core Components
AgentOS Class- Central orchestrator that manages all agents, teams, and workflows
- Handles database initialization and connection pooling
- Configures middleware, authentication, and routing
- Located at:
libs/agno/agno/os/app.py:180
/agents- Agent management and execution/teams- Team collaboration endpoints/workflows- Workflow orchestration/sessions- Session and conversation history/memory- Long-term memory management/knowledge- Knowledge base operations/schedules- Cron scheduler management/approvals- Human approval workflows
- REST API (default)
- WebSocket for streaming
- A2A (Agent-to-Agent protocol)
- Slack integration
- Custom interfaces via
BaseInterface
Basic Usage
Key Concepts
Automatic Database Discovery
AgentOS automatically discovers and initializes databases from your agents, teams, and workflows:Unified Configuration
Provide OS-level defaults that propagate to all components:Lifespan Management
AgentOS manages the complete lifecycle of your application:- Startup: Database initialization, MCP tool connections, scheduler startup
- Runtime: Request handling, connection pooling, background tasks
- Shutdown: Graceful database closure, connection cleanup, task completion
Available Endpoints
When you deploy AgentOS, you get automatic REST API endpoints:| Endpoint | Description |
|---|---|
GET /config | OS configuration and capabilities |
GET /agents | List all available agents |
POST /agents/{agent_id}/runs | Execute an agent |
GET /teams | List all teams |
POST /teams/{team_id}/runs | Execute a team |
GET /workflows | List all workflows |
POST /workflows/{workflow_id}/runs | Execute a workflow |
GET /sessions | Retrieve conversation sessions |
GET /knowledge | Access knowledge bases |
GET /traces | View execution traces |
GET /health | Health check endpoint |
Production Considerations
AgentOS is designed for production use with features like connection pooling, async database operations, graceful shutdown, and comprehensive error handling.
Performance
- Async by default: All database operations are async-first
- Connection pooling: Automatic database connection management
- Background tasks: Non-blocking hooks and evaluations
- Streaming responses: Memory-efficient SSE streaming
Scalability
- Horizontal scaling: Stateless design for multi-instance deployment
- Database sharding: Multiple database support per component
- Resource isolation: Separate databases per agent/team
Reliability
- Health checks: Built-in
/healthendpoint - Error handling: Comprehensive exception handling
- Graceful shutdown: Clean resource cleanup
- Retry logic: Automatic retry for transient failures
Next Steps
Getting Started
Build and deploy your first AgentOS application
Deployment
Learn production deployment strategies
Authentication
Secure your AgentOS with JWT and RBAC
API Reference
Complete API endpoint documentation