Overview
Phidata (rebranded as Agno) is a framework for building AI assistants with tools, memory, and knowledge. It provides a simple Pythonic API for creating agents that can read files, query databases, search the web, and more. Phidata emphasizes simplicity and composability, making it easy to build powerful assistants with minimal code. Supports OpenAI, Anthropic, Google, and local models.
Features
- ✓Simple Pythonic API for agent creation
- ✓Built-in tools for common tasks
- ✓Memory and knowledge base support
- ✓Multi-modal capabilities
- ✓Support for 10+ LLM providers
- ✓Team and workspace management
- ✓Deploy as web app or API
Installation
pip install phidataPros
- +Very simple and intuitive API
- +Great for building practical assistants
- +Good tool and knowledge integration
- +Active development and community
- +Can deploy as production web app
Cons
- −Less mature than LangChain/CrewAI
- −Fewer integrations than larger frameworks
- −Documentation still growing
- −Rebranding from Phidata to Agno may cause confusion
Alternatives
Documentation
Phidata (Agno)
Overview
Phidata (rebranded as Agno) is a framework for building AI assistants with tools, memory, and knowledge. It provides a simple Pythonic API for creating agents that can read files, query databases, search the web, and more.
Phidata emphasizes simplicity and composability, making it easy to build powerful assistants with minimal code. It's particularly well-suited for building practical, production-ready AI assistants.
Features
- Simple Pythonic API: Create agents in just a few lines of code
- Built-in Tools: File reading, web search, database queries, and more
- Memory and Knowledge: Long-term memory and RAG-based knowledge
- Multi-Modal Support: Text, images, and documents
- Multi-Provider Support: OpenAI, Anthropic, Google, and local models
- Team and Workspace Management: Multi-user collaboration
- Web App Deployment: Deploy assistants as production web apps
Installation
pip install phidata
Quick Start
from phi.agent import Agent
from phi.model.openai import OpenAIChat
# Create a simple assistant
assistant = Agent(
model=OpenAIChat(id="gpt-4o"),
instructions="You are a helpful assistant.",
)
# Run the assistant
assistant.print_response("What is the capital of France?", stream=True)
Tools
Built-in Tools
from phi.tools.duckduckgo import DuckDuckGo
from phi.tools.file import FileTools
from phi.tools.yfinance import YFinanceTools
assistant = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[
DuckDuckGo(),
FileTools(),
YFinanceTools(stock_price=True, analyst_recommendations=True),
],
show_tool_calls=True,
)
Custom Tools
from phi.tools import Tool
from phi.model.openai import OpenAIChat
def get_weather(location: str) -> str:
"""Get the current weather for a location."""
# Your implementation
return f"The weather in {location} is sunny, 72°F."
weather_tool = Tool(
name="GetWeather",
description="Get the current weather for a location",
function=get_weather,
)
assistant = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[weather_tool],
)
Memory and Knowledge
Memory
from phi.memory import AgentMemory
from phi.storage.agent.sqlite import SqlAgentStorage
assistant = Agent(
model=OpenAIChat(id="gpt-4o"),
memory=AgentMemory(
storage=SqlAgentStorage(table_name="agent_memory", db_file="agent.db"),
create_user_memory=True,
),
)
Knowledge (RAG)
from phi.knowledge import AssistantKnowledge
from phi.embedder.openai import OpenAIEmbedder
from phi.vectordb.qdrant import Qdrant
assistant = Agent(
model=OpenAIChat(id="gpt-4o"),
knowledge=AssistantKnowledge(
vector_db=Qdrant(
collection="my-knowledge",
embedder=OpenAIEmbedder(),
),
num_documents=3,
),
search_knowledge=True,
)
Multi-Agent Teams
from phi.agent import Agent
from phi.team import Team
researcher = Agent(
name="Researcher",
role="Research and gather information",
model=OpenAIChat(id="gpt-4o"),
)
writer = Agent(
name="Writer",
role="Write and edit content",
model=OpenAIChat(id="gpt-4o"),
)
team = Team(
name="Research Team",
agents=[researcher, writer],
instructions="Work together to produce high-quality research reports.",
)
team.print_response("Research the latest trends in AI agents.", stream=True)
Deploy as Web App
from phi.deploy import deploy
deploy(
assistant=assistant,
name="my-assistant",
# Deploy options...
)
Pros
- ✅ Very simple and intuitive API
- ✅ Great for building practical assistants
- ✅ Good tool and knowledge integration
- ✅ Active development and community
- ✅ Can deploy as production web app
- ✅ Multi-agent team support
Cons
- ❌ Less mature than LangChain/CrewAI
- ❌ Fewer integrations than larger frameworks
- ❌ Documentation still growing
- ❌ Rebranding from Phidata to Agno may cause confusion
Use Cases
| Use Case | Why Phidata |
|---|---|
| Quick Assistant Setup | Build functional AI assistants in minutes |
| Tool-heavy Workflows | Easy integration of file, web, and database tools |
| Multi-agent Teams | Simple team composition for complex tasks |
| Web App Deployment | Deploy assistants as production web apps |
| Internal Tools | Build practical assistants for team productivity |
Comparison with Alternatives
| Feature | Phidata | LangChain | CrewAI | OpenAI Agents SDK |
|---|---|---|---|---|
| Paradigm | Simple Python API | Chain-based | Role-based teams | SDK-based |
| Simplicity | ✅ Excellent | ⚠️ Complex | ✅ Good | ✅ Good |
| Tool Integration | ✅ Built-in | ⚠️ Via integrations | ⚠️ Via tools | ⚠️ Via tools |
| Memory/Knowledge | ✅ Built-in | ⚠️ Manual setup | ⚠️ Manual setup | ⚠️ Via memory |
| Self-hostable | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Learning Curve | Low | High | Low | Low-Medium |
| Best for | Quick assistants | Complex apps | Team workflows | OpenAI users |
Best Practices
- Start with built-in tools — Use pre-built tools before creating custom ones
- Define clear instructions — Agent behavior is guided by instructions
- Use memory for context — Enable memory for multi-turn conversations
- Leverage knowledge for RAG — Use AssistantKnowledge for document Q&A
- Compose teams for complexity — Use Team for multi-agent coordination
- Deploy early — Use deploy() to test as a web app
Troubleshooting
| Issue | Solution |
|---|---|
| Tools not working | Verify tool function signatures and descriptions |
| Memory not persisting | Check storage backend configuration |
| Knowledge search empty | Re-index documents after updates |
| Agent not calling tools | Check show_tool_calls and tool availability |
| Deployment fails | Verify all dependencies and environment variables |
