AI & LLMs · Guide · AI & Prompt Tools
How to Use Agno (Phidata)
Installing agno, Agent + Teams, knowledge/RAG, tools, Playground UI, running in production with monitoring.
Agno — formerly known as Phidata — is a Python framework for building multi-agent systems. It gives you a batteries-included Agent class with memory, tools, knowledge bases, and a team abstraction that lets several agents hand off work to each other. If you want to ship an agent to production without wiring vector stores and message history yourself, Agno removes most of the boilerplate.
Advertisement
What Agno actually is
Agno is a single-import framework that bundles: an agent loop with tool calling, pluggable memory (SQLite, Postgres, MongoDB), pluggable vector knowledge (PgVector, LanceDB, Chroma, Pinecone), model-provider adapters, and a Team primitive for orchestrating multiple agents in coordinated, collaborate, or route modes. It also ships a local playground UI so you can chat with your agents without building a frontend.
Compared to LangChain, Agno is smaller and more convention-driven — fewer ways to do the same thing. Compared to CrewAI, it has stronger first-class memory and knowledge support and feels less framework-y.
Installing
pip install -U agno # Common extras you'll actually use pip install openai duckduckgo-search yfinance lancedb
Agno itself stays lean; each tool and storage backend is an optional dependency you install as needed. Export OPENAI_API_KEY (or whichever provider) before running.
First working example
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
tools=[DuckDuckGoTools()],
description="You are a news analyst. Cite sources with URLs.",
markdown=True,
)
agent.print_response(
"What happened with EU AI Act enforcement this week?",
stream=True,
)One agent, one tool, streamed to stdout with Markdown rendering. The print_response helper is for quick iteration; in production you’ll use agent.run() which returns a RunResponse with the text, messages, and tool trace.
A real workflow — a team with memory and knowledge
from agno.agent import Agent
from agno.team import Team
from agno.models.openai import OpenAIChat
from agno.tools.yfinance import YFinanceTools
from agno.knowledge.pdf_url import PDFUrlKnowledgeBase
from agno.vectordb.lancedb import LanceDb
from agno.storage.sqlite import SqliteStorage
kb = PDFUrlKnowledgeBase(
urls=["https://example.com/10-k.pdf"],
vector_db=LanceDb(table_name="filings", uri="tmp/lancedb"),
)
kb.load(recreate=False)
researcher = Agent(
name="Researcher",
model=OpenAIChat(id="gpt-4o"),
knowledge=kb,
search_knowledge=True,
role="Answer questions about the 10-K filing.",
)
analyst = Agent(
name="Analyst",
model=OpenAIChat(id="gpt-4o"),
tools=[YFinanceTools(stock_price=True, company_info=True)],
role="Pull live market data and combine with research findings.",
)
team = Team(
name="Equity Desk",
members=[researcher, analyst],
mode="coordinate",
storage=SqliteStorage(table_name="team", db_file="tmp/team.db"),
)
team.print_response("Is AAPL's current price consistent with its latest 10-K guidance?")The coordinate mode lets a team leader route sub- tasks to members and assemble a final answer. SQLite storage persists sessions across restarts so the team remembers prior conversations.
Gotchas
Knowledge base reloads are expensive. Call kb.load(recreate=False), not True, in production. True re-embeds every document every run — burns your embeddings budget fast.
The playground is local-only by default. agno playground binds to localhost. Don’t expose it to the internet without auth; it lets anyone invoke your agents with your API keys.
Team modes matter. route picks one member; collaborate lets all members respond; coordinate uses a leader. Pick wrong and you’ll pay for every member every turn when you only needed one.
Python 3.10+. Agno uses modern typing syntax (str | None) that won’t import on 3.9.
When NOT to use it
If you’re on TypeScript, look at Mastra or the Vercel AI SDK. If you need bulletproof type safety on a small typed-output service, Pydantic AI is a better fit. If you’re doing pure document RAG, LlamaIndex has deeper retrieval primitives. Agno shines when you want multi-agent orchestration plus memory plus knowledge in one cohesive Python package without gluing four libraries together.
Sharpen agent system prompts with the prompt improver, sanity- check tool-call JSON with the JSON formatter, and estimate context-window usage per turn with the token counter.
Use these while you read
Tools that pair with this guide
- System Prompt BuilderCompose a focused system prompt from a role, tone, constraints, and output format — copy-ready for any LLM.AI & Prompt Tools
- AI Prompt GeneratorTurn a vague idea into a structured prompt. Pick role, task, context, constraints, and output format. Works with ChatGPT, Claude, and Gemini.AI & Prompt Tools
- AI Token CounterEstimate tokens, characters, words, and approximate API cost for GPT-4o, GPT-4, Claude, and Gemini — before you hit send.AI & Prompt Tools
- AI Prompt LibraryBrowse a curated catalog of prompt templates for writing, coding, marketing, and research. One click to copy.AI & Prompt Tools
Advertisement
Continue reading
- AI & LLMsGitHub Copilot Pricing and ComparisonCompare free vs paid GitHub Copilot tiers and analyze it against ChatGPT, Cursor, and Tabnine. Find the best value plan instantly with this free online guide.
- AI & LLMsGitHub Copilot Features and CapabilitiesTest what Copilot really does — code accuracy, scope limits, debugging, web dev, legacy code, tests, docs, team customization. Free guide, no sign-up.
- AI & LLMsGitHub Copilot Security and Data HandlingAudit where your code goes, who sees it, training-data policy, network needs, and what happens when Copilot suggests broken code. Free, no sign-up.
- AI & LLMsAI Fluency SkillsThe 8 sub-skills of AI fluency: prompt structure, model selection, tool use, quality calibration, iteration, context management, cost awareness, privacy.
- AI & LLMsAnthropic Skills ExplainedSkills as Anthropic's answer to Custom GPTs — markdown-defined, version-controlled in git, work in terminal. Anatomy + Skills vs Custom GPTs.
- AI & LLMsKimi K2 vs DeepSeek V3Two open-weight Chinese flagships. Kimi K2 = 1M context, DeepSeek V3.2 = top-tier reasoning + coding. Pick by use case.