> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-service-account.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AgentOS

## Parameters

| Parameter                 | Type                                                        | Default              | Description                                                                                                                                                                                                                                                                                                                       |
| ------------------------- | ----------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                      | `Optional[str]`                                             | Autogenerated UUID   | AgentOS ID                                                                                                                                                                                                                                                                                                                        |
| `name`                    | `Optional[str]`                                             | `None`               | AgentOS name                                                                                                                                                                                                                                                                                                                      |
| `description`             | `Optional[str]`                                             | `None`               | AgentOS description                                                                                                                                                                                                                                                                                                               |
| `version`                 | `Optional[str]`                                             | `None`               | AgentOS version                                                                                                                                                                                                                                                                                                                   |
| `agents`                  | `Optional[List[Agent]]`                                     | `None`               | List of agents available in the AgentOS                                                                                                                                                                                                                                                                                           |
| `teams`                   | `Optional[List[Team]]`                                      | `None`               | List of teams available in the AgentOS                                                                                                                                                                                                                                                                                            |
| `workflows`               | `Optional[List[Workflow]]`                                  | `None`               | List of workflows available in the AgentOS                                                                                                                                                                                                                                                                                        |
| `db`                      | `Optional[BaseDb]`                                          | `None`               | Database to use for the AgentOS                                                                                                                                                                                                                                                                                                   |
| `checkpoint`              | `Optional[Literal["runs", "tool-batch", "tools"]]`          | `None`               | Default checkpoint level for agents in this AgentOS. Agents without their own `checkpoint` setting inherit this one. `None` means no OS-level default and each agent falls back to `"runs"`                                                                                                                                       |
| `knowledge`               | `Optional[List[Knowledge]]`                                 | `None`               | List of standalone knowledge instances available in the AgentOS                                                                                                                                                                                                                                                                   |
| `interfaces`              | `Optional[List[BaseInterface]]`                             | `None`               | List of interfaces available in the AgentOS                                                                                                                                                                                                                                                                                       |
| `a2a_interface`           | `bool`                                                      | `False`              | Whether to expose the OS agents and teams in an A2A server                                                                                                                                                                                                                                                                        |
| `authorization`           | `bool`                                                      | `False`              | Whether to enable RBAC authorization                                                                                                                                                                                                                                                                                              |
| `authorization_config`    | `Optional[AuthorizationConfig]`                             | `None`               | Configuration for JWT verification when authorization is enabled                                                                                                                                                                                                                                                                  |
| `cors_allowed_origins`    | `Optional[List[str]]`                                       | `None`               | List of allowed CORS origins (merged with default Agno domains)                                                                                                                                                                                                                                                                   |
| `config`                  | `Optional[Union[str, AgentOSConfig]]`                       | `None`               | User-provided configuration for the AgentOS. Either a path to a YAML file or an `AgentOSConfig` instance.                                                                                                                                                                                                                         |
| `settings`                | `Optional[AgnoAPISettings]`                                 | `None`               | Settings for the AgentOS API                                                                                                                                                                                                                                                                                                      |
| `base_app`                | `Optional[FastAPI]`                                         | `None`               | Custom FastAPI APP to use for the AgentOS                                                                                                                                                                                                                                                                                         |
| `lifespan`                | `Optional[Any]`                                             | `None`               | Lifespan context manager for the FastAPI app                                                                                                                                                                                                                                                                                      |
| `mcp_server`              | `Union[bool, MCPServerConfig]`                              | `False`              | Serve the OS over MCP (Model Context Protocol) at `/mcp`. Pass `True` for the default surface (all built-in tools), or an `MCPServerConfig` to register custom tools via `tools` and scope the built-in tools via `enable_builtin_tools`, `include_tags`, and `exclude_tags`                                                      |
| `mcp_auth`                | `Optional[AuthProvider]`                                    | `None`               | `AuthProvider` that owns authentication for the MCP endpoint (OAuth for connector clients like claude.ai and ChatGPT). Use `AgentOSBuiltinAuth.from_env()` from `agno.os` for the built-in authorization server, or an external provider such as WorkOS `AuthKitProvider`. Requires the MCP server to be enabled via `mcp_server` |
| `on_route_conflict`       | `Literal["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.                                                                                                                                                                                                                                              |
| `tracing`                 | `bool`                                                      | `False`              | Enable OpenTelemetry tracing for all agents and teams                                                                                                                                                                                                                                                                             |
| `auto_provision_dbs`      | `bool`                                                      | `True`               | Whether to automatically provision databases                                                                                                                                                                                                                                                                                      |
| `run_hooks_in_background` | `bool`                                                      | `False`              | Run agent/team pre/post hooks as FastAPI background tasks                                                                                                                                                                                                                                                                         |
| `telemetry`               | `bool`                                                      | `True`               | Log minimal telemetry for analytics                                                                                                                                                                                                                                                                                               |
| `registry`                | `Optional[Registry]`                                        | `None`               | Registry to use for the AgentOS                                                                                                                                                                                                                                                                                                   |
| `scheduler`               | `bool`                                                      | `False`              | Whether to enable the cron scheduler                                                                                                                                                                                                                                                                                              |
| `scheduler_poll_interval` | `int`                                                       | `15`                 | Seconds between scheduler poll cycles                                                                                                                                                                                                                                                                                             |
| `scheduler_base_url`      | `Optional[str]`                                             | `None`               | Base URL the scheduler uses for HTTP calls to the OS. Defaults to `http://127.0.0.1:7777`                                                                                                                                                                                                                                         |
| `internal_service_token`  | `Optional[str]`                                             | `None`               | Token for scheduler-to-OS authentication. Auto-generated when the scheduler is enabled and no token 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:

```python theme={null}
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:

```python theme={null}
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](/reference/agent-os/authorization-config) 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
