{"library":"phidata","title":"PhiData (phidata) Library","description":"PhiData (phidata) is a Python library designed for building multi-modal AI Agents with capabilities like memory, knowledge retrieval (RAG), and tool integration. It simplifies the development of complex AI workflows by providing high-level abstractions for agents, assistants, and various components. The current stable version is 2.7.10, and it maintains an active release cadence with frequent updates.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install phidata","pip install \"phidata[gradio]\"","pip install \"phidata[qdrant]\"","pip install \"phidata[chroma]\""],"cli":null},"imports":["from phidata.assistant import Assistant","from phidata.agent import Agent","from phidata.llm.openai import OpenAILLM","from phidata.app import PhiApp"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom phidata.llm.openai import OpenAILLM\nfrom phidata.assistant import Assistant\n\n# Ensure OPENAI_API_KEY is set in your environment variables\n# For local development, you might use python-dotenv:\n# from dotenv import load_dotenv; load_dotenv()\n\n# Initialize LLM (e.g., OpenAI)\n# Replace with os.environ.get('OPENAI_API_KEY', '') for production if not using dotenv\nllm = OpenAILLM(model=\"gpt-4o\", api_key=os.environ.get('OPENAI_API_KEY', ''))\n\n# Create an Assistant\nassistant = Assistant(llm=llm, name=\"MyChatAssistant\")\n\n# Run a chat interaction\nresponse = assistant.chat(\"Hello, how are you?\")\nprint(f\"Assistant: {response}\")\n\nresponse = assistant.chat(\"What is the capital of France?\")\nprint(f\"Assistant: {response}\")\n\n# Example with a tool (requires 'pip install \"phidata[wikipedia]\"')\n# from phidata.tools.wikipedia import WikipediaTool\n# assistant_with_tool = Assistant(\n#     llm=llm,\n#     name=\"WikiAssistant\",\n#     tools=[WikipediaTool()]\n# )\n# response = assistant_with_tool.chat(\"Who is Marie Curie?\")\n# print(f\"WikiAssistant: {response}\")","lang":"python","description":"This quickstart demonstrates how to initialize an OpenAI LLM and create a simple Assistant to handle chat interactions. It highlights the basic setup for agents in phidata. Remember to set your `OPENAI_API_KEY` environment variable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}