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

# Run Your First AgentOS

> Serve an agent through FastAPI with persistent sessions and a local REST API.

Save the following code to `agno_assist.py`:

```python agno_assist.py theme={null}
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.models.anthropic import Claude
from agno.os import AgentOS

db = SqliteDb(db_file="agno.db")

agent = Agent(
    name="Agno Assist",
    model=Claude(id="claude-sonnet-4-5"),
    db=db,
)

agent_os = AgentOS(agents=[agent], db=db)
app = agent_os.get_app()

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

<Check>
  Your agent now has a FastAPI API and persistent sessions.
</Check>

## Run it locally

<Steps>
  <Step title="Set up your virtual environment">
    <CodeGroup>
      ```bash Mac theme={null}
      uv venv --python 3.12
      source .venv/bin/activate
      ```

      ```bash Windows theme={null}
      uv venv --python 3.12
      .venv\Scripts\activate
      ```
    </CodeGroup>
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U 'agno[os]' anthropic
    ```
  </Step>

  <Step title="Export your Anthropic API key">
    <CodeGroup>
      ```bash Mac theme={null}
      export ANTHROPIC_API_KEY=sk-***
      ```

      ```powershell Windows theme={null}
      $env:ANTHROPIC_API_KEY = "sk-***"
      ```
    </CodeGroup>
  </Step>

  <Step title="Run your AgentOS">
    ```bash theme={null}
    python agno_assist.py
    ```
  </Step>
</Steps>

Your AgentOS is now running at `http://localhost:7777`.

| Endpoint                       | Description                                         |
| ------------------------------ | --------------------------------------------------- |
| `http://localhost:7777/health` | Runtime health check                                |
| `http://localhost:7777/docs`   | Interactive API documentation                       |
| `http://localhost:7777/info`   | Runtime information and registered component counts |
| `http://localhost:7777/config` | Registered components and runtime capabilities      |

Use `http://localhost:7777` as the endpoint when connecting this runtime to the Control Plane.

This local quickstart runs without authentication. Configure [Security & Auth](/agent-os/security/overview) before deploying it.

## Next steps

| Task                           | Guide                                             |
| ------------------------------ | ------------------------------------------------- |
| Manage and monitor the runtime | [Connect Your AgentOS](/agent-os/connect-your-os) |
| Call agents through REST       | [Using the API](/agent-os/using-the-api)          |
| Explore every endpoint         | [AgentOS API reference](/reference-api/overview)  |
| Protect the runtime            | [Security & Auth](/agent-os/security/overview)    |
