Skip to main content
AgentOS turns your agents into a production API. A minimal AgentOS application looks like this:
my_os.py
from agno.os import AgentOS

agent_os = AgentOS(
    name="My AgentOS",
    agents=[my_agent],
    teams=[my_team],
    workflows=[my_workflow],
    tracing=True
)

app = agent_os.get_app()

if __name__ == "__main__":
    agent_os.serve(app="my_os:app", reload=True)

Parameters

ParameterTypeDefaultDescription
namestrNoneAgentOS name
agentsList[Agent]NoneList of agents
teamsList[Team]NoneList of teams
workflowsList[Workflow]NoneList of workflows
dbBaseDbNoneDatabase to use for the AgentOS
tracingboolFalseEnable tracing to provided database
knowledgeList[Knowledge]NoneList of knowledge instances
interfacesList[BaseInterface]NoneList of interfaces (docs)
configstr or AgentOSConfigNoneConfiguration file path or config instance (docs)
base_appFastAPINoneCustom FastAPI app (docs)
lifespanAnyNoneLifespan context manager (docs)
authorizationboolFalseEnable RBAC (docs)
authorization_configAuthorizationConfigNoneJWT verification config
enable_mcp_serverboolFalseTurn AgentOS into an MCP server (docs)
cors_allowed_originsList[str]NoneAllowed CORS origins
auto_provision_dbsboolTrueAuto-provision databases
run_hooks_in_backgroundboolFalseRun hooks as background tasks
See the AgentOS class reference for complete reference.

Methods

get_app()

Returns the configured FastAPI application.

serve()

Starts the AgentOS server.
ParameterTypeDefaultDescription
appstr or FastAPIRequiredFastAPI app instance or module path
hoststrlocalhostHost to bind
portint7777Port to bind
workersintNoneNumber of workers
reloadboolFalseEnable auto-reload

resync()

Rediscover and reinitialize agents, teams, workflows, databases, and knowledge bases.

Configuration

The config parameter accepts a YAML file path or AgentOSConfig instance. Use it to set quick prompts, display names, and per-database settings.
agent_os = AgentOS(
    name="My AgentOS",
    agents=[my_agent],
    config="config.yaml",  # or AgentOSConfig(...)
)
See Configuration for full details.