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

# Run AgentOS Locally

> Serve one agent through AgentOS with SQLite-backed sessions.

Run a local AgentOS with one agent and persistent session history.

Save the following code as `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

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

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

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

<Check>
  This creates a FastAPI application with one agent and SQLite-backed session storage.
</Check>

Requires [uv](https://docs.astral.sh/uv/).

## Start the Server

<Steps>
  <Step title="Create a virtual environment">
    <CodeGroup>
      ```bash macOS and Linux theme={null}
      uv venv --python 3.12
      source .venv/bin/activate
      ```

      ```powershell Windows PowerShell theme={null}
      uv venv --python 3.12
      .venv\Scripts\Activate.ps1
      ```
    </CodeGroup>
  </Step>

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

  <Step title="Set your Anthropic API key">
    <CodeGroup>
      ```bash macOS and Linux theme={null}
      export ANTHROPIC_API_KEY="sk-***"
      ```

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

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

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

| Endpoint                       | Description                                       |
| ------------------------------ | ------------------------------------------------- |
| `http://localhost:7777`        | AgentOS API information                           |
| `http://localhost:7777/health` | Runtime health check                              |
| `http://localhost:7777/docs`   | Interactive API documentation                     |
| `http://localhost:7777/config` | Runtime configuration and registered capabilities |

## Run the Agent

<CodeGroup>
  ```bash macOS and Linux theme={null}
  curl -X POST http://localhost:7777/agents/agno-assist/runs \
    -F 'message=What can you help me with?' \
    -F 'stream=false'
  ```

  ```powershell Windows PowerShell theme={null}
  curl.exe -X POST http://localhost:7777/agents/agno-assist/runs `
    -F "message=What can you help me with?" `
    -F "stream=false"
  ```
</CodeGroup>

AgentOS creates a session, runs the agent, and stores the session in `agno.db`.

## Next Steps

| Task                                  | Guide                                             |
| ------------------------------------- | ------------------------------------------------- |
| Manage the runtime in a web interface | [Connect Your AgentOS](/agent-os/connect-your-os) |
| Call agents from your application     | [Using the AgentOS API](/agent-os/using-the-api)  |
| Browse every endpoint                 | [AgentOS API reference](/reference-api/overview)  |
