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

# Agent Runtime

> Run your agents as a secure, stateless service.

We build our agents, teams, and workflows with the Agno SDK and take them live using AgentOS. What does it mean to take an agent live? We should be able to:

1. Run the agent on demand, via an API request, or via interfaces like Slack, Telegram, and others.
2. Maintain long-running sessions that last from minutes to days to weeks.
3. Be durable across restarts, replicas, and infrastructure failures.
4. Be secure against unauthenticated access.
5. Monitor every run and action taken.

Agno's agent runtime, AgentOS, takes agents, teams, and workflows built with the Agno SDK or any other framework and runs them as a secure, scalable service.

Here's the smallest possible AgentOS example:

```python theme={null}
from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS

db = PostgresDb(db_url="postgresql://user:pass@host:5432/agno")

agent = Agent(model=OpenAIResponses(id="gpt-5.5"), db=db)

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

if __name__ == "__main__":
    agent_os.serve(app="my_app:app", reload=False)
```

This script starts a FastAPI application that you can scale horizontally. Persistent sessions, streaming, JWT auth, tracing, and a scheduler, all come built-in.

## What the runtime gives you

The runtime covers the ground between your agent code and a production service:

| Concern           | How AgentOS handles it                                                  |
| ----------------- | ----------------------------------------------------------------------- |
| HTTP API          | Auto-generated endpoints for every registered agent, team, and workflow |
| Persistence       | Sessions and memory persisted to your `db`                              |
| Streaming         | SSE on every run endpoint; tokens and tool calls stream as they happen  |
| Auth              | JWT validation with RBAC scopes built-in                                |
| Scheduling        | In-process cron that polls the database and fires due jobs              |
| Observability     | OpenTelemetry tracing into the same `db`, queryable with SQL            |
| Interfaces        | Slack, Telegram, WhatsApp, A2A, AG-UI                                   |
| Human in the loop | Pause runs for user confirmation, admin approval, or external execution |

<Tip>
  AgentOS can also serve agents built with the Claude Agent SDK, LangGraph, and DSPy.

  See [Multi-framework support](/agent-os/multi-framework/overview).
</Tip>

## Explore

<CardGroup cols={2}>
  <Card title="Agent API" icon="server" href="/features/api">
    Run your agent platform as an API.
  </Card>

  <Card title="Agent Storage" icon="database" href="/features/storage">
    Add durability and persistence.
  </Card>

  <Card title="Observability" icon="chart-line" href="/features/observability">
    Tracing, run history, and audit logs in your own database.
  </Card>

  <Card title="Security and Auth" icon="shield-halved" href="/features/security-and-auth">
    JWT validation, RBAC scopes, and per-request isolation.
  </Card>

  <Card title="Scheduling" icon="clock" href="/features/scheduling">
    In-process cron and multi-step workflows.
  </Card>
</CardGroup>
