Agent SDK

Build agents, teams, and workflows using the Agno SDK.

Agno is a Python SDK for building agent platforms. It gives you three primitives (agents, teams and workflows) and a large set of capabilities you can attach to them.

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate
uv pip install -U agno openai sqlalchemy yfinance
export OPENAI_API_KEY="your_openai_api_key_here"
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.tools.workspace import Workspace

workbench = Agent(
    name="Workbench",
    model="openai:gpt-5.5",
    db=SqliteDb(db_file="workbench.db"),
    tools=[Workspace(".")],
    enable_agentic_memory=True,
    add_history_to_context=True,
    num_history_runs=3,
    markdown=True,
)

workbench.print_response("Inventory this folder.")

Primitives

PrimitiveDescription
AgentModel-driven programs with tools and instructions
TeamMultiple agents working together as a team
WorkflowOrchestration across agents, teams, and functions with linear steps, loops, branches, and parallel work

Capabilities

Model and tools

CapabilityWhat it adds
Models30+ providers behind one API
Tools100+ integrations and the ability to write your own
SkillsComposable abilities you can attach to agents and teams
MultimodalImage, audio, and video input and output
Structured I/OType-safe input and output with Pydantic schemas

Memory and context

CapabilityWhat it adds
StorageDurability and persistence with supported database backends
SessionsMulti-turn session management with summaries, history, and metrics
StateSession and agentic state agents can read and update mid-run
MemoryStore facts about each user and recall them in later conversations
KnowledgeSearch over documents, URLs, and databases
LearningAgents that improve over time with learned behavior and decisions
CompressionCompress tool call results to save context space
Context ProvidersInject live data from Calendar, Gmail, Drive, Slack, Wiki, MCP, and more

Control and safety

CapabilityWhat it adds
GuardrailsInput validation, PII detection, and prompt injection defense
HooksLifecycle hooks for input, output, and state
Human-in-the-LoopPause runs for approval, input, or external execution

Operations

CapabilityWhat it adds
Background executionContinue long-running work after the initial API request returns
EvalsMeasure accuracy, performance, and reliability; agent-as-judge
ObservabilityTracing with Langfuse, Logfire, Arize, The Context Company, and 12+ providers
SchedulerRun agents, teams, and workflows on recurring schedules

Components

Agents, teams, and workflows become runnable components once you add their models, tools, state, and configuration. Code-defined components stay in Python. Components created in Studio or through the /components API use draft and published versions, with a current version that you can promote or roll back.

Versioned components

When components are created via the API, they carry a versioned configuration. Published versions are immutable, and run requests accept a version parameter so you can pin clients to a specific version. A current pointer decides which version your production API serves: set it to a newer version to promote, or an earlier one to roll back.

Tune a component's instructions, model, or tools and publish the change as a new version. Promote the new version or roll back to an earlier version based on its results.

Learn more