Core Features
Built-In Memory
Agents remember conversations across sessions:
from phi.agent import Agent
from phi.model.anthropic import Claude
from phi.storage.agent.postgres import PgAgentStorage
agent = Agent(
model=Claude(id="claude-sonnet-4-20250514"),
storage=PgAgentStorage(table_name="agent_sessions", db_url="postgresql://..."),
add_history_to_messages=True,
)
# Agent remembers previous conversations automaticallyKnowledge Base (RAG)
from phi.knowledge.pdf import PDFUrlKnowledgeBase
from phi.vectordb.pgvector import PgVector
knowledge = PDFUrlKnowledgeBase(
urls=["https://example.com/docs.pdf"],
vector_db=PgVector(table_name="docs", db_url="postgresql://..."),
)
agent = Agent(knowledge=knowledge, search_knowledge=True)
agent.print_response("What does the documentation say about authentication?")50+ Pre-Built Tools
| Category | Tools |
|---|---|
| Search | DuckDuckGo, Tavily, Exa |
| Data | SQL, CSV, Pandas |
| Communication | Email, Slack |
| Web | Crawl4AI, Newspaper |
| Code | Python, Shell |
| Finance | YFinance, Alpha Vantage |
| Storage | S3, GCS |
from phi.tools.sql import SQLTools
from phi.tools.email import EmailTools
agent = Agent(tools=[
SQLTools(db_url="postgresql://..."),
EmailTools(sender="bot@company.com"),
])Team of Agents
from phi.agent import Agent
from phi.model.anthropic import Claude
researcher = Agent(name="Researcher", tools=[DuckDuckGo()], role="Research topics")
writer = Agent(name="Writer", role="Write articles based on research")
team = Agent(
team=[researcher, writer],
instructions=["Researcher finds data", "Writer creates the article"],
)
team.print_response("Write an article about AI agent trends")Monitoring Dashboard
Built-in UI at app.phidata.com:
- Agent session history
- Tool call traces
- Token usage and costs
- Error tracking
Key Stats
- 18,000+ GitHub stars
- PostgreSQL-backed memory
- RAG with pgvector
- 50+ pre-built tools
- Monitoring dashboard
FAQ
Q: What is Phidata? A: A Python framework for building production AI agents with built-in memory (PostgreSQL), knowledge bases (RAG), 50+ tools, and monitoring.
Q: Is Phidata free? A: Open-source under Apache 2.0. Monitoring dashboard has a free tier.
Q: How is Phidata different from LangChain? A: Phidata is batteries-included — memory, RAG, tools, and monitoring are built in. LangChain requires assembling these from separate packages.