Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsApr 7, 2026·2 min de lectura

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.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Knowledge
Instalación
Single
Confianza
Confianza: Community
Entrada
Phidata — AI Agents with Memory, Knowledge & Tools
Comando con revisión previa
npx -y tokrepo@latest install 67988bf9-9e52-4878-ad19-16dc90b43bea --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

TL;DR
Phidata builds production AI agents with PostgreSQL-backed memory, RAG knowledge, and 50+ tools.
§01

What it is

Phidata is a Python framework for building AI agents that come with built-in memory (backed by PostgreSQL), knowledge bases (via RAG), and 50+ tool integrations out of the box. It provides a structured approach to creating agents that remember conversations, search through documents, and take actions via external APIs.

The framework targets developers building production AI assistants, customer support bots, or research agents that need persistent state and access to domain-specific knowledge.

§02

How it saves time or tokens

Phidata bundles memory, knowledge, and tool calling into a single framework. Without it, you would need to separately integrate a vector database, build RAG pipelines, implement conversation persistence, and wire up tool schemas. Phidata provides all of this with minimal configuration, reducing setup time from days to hours.

§03

How to use

  1. Install Phidata: pip install phidata.
  2. Create an Agent with your chosen model, tools, and knowledge source.
  3. Run the agent with .run() or .print_response() for interactive use.
§04

Example

from phi.agent import Agent
from phi.tools.duckduckgo import DuckDuckGo
from phi.model.openai import OpenAIChat

agent = Agent(
    model=OpenAIChat(id='gpt-4o'),
    tools=[DuckDuckGo()],
    description='You are a research assistant.',
    instructions=['Always cite your sources.'],
    show_tool_calls=True,
    markdown=True,
)

agent.print_response('What are the latest developments in AI agents?')
§05

Related on TokRepo

§06

Common pitfalls

  • Phidata's memory requires a PostgreSQL database for persistence. For local development, use Docker to run a lightweight Postgres instance.
  • Tool calling adds latency per turn. Limit the number of active tools to those the agent actually needs for the current task.
  • Knowledge base indexing must be triggered manually after adding new documents. Automate re-indexing in your CI/CD pipeline for production.

Preguntas frecuentes

How does Phidata handle agent memory?+

Phidata stores conversation history and agent state in PostgreSQL. Each session has a unique ID, and the agent automatically loads prior context when a session resumes. This gives agents persistent memory across restarts.

What knowledge sources does Phidata support?+

Phidata supports PDF files, web pages, text documents, and custom data sources for RAG. Documents are chunked, embedded, and stored in a vector database (pgvector by default) for semantic retrieval.

Does Phidata support multi-agent workflows?+

Yes. Phidata provides a Team class for orchestrating multiple agents. You can define agents with different roles and have them collaborate on tasks with a supervisor agent routing work.

Which LLM providers does Phidata work with?+

Phidata supports OpenAI, Anthropic, Google Gemini, Groq, Together AI, Ollama, and other providers. You swap models by changing the model parameter in the Agent constructor.

Is Phidata free?+

Phidata is open source under the MIT license. There is also a paid cloud platform (phi.com) for monitoring, debugging, and team collaboration on agent projects.

Referencias (3)
🙏

Fuente y agradecimientos

Created by Phidata. Licensed under Apache 2.0.

phidata — stars 18,000+

Thanks for making production agents batteries-included.

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados