Agent Runtime

Run agents, teams, and workflows using FastAPI.

AgentOS is the FastAPI for agents. It serves agents as an API, an MCP server, and through chat interfaces like Slack, Telegram, and WhatsApp. This local example serves an agent with session storage, tracing, scheduling, and MCP:

workbench.py
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.os import AgentOS
from agno.tools.workspace import Workspace

workbench = Agent(
    name="Workbench",
    model="openai:gpt-5.5",
    db=SqliteDb(db_file="workbench.db"),  # session storage
    tools=[Workspace(".")],               # read/write in this directory
    add_history_to_context=True,          # add past 3 runs to context
)

# Serve via AgentOS, get streaming, session isolation, API endpoints
agent_os = AgentOS(
    agents=[workbench],
    tracing=True,
    scheduler=True,
    mcp=True,
    db=SqliteDb(db_file="workbench.db"),
)
app = agent_os.get_app()

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

Install the dependencies, set OPENAI_API_KEY, save the example as workbench.py, and start it:

uv pip install -U "agno[os,mcp,openai]"
export OPENAI_API_KEY="your-api-key"
python workbench.py

Open http://localhost:7777/docs to inspect the REST API. Workspace(".") exposes local file operations and shell execution; destructive operations require human confirmation by default. Run this example in the directory you want the agent to work in.

AgentOS adds session management, background execution, tracing, evaluations, and opt-in authorization. Configure a durable worker for queued jobs that must survive process restarts.

Build agents, teams, and workflows with the Agno SDK. Run them with AgentOS. Manage and monitor them using the Control Plane.

What the runtime gives you

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

ConcernHow AgentOS handles it
HTTP APIAuto-generated endpoints for every registered agent, team, and workflow
PersistenceSessions and enabled memory features persist to your db
StreamingRun endpoints support SSE; tokens and tool calls stream when stream=true
MCP serverExpose agents, teams, workflows, and custom tools to MCP clients at /mcp
AuthSet authorization=True and configure a JWT verification key to enforce RBAC scopes
SchedulingSet scheduler=True to poll the database and fire due jobs in process
ObservabilitySet tracing=True to write OpenTelemetry traces to the AgentOS database
InterfacesSlack, Telegram, WhatsApp, A2A, AG-UI
Human in the loopPause runs for user confirmation, admin approval, or external execution

Explore