Basic AgentOS Setup
The minimal setup to serve agents as APIs.basic.py
What you get:
- REST APIs for agents, teams, and workflows
- Automatic persistence of sessions and memory
- OpenAPI/Swagger docs at
/docs - Configuration endpoint at
/config
Full-Featured AgentOS
Complete setup with knowledge, tools, and multiple agents.demo.py
Client SDK - Basic Connection
Connect to your AgentOS instance from Python.basic_client.py
Client SDK - Run Agents
Execute agents remotely via the client.run_agents.py
Client SDK - Session Management
Manage conversations and sessions.session_management.py
Session management:
- Same
session_id= continuous conversation - Each
user_idhas separate sessions - Sessions persist in the database
Client SDK - Memory Operations
Manage user memories across sessions.memory_operations.py
Client SDK - Knowledge Search
Search knowledge bases and upload content.knowledge_operations.py
Client SDK - Run Teams
Execute multi-agent teams.run_teams.py
Client SDK - Run Workflows
Execute workflows remotely.run_workflows.py
Authentication
Secure your AgentOS instance.authenticated_server.py
authenticated_client.py
Deployment
Deploy AgentOS to production.Production deployment checklist
Production deployment checklist
-
Database
- Use PostgreSQL (not SQLite)
- Configure connection pooling
- Set up backups
-
Security
- Set
OS_SECURITY_KEYenvironment variable - Use HTTPS
- Configure CORS if needed
- Set
-
Performance
- Use multiple workers (gunicorn/uvicorn)
- Configure proper timeouts
- Enable caching where appropriate
-
Monitoring
- Set up logging
- Monitor API endpoints
- Track token usage and costs
-
Infrastructure
- Use a process manager (systemd, supervisor)
- Set up health checks
- Configure auto-restart on failure
Next Steps
You’re ready for production! Explore:For more production examples, see the source code.