# Phidata — AI Agents with Memory, Knowledge & Tools > Python framework for building AI agents with built-in memory (PostgreSQL), knowledge bases (RAG), and 50+ tool integrations. Production-ready with monitoring dashboard. 18,000+ GitHub stars. ## Install Save as a script file and run: ## Quick Use ```bash pip install phidata ``` ```python from phi.agent import Agent from phi.model.anthropic import Claude from phi.tools.duckduckgo import DuckDuckGo agent = Agent( model=Claude(id="claude-sonnet-4-20250514"), tools=[DuckDuckGo()], show_tool_calls=True, markdown=True, ) agent.print_response("What are the top AI coding tools in 2026?") ``` --- ## Intro Phidata is a Python framework for building production AI agents with built-in memory, knowledge bases, and 50+ tool integrations with 18,000+ GitHub stars. Unlike minimal agent frameworks, Phidata includes everything out of the box — PostgreSQL-backed memory for conversation persistence, vector database integration for RAG, pre-built tools for web search, email, SQL, and more, plus a monitoring dashboard. Best for Python developers who want production-ready agents without assembling pieces from multiple libraries. Works with: Claude, GPT-4, Gemini, Ollama, Groq. Setup time: under 2 minutes. --- ## Core Features ### Built-In Memory Agents remember conversations across sessions: ```python 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 automatically ``` ### Knowledge Base (RAG) ```python 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 | ```python 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 ```python 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](https://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. --- ## Source & Thanks > Created by [Phidata](https://github.com/phidatahq). Licensed under Apache 2.0. > > [phidata](https://github.com/phidatahq/phidata) — stars 18,000+ Thanks for making production agents batteries-included. --- ## 快速使用 ```bash pip install phidata ``` ```python from phi.agent import Agent from phi.model.anthropic import Claude from phi.tools.duckduckgo import DuckDuckGo agent = Agent(model=Claude(id="claude-sonnet-4-20250514"), tools=[DuckDuckGo()]) agent.print_response("2026 年最火的 AI 编码工具有哪些?") ``` --- ## 简介 Phidata 是一个 Python Agent 框架,GitHub 18,000+ stars。内置 PostgreSQL 记忆、RAG 知识库、50+ 工具集成和监控面板。适合需要生产级 Agent 的 Python 开发者。 --- ## 来源与感谢 > Created by [Phidata](https://github.com/phidatahq). Licensed under Apache 2.0. > > [phidata](https://github.com/phidatahq/phidata) — stars 18,000+ --- Source: https://tokrepo.com/en/workflows/67988bf9-9e52-4878-ad19-16dc90b43bea Author: Agent Toolkit