Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

A data agent that only runs in a notebook helps one analyst. Behind an API, it answers questions from a Slack channel, a BI dashboard’s natural-language box, or an “explain this metric” widget in your product. AgentOS turns the agent into that API.
from agno.agent import Agent
from agno.db.postgres import PostgresDb
from agno.models.openai import OpenAIResponses
from agno.os import AgentOS
from agno.tools.sql import SQLTools

agent = Agent(
    id="data-agent",
    model=OpenAIResponses(id="gpt-5.5"),
    db=PostgresDb(db_url="postgresql+psycopg://ai:ai@localhost:5532/ai"),
    tools=[SQLTools(db_url="postgresql+psycopg://readonly@warehouse/analytics")],
    learning=True,
)

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

if __name__ == "__main__":
    agent_os.serve(app="data_agent:app", port=7777)
Any surface calls the same endpoint:
curl -X POST http://localhost:7777/agents/data-agent/runs \
  -F 'message=MRR by plan, last 6 months' \
  -F 'user_id=ab@acme.com' \
  -F 'session_id=q4-review' \
  -F 'stream=false'

Surfaces a data agent lives on

SurfaceShape
Slack channelAn interface maps a thread to a session; the team asks in plain English
Dashboard NL boxA widget posts the question and renders the answer plus its SQL
Scheduled digestA cron job runs the agent and posts “yesterday’s numbers” every morning
Backend checkA pipeline calls the agent to sanity-check a metric before publishing
The serving model is identical to a product agent. The difference is what the agent does, not how it is served. Sessions still scope per user, so each analyst’s thread and learnings stay separate.

Learnings are shared, sessions are not

A data agent’s value compounds when corrections are shared across the team. Scope conversation threads per user with session_id, but keep learnings in a shared namespace so a fix one analyst’s question triggered helps everyone.
StateScope
Conversation threadPer user_id and session_id
Learnings about the warehouseShared namespace across users

Next steps

TaskGuide
Add Slack or a browser surfaceInterfaces
Lock down the endpointsSecurity and auth

Developer Resources