Skip to main content

Parameters

ParameterTypeDefaultDescription
idOptional[str]Autogenerated UUIDAgentOS ID
nameOptional[str]NoneAgentOS name
descriptionOptional[str]NoneAgentOS description
versionOptional[str]NoneAgentOS version
agentsOptional[List[Agent]]NoneList of agents available in the AgentOS
teamsOptional[List[Team]]NoneList of teams available in the AgentOS
workflowsOptional[List[Workflow]]NoneList of workflows available in the AgentOS
dbOptional[BaseDb]NoneDatabase to use for the AgentOS
knowledgeOptional[List[Knowledge]]NoneList of standalone knowledge instances available in the AgentOS
interfacesOptional[List[BaseInterface]]NoneList of interfaces available in the AgentOS
a2a_interfaceboolFalseWhether to expose the OS agents and teams in an A2A server
authorizationboolFalseWhether to enable RBAC authorization
authorization_configOptional[AuthorizationConfig]NoneConfiguration for JWT verification when authorization is enabled
cors_allowed_originsOptional[List[str]]NoneList of allowed CORS origins (merged with default Agno domains)
configOptional[Union[str, AgentOSConfig]]NoneUser-provided configuration for the AgentOS. Either a path to a YAML file or an AgentOSConfig instance.
settingsOptional[AgnoAPISettings]NoneSettings for the AgentOS API
base_appOptional[FastAPI]NoneCustom FastAPI APP to use for the AgentOS
lifespanOptional[Any]NoneLifespan context manager for the FastAPI app
enable_mcp_serverboolFalseWhether to enable MCP (Model Context Protocol)
on_route_conflictLiteral["preserve_agentos", "preserve_base_app", "error"]"preserve_agentos"What to do when a route conflict is detected in case a custom base_app is provided.
tracingboolFalseEnable OpenTelemetry tracing for all agents and teams
dbOptional[Union[BaseDb, AsyncBaseDb]]NoneDedicated database for storing traces
auto_provision_dbsboolTrueWhether to automatically provision databases
run_hooks_in_backgroundboolFalseRun agent/team pre/post hooks as FastAPI background tasks
telemetryboolTrueLog minimal telemetry for analytics
registryOptional[str]NoneWhat to do when a route conflict is detected in case a custom base_app is provided.

Authorization

Enable RBAC by setting authorization=True and setting the JWT_VERIFICATION_KEY environment variable to the public key of the JWT verification key:
from agno.os import AgentOS
from agno.os.config import AuthorizationConfig

agent_os = AgentOS(
    id="my-agent-os",
    agents=[my_agent],
    authorization=True,
)
Or for more control, you can use the AuthorizationConfig class:
from agno.os import AgentOS
from agno.os.config import AuthorizationConfig

agent_os = AgentOS(
    id="my-agent-os",
    agents=[my_agent],
    authorization=True,
    authorization_config=AuthorizationConfig(
        verification_keys=["your-jwt-verification-key"],
        algorithm="RS256",
    ),
)
See AuthorizationConfig for configuration options.

Functions

get_app

Get the FastAPI APP configured for the AgentOS.

get_routes

Get the routes configured for the AgentOS.

serve

Run the app, effectively starting the AgentOS. Parameters:
  • app (Union[str, FastAPI]): FastAPI APP instance
  • host (str): Host to bind. Defaults to localhost
  • port (int): Port to bind. Defaults to 7777
  • workers (Optional[int]): Number of workers to use. Defaults to None
  • reload (bool): Enable auto-reload for development. Defaults to False

resync

Resync the AgentOS to discover, initialize and configure: agents, teams, workflows, databases and knowledge bases. Parameters:
  • app (FastAPI): The FastAPI app instance