> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The production runtime and control plane for your agentic systems.

AgentOS transforms your agents into a production-ready API.

A minimal application looks like this:

```python my_os.py theme={null}
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

| Parameter                 | Type                     | Default | Description                                                    |
| ------------------------- | ------------------------ | ------- | -------------------------------------------------------------- |
| `name`                    | `str`                    | `None`  | AgentOS name                                                   |
| `agents`                  | `List[Agent]`            | `None`  | Agents to include                                              |
| `teams`                   | `List[Team]`             | `None`  | Teams to include                                               |
| `workflows`               | `List[Workflow]`         | `None`  | Workflows to include                                           |
| `db`                      | `BaseDb`                 | `None`  | Database used for the AgentOS                                  |
| `tracing`                 | `bool`                   | `False` | Enable tracing to AgentOS `db`                                 |
| `knowledge`               | `List[Knowledge]`        | `None`  | Knowledge bases                                                |
| `interfaces`              | `List[BaseInterface]`    | `None`  | Agent interfaces ([docs](/agent-os/interfaces/overview))       |
| `config`                  | `str` or `AgentOSConfig` | `None`  | Configuration path or object ([docs](/agent-os/config))        |
| `base_app`                | `FastAPI`                | `None`  | Custom FastAPI app ([docs](/agent-os/custom-fastapi/overview)) |
| `lifespan`                | `Any`                    | `None`  | Lifespan context manager ([docs](/agent-os/lifespan))          |
| `authorization`           | `bool`                   | `False` | Enable RBAC ([docs](/agent-os/security/rbac))                  |
| `authorization_config`    | `AuthorizationConfig`    | `None`  | JWT verification config                                        |
| `enable_mcp_server`       | `bool`                   | `False` | Enable MCP server ([docs](/agent-os/mcp/mcp))                  |
| `cors_allowed_origins`    | `List[str]`              | `None`  | Allowed CORS origins                                           |
| `auto_provision_dbs`      | `bool`                   | `True`  | Auto-provision databases                                       |
| `run_hooks_in_background` | `bool`                   | `False` | Run hooks in background                                        |

See [AgentOS class reference](/reference/agent-os/agent-os) for details.

## Methods

### `get_app()`

Returns the configured FastAPI application.

### `serve()`

Starts the AgentOS server.

| Parameter | Type               | Default     | Description                         |
| --------- | ------------------ | ----------- | ----------------------------------- |
| `app`     | `str` or `FastAPI` | Required    | FastAPI app instance or module path |
| `host`    | `str`              | `localhost` | Host to bind                        |
| `port`    | `int`              | `7777`      | Port to bind                        |
| `workers` | `int`              | `None`      | Number of workers                   |
| `reload`  | `bool`             | `False`     | Enable auto-reload                  |

#### Environment variable fallbacks

When `host` or `port` are not passed explicitly, `serve()` reads from environment variables before using defaults.

| Environment Variable | Fallback For | Default     |
| -------------------- | ------------ | ----------- |
| `AGENT_OS_HOST`      | `host`       | `localhost` |
| `AGENT_OS_PORT`      | `port`       | `7777`      |

Precedence: explicit argument > environment variable > default value.

This is useful for containerized deployments where host and port are configured externally:

```bash theme={null}
# In your Dockerfile or orchestrator config
ENV AGENT_OS_HOST=0.0.0.0
ENV AGENT_OS_PORT=8000
```

```python my_os.py theme={null}
# No host/port needed. serve() reads from AGENT_OS_HOST and AGENT_OS_PORT.
if __name__ == "__main__":
    agent_os.serve(app="my_os:app", reload=True)
```

### `resync()`

Reloads agents, teams, workflows, and resources.

## Configuration

The `config` parameter accepts a YAML path or `AgentOSConfig` object. Use it to configure prompts, display names, and database settings.

```python theme={null}
agent_os = AgentOS(
    name="My AgentOS",
    agents=[my_agent],
    config="config.yaml",  # or AgentOSConfig(...)
)
```

See [Configuration](/agent-os/config) for details.
