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:
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)Your agent now has a FastAPI API and persistent sessions.
Run it locally
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activateInstall dependencies
uv pip install -U 'agno[os]' anthropicExport your Anthropic API key
export ANTHROPIC_API_KEY=sk-***Run your AgentOS
python agno_assist.pyYour 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 before deploying it.
Next steps
| Task | Guide |
|---|---|
| Manage and monitor the runtime | Connect Your AgentOS |
| Call agents through REST | Using the API |
| Explore every endpoint | AgentOS API reference |
| Protect the runtime | Security & Auth |