PH

Phidata (Agno)

22,000PythonAssistant Framework

Build AI assistants with tools, memory, and knowledge using Python.

PythonAssistantToolsMemoryKnowledge

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 phidata

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

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 CaseWhy Phidata
Quick Assistant SetupBuild functional AI assistants in minutes
Tool-heavy WorkflowsEasy integration of file, web, and database tools
Multi-agent TeamsSimple team composition for complex tasks
Web App DeploymentDeploy assistants as production web apps
Internal ToolsBuild practical assistants for team productivity

Comparison with Alternatives

FeaturePhidataLangChainCrewAIOpenAI Agents SDK
ParadigmSimple Python APIChain-basedRole-based teamsSDK-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 CurveLowHighLowLow-Medium
Best forQuick assistantsComplex appsTeam workflowsOpenAI users

Best Practices

  1. Start with built-in tools — Use pre-built tools before creating custom ones
  2. Define clear instructions — Agent behavior is guided by instructions
  3. Use memory for context — Enable memory for multi-turn conversations
  4. Leverage knowledge for RAG — Use AssistantKnowledge for document Q&A
  5. Compose teams for complexity — Use Team for multi-agent coordination
  6. Deploy early — Use deploy() to test as a web app

Troubleshooting

IssueSolution
Tools not workingVerify tool function signatures and descriptions
Memory not persistingCheck storage backend configuration
Knowledge search emptyRe-index documents after updates
Agent not calling toolsCheck show_tool_calls and tool availability
Deployment failsVerify all dependencies and environment variables

Resources