Skip to main content

Agno: a lightweight library for building Multi-Agent Systems

Project description

What is Agno?

Agno is a full-stack framework for building Multi-Agent Systems with memory, knowledge and reasoning.

Use Agno to build the 5 levels of Agentic Systems:

  • Level 1: Agents with tools and instructions.
  • Level 2: Agents with knowledge and storage.
  • Level 3: Agents with memory and reasoning.
  • Level 4: Agent Teams that can reason and collaborate.
  • Level 5: Agentic Workflows with state and determinism.

Example: Level 1 Reasoning Agent that uses the YFinance API to answer questions:

from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.reasoning import ReasoningTools
from agno.tools.yfinance import YFinanceTools

reasoning_agent = Agent(
    model=Claude(id="claude-sonnet-4-20250514"),
    tools=[
        ReasoningTools(add_instructions=True),
        YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True),
    ],
    instructions="Use tables to display data.",
    markdown=True,
)

https://github.com/user-attachments/assets/4ef27ba6-a781-4fb0-b49c-bfd838123c83

Get Started

If you're new to Agno, read the documentation to build your first Agent, chat with it on the playground and monitor it on agno.com.

After that, checkout the Examples Gallery and build real-world applications with Agno.

Why Agno?

Agno will help you build best-in-class, highly-performant agentic systems, saving you hours of research and boilerplate. Here are some key features that set Agno apart:

  • Model Agnostic: Agno provides a unified interface to 23+ model providers, no lock-in.
  • Highly performant: Agents instantiate in ~3μs and use ~6.5Kib memory on average.
  • Reasoning is a first class citizen: Reasoning improves reliability and is a must-have for complex autonomous agents. Agno supports 3 approaches to reasoning: Reasoning Models, ReasoningTools or our custom chain-of-thought approach.
  • Natively Multi-Modal: Agno Agents are natively multi-modal, they accept text, image, audio and video as input and generate text, image, audio and video as output.
  • Advanced Multi-Agent Architecture: Agno provides an industry leading multi-agent architecture (Agent Teams) with reasoning, memory, and shared context.
  • Built-in Agentic Search: Agents can search for information at runtime using 20+ vector databases. Agno provides state-of-the-art Agentic RAG, fully async and highly performant.
  • Built-in Memory & Session Storage: Agents come with built-in Storage & Memory drivers that give your Agents long-term memory and session storage.
  • Structured Outputs: Agno Agents can return fully-typed responses using model provided structured outputs or json_mode.
  • Pre-built FastAPI Routes: After building your Agents, serve them using pre-built FastAPI routes. 0 to production in minutes.
  • Monitoring: Monitor agent sessions and performance in real-time on agno.com.

Installation

pip install -U agno

Example - Reasoning Agent

Let's build a Reasoning Agent to get a sense of Agno's capabilities.

Save this code to a file: reasoning_agent.py.

from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.tools.reasoning import ReasoningTools
from agno.tools.yfinance import YFinanceTools

agent = Agent(
    model=Claude(id="claude-sonnet-4-20250514"),
    tools=[
        ReasoningTools(add_instructions=True),
        YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True),
    ],
    instructions=[
        "Use tables to display data",
        "Only output the report, no other text",
    ],
    markdown=True,
)
agent.print_response(
    "Write a report on NVDA",
    stream=True,
    show_full_reasoning=True,
    stream_intermediate_steps=True,
)

Then create a virtual environment, install dependencies, export your ANTHROPIC_API_KEY and run the agent.

uv venv --python 3.12
source .venv/bin/activate

uv pip install agno anthropic yfinance

export ANTHROPIC_API_KEY=sk-ant-api03-xxxx

python reasoning_agent.py

We can see the Agent is reasoning through the task, using the ReasoningTools and YFinanceTools to gather information. This is how the output looks like:

https://github.com/user-attachments/assets/bbb99955-9848-49a9-9732-3e19d77b2ff8

Example - Multi Agent Teams

Agents are the atomic unit of work, and work best when they have a narrow scope and a small number of tools. When the number of tools grows beyond what the model can handle or you need to handle multiple concepts, use a team of agents to spread the load.

from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.tools.yfinance import YFinanceTools
from agno.team import Team

web_agent = Agent(
    name="Web Agent",
    role="Search the web for information",
    model=OpenAIChat(id="gpt-4o"),
    tools=[DuckDuckGoTools()],
    instructions="Always include sources",
    show_tool_calls=True,
    markdown=True,
)

finance_agent = Agent(
    name="Finance Agent",
    role="Get financial data",
    model=OpenAIChat(id="gpt-4o"),
    tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)],
    instructions="Use tables to display data",
    show_tool_calls=True,
    markdown=True,
)

agent_team = Team(
    mode="coordinate",
    members=[web_agent, finance_agent],
    model=OpenAIChat(id="gpt-4o"),
    success_criteria="A comprehensive financial news report with clear sections and data-driven insights.",
    instructions=["Always include sources", "Use tables to display data"],
    show_tool_calls=True,
    markdown=True,
)

agent_team.print_response("What's the market outlook and financial performance of AI semiconductor companies?", stream=True)

Install dependencies and run the Agent team:

pip install duckduckgo-search yfinance

python agent_team.py

View this example in the cookbook

Performance

At Agno, we're obsessed with performance. Why? because even simple AI workflows can spawn thousands of Agents. Scale that to a modest number of users and performance becomes a bottleneck. Agno is designed for building high performance agentic systems:

  • Agent instantiation: ~3μs on average
  • Memory footprint: ~6.5Kib on average

Tested on an Apple M4 Mackbook Pro.

While an Agent's run-time is bottlenecked by inference, we must do everything possible to minimize execution time, reduce memory usage, and parallelize tool calls. These numbers may seem trivial at first, but our experience shows that they add up even at a reasonably small scale.

Instantiation time

Let's measure the time it takes for an Agent with 1 tool to start up. We'll run the evaluation 1000 times to get a baseline measurement.

You should run the evaluation yourself on your own machine, please, do not take these results at face value.

# Setup virtual environment
./scripts/perf_setup.sh
source .venvs/perfenv/bin/activate
# OR Install dependencies manually
# pip install openai agno langgraph langchain_openai

# Agno
python evals/performance/instantiation_with_tool.py

# LangGraph
python evals/performance/other/langgraph_instantiation.py

The following evaluation is run on an Apple M4 Mackbook Pro. It also runs as a Github action on this repo.

LangGraph is on the right, let's start it first and give it a head start.

Agno is on the left, notice how it finishes before LangGraph gets 1/2 way through the runtime measurement, and hasn't even started the memory measurement. That's how fast Agno is.

https://github.com/user-attachments/assets/ba466d45-75dd-45ac-917b-0a56c5742e23

Memory usage

To measure memory usage, we use the tracemalloc library. We first calculate a baseline memory usage by running an empty function, then run the Agent 1000x times and calculate the difference. This gives a (reasonably) isolated measurement of the memory usage of the Agent.

We recommend running the evaluation yourself on your own machine, and digging into the code to see how it works. If we've made a mistake, please let us know.

Conclusion

Agno agents are designed for performance and while we do share some benchmarks against other frameworks, we should be mindful that accuracy and reliability are more important than speed.

Given that each framework is different and we won't be able to tune their performance like we do with Agno, for future benchmarks we'll only be comparing against ourselves.

Complete Documentation Index

For LLMs and AI assistants to understand and navigate Agno's complete documentation, we provide an LLMs.txt or LLMs-Full.txt file.

This file is specifically formatted for AI systems to efficiently parse and reference our documentation.

Cursor Setup

When building Agno agents, using Agno documentation as a source in Cursor is a great way to speed up your development.

  1. In Cursor, go to the "Cursor Settings" menu.
  2. Find the "Indexing & Docs" section.
  3. Add https://docs.agno.com/llms-full.txt to the list of documentation URLs.
  4. Save the changes.

Now, Cursor will have access to the Agno documentation.

Documentation, Community & More examples

Contributions

We welcome contributions, read our contributing guide to get started.

Telemetry

Agno logs which model an agent used so we can prioritize updates to the most popular providers. You can disable this by setting AGNO_TELEMETRY=false in your environment.

⬆️ Back to Top

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agno-1.7.3.tar.gz (662.8 kB view details)

Uploaded Source

Built Distribution

agno-1.7.3-py3-none-any.whl (891.0 kB view details)

Uploaded Python 3

File details

Details for the file agno-1.7.3.tar.gz.

File metadata

  • Download URL: agno-1.7.3.tar.gz
  • Upload date:
  • Size: 662.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agno-1.7.3.tar.gz
Algorithm Hash digest
SHA256 77bf3b3faec2049d2b25840cea7e6d4c9125df196f56e8b40e4cfd0137d75d02
MD5 095d225af3e5a0ec0bef1e781e0ee30f
BLAKE2b-256 c01b7c9a0d25175edd25ebb98cf06623d23a7c34ef33e6fcb1175098bdb74b99

See more details on using hashes here.

File details

Details for the file agno-1.7.3-py3-none-any.whl.

File metadata

  • Download URL: agno-1.7.3-py3-none-any.whl
  • Upload date:
  • Size: 891.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agno-1.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 da2ff333030ef710aa2aebb22b0f5a3a041e383f187e4c4f639a549826e564c1
MD5 5c85f8ba05a9186eb28dea8072d9d37b
BLAKE2b-256 51ec16002201e7b98bd25a0ae37e675fc565c51b65034c47ae9bfbea226a544c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page