Phidata Documentation

website·Indexed 33 days ago

https://docs.phidata.com

A framework for building autonomous agents with memory, knowledge, and tools. Phidata enables the creation of agent teams, structured output using Pydantic models, and advanced RAG capabilities through various chunking strategies and embedders including OpenAI, Azure OpenAI, Gemini, and Ollama. It includes a built-in Agent UI playground for interacting with agents.

Tokens
109.3K
Snippets
600
Records
793
Agent score
63%

What's inside Phidata

  1. Overview of Phidata Workflows

    Workflows in Phidata are deterministic, stateful, multi-agent pipelines defined as Python classes. They provide full control over the agent sequence and input processing, and include built-in memory for storing state and caching results in a database, allowing agents to reuse results from previous steps.
  2. Overview of Phidata Agent API

    The Agent API allows developers to serve AI agents using a FastAPI server. It utilizes a Postgres database to store agent memory and knowledge. The API can be run locally using Docker or deployed to production environments on AWS.
  3. Overview of Phidata development application structure

    The development application runs locally on Docker. Its resources are defined in workspace/dev_resources.py, and common settings for workspace apps and resources are managed via the WorkspaceSettings object in workspace/settings.py.
  4. Overview of Phidata (Agno)

    Phidata (now rebranded as Agno) is a framework used to build multi-modal agents and workflows. It allows developers to create agents equipped with memory, knowledge, tools, and reasoning. Key capabilities include multi-agent orchestration, built-in Agentic RAG, structured outputs, and a dedicated Agent UI for interaction.
  5. Overview of Phidata Apps and Applications as Code

    Phidata Apps allow you to define tools such as FastApi, PgVector, Streamlit, Jupyter, and Django as Python classes. This 'Applications as Code' approach abstracts away the complexity of defining containers and volumes, allowing the same App definition to run on Docker, AWS (ECS), or Kubernetes (EKS). The App automatically handles the creation of underlying resources like LoadBalancers, Services, and Deployments.
  6. Overview of the Phidata Agent App architecture

    The Agent App provides a framework to serve AI agents using a FastAPI server, test them via a Streamlit UI, and persist memory and knowledge using a Postgres database. It is designed to be run locally using Docker or deployed to production on AWS.
  7. Overview of Phidata Agent Memory types

    Phidata provides three primary types of memory to improve Agent Experience (AX):

    1. Chat History: Previous messages from the conversation. It is recommended to send the last 3-5 messages to the model.
    2. User Memories: Notes and insights about the user used to personalize responses.
    3. Summaries: A condensed version of the conversation added to the prompt when chat history becomes too long.
  8. Access phidata agent examples and cookbook

    phidata provides a variety of agent recipes ranging from basic workflows to advanced fine-tuning and evaluations. These examples can be run individually or accessed collectively via the phidata cookbook repository on GitHub.
    # Clone the phidata cookbook to run examples locally
    git clone https://github.com/agno-agi/phidata.git
    cd phidata/cookbook
  9. Understand how vector databases power Agent knowledge retrieval

    Phidata uses vector databases to efficiently retrieve relevant information from dense datasets through a three-step process:

    1. Chunking: Breaking down knowledge into smaller pieces to ensure search queries return only the most relevant results.
    2. Loading: Converting these chunks into embedding vectors and storing them in the vector database.
    3. Searching: Converting a user's input message into an embedding and performing a 'nearest neighbor' search in the vector database to find the most relevant context.
  10. Twitter toolkit available functions

    • create_tweet: Creates and posts a new tweet • reply_to_tweet: Replies to an existing tweet • send_dm: Sends a direct message to a Twitter user • get_user_info: Retrieves information about a Twitter user • get_home_timeline: Gets the authenticated user's home timeline

  11. Build deterministic multi-agent programs with Workflows

    Workflows in Phidata are deterministic, stateful, multi-agent programs designed for production applications. They provide full control over the agent process, allowing developers to define the exact order of agent execution and how input is processed using pure Python. Key features include built-in state management and caching, which allow agents to store and reuse intermediate results from previous executions via a database.
  12. Create an Image Agent to analyze images with Phidata

    Use the Agent class from phi.agent combined with a multimodal model like gpt-4o to analyze one or more images. You can pass a list of image URLs to the images parameter within the print_response method to ask questions about the visual content and identify differences between images.
    from phi.agent import Agent
    from phi.model.openai import OpenAIChat
    
    agent = Agent(
        model=OpenAIChat(id="gpt-4o"),
        markdown=True,
    )
    
    agent.print_response(
        "What are in these images? Is there any difference between them?",
        images=[
            "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
            "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
        ],
    )