# phidata **Repository Path**: breeze_cool/phidata ## Basic Information - **Project Name**: phidata - **Description**: No description available - **Primary Language**: Unknown - **License**: MPL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-21 - **Last Updated**: 2025-08-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

🚨 Phidata is now Agno! 🚨

We've moved! Check out our new home at Agno AGI

Read the Docs

Build multi-modal Agents with memory, knowledge, tools and reasoning.

## What is phidata? **Phidata is a framework for building multi-modal agents**, use phidata to: - **Build multi-modal agents with memory, knowledge, tools and reasoning.** - **Build teams of agents that can work together to solve problems.** - **Chat with your agents using a beautiful Agent UI.** ## Install ```shell pip install -U phidata ``` ## Key Features - [Simple & Elegant](#simple--elegant) - [Powerful & Flexible](#powerful--flexible) - [Multi-Modal by default](#multi-modal-by-default) - [Multi-Agent orchestration](#multi-agent-orchestration) - [A beautiful Agent UI to chat with your agents](#a-beautiful-agent-ui-to-chat-with-your-agents) - [Agentic RAG built-in](#agentic-rag) - [Structured Outputs](#structured-outputs) - [Reasoning Agents](#reasoning-agents-experimental) - [Monitoring & Debugging built-in](#monitoring--debugging) - [Demo Agents](#demo-agents) ## Simple & Elegant Phidata Agents are simple and elegant, resulting in minimal, beautiful code. For example, you can create a web search agent in 10 lines of code, create a file `web_search.py` ```python from phi.agent import Agent from phi.model.openai import OpenAIChat from phi.tools.duckduckgo import DuckDuckGo web_agent = Agent( model=OpenAIChat(id="gpt-4o"), tools=[DuckDuckGo()], instructions=["Always include sources"], show_tool_calls=True, markdown=True, ) web_agent.print_response("Tell me about OpenAI Sora?", stream=True) ``` Install libraries, export your `OPENAI_API_KEY` and run the Agent: ```shell pip install phidata openai duckduckgo-search export OPENAI_API_KEY=sk-xxxx python web_search.py ``` ## Powerful & Flexible Phidata agents can use multiple tools and follow instructions to achieve complex tasks. For example, you can create a finance agent with tools to query financial data, create a file `finance_agent.py` ```python from phi.agent import Agent from phi.model.openai import OpenAIChat from phi.tools.yfinance import YFinanceTools finance_agent = Agent( name="Finance Agent", model=OpenAIChat(id="gpt-4o"), tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True)], instructions=["Use tables to display data"], show_tool_calls=True, markdown=True, ) finance_agent.print_response("Summarize analyst recommendations for NVDA", stream=True) ``` Install libraries and run the Agent: ```shell pip install yfinance python finance_agent.py ``` ## Multi-Modal by default Phidata agents support text, images, audio and video. For example, you can create an image agent that can understand images and make tool calls as needed, create a file `image_agent.py` ```python from phi.agent import Agent from phi.model.openai import OpenAIChat from phi.tools.duckduckgo import DuckDuckGo agent = Agent( model=OpenAIChat(id="gpt-4o"), tools=[DuckDuckGo()], markdown=True, ) agent.print_response( "Tell me about this image and give me the latest news about it.", images=["https://upload.wikimedia.org/wikipedia/commons/b/bf/Krakow_-_Kosciol_Mariacki.jpg"], stream=True, ) ``` Run the Agent: ```shell python image_agent.py ``` ## Multi-Agent orchestration Phidata agents can work together as a team to achieve complex tasks, create a file `agent_team.py` ```python from phi.agent import Agent from phi.model.openai import OpenAIChat from phi.tools.duckduckgo import DuckDuckGo from phi.tools.yfinance import YFinanceTools web_agent = Agent( name="Web Agent", role="Search the web for information", model=OpenAIChat(id="gpt-4o"), tools=[DuckDuckGo()], instructions=["Always include sources"], show_tool_calls=True, markdown=True, ) finance_agent = Agent( name="Finance Agent", role="Get financial data", model=OpenAIChat(id="gpt-4o"), tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)], instructions=["Use tables to display data"], show_tool_calls=True, markdown=True, ) agent_team = Agent( team=[web_agent, finance_agent], model=OpenAIChat(id="gpt-4o"), instructions=["Always include sources", "Use tables to display data"], show_tool_calls=True, markdown=True, ) agent_team.print_response("Summarize analyst recommendations and share the latest news for NVDA", stream=True) ``` Run the Agent team: ```shell python agent_team.py ``` ## A beautiful Agent UI to chat with your agents Phidata provides a beautiful UI for interacting with your agents. Let's take it for a spin, create a file `playground.py` ![agent_playground](https://github.com/user-attachments/assets/546ce6f5-47f0-4c0c-8f06-01d560befdbc) > [!NOTE] > Phidata does not store any data, all agent data is stored locally in a sqlite database. ```python from phi.agent import Agent from phi.model.openai import OpenAIChat from phi.storage.agent.sqlite import SqlAgentStorage from phi.tools.duckduckgo import DuckDuckGo from phi.tools.yfinance import YFinanceTools from phi.playground import Playground, serve_playground_app web_agent = Agent( name="Web Agent", model=OpenAIChat(id="gpt-4o"), tools=[DuckDuckGo()], instructions=["Always include sources"], storage=SqlAgentStorage(table_name="web_agent", db_file="agents.db"), add_history_to_messages=True, markdown=True, ) finance_agent = Agent( name="Finance Agent", model=OpenAIChat(id="gpt-4o"), tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True)], instructions=["Use tables to display data"], storage=SqlAgentStorage(table_name="finance_agent", db_file="agents.db"), add_history_to_messages=True, markdown=True, ) app = Playground(agents=[finance_agent, web_agent]).get_app() if __name__ == "__main__": serve_playground_app("playground:app", reload=True) ``` Authenticate with phidata by running the following command: ```shell phi auth ``` or by exporting the `PHI_API_KEY` for your workspace from [phidata.app](https://www.phidata.app) ```bash export PHI_API_KEY=phi-*** ``` Install dependencies and run the Agent Playground: ``` pip install 'fastapi[standard]' sqlalchemy python playground.py ``` - Open the link provided or navigate to `http://phidata.app/playground` - Select the `localhost:7777` endpoint and start chatting with your agents!