Integration of Perplexity AI real-time web search within the AG2 (AutoGen) multi-agent framework. Enables AI agents to perform live web searches and incorporate current information into collaborative workflows.
## Overview The AG2 framework (formerly AutoGen) provides a PerplexitySearchTool that enables AI agents to perform real-time web searches within multi-agent conversations. This allows agents to access current information during collaborative problem-solving. ## How It Works 1. Create an AssistantAgent with LLM configuration 2. Create a UserProxyAgent for tool execution 3. Instantiate PerplexitySearchTool with API key and token limits 4. Register tool for LLM recommendations (assistant) and execution (user proxy) 5. Agents automatically invoke search during conversations when needed ## Key Features - Real-time web search within multi-agent workflows - Automatic tool invocation based on conversation context - Configurable max_tokens per search query - Integration with AG2's multi-turn conversation system - Compatible with any LLM backend supported by AG2 ## Setup ```bash pip install -U "ag2[openai]" export PERPLEXITY_API_KEY=your_key ``` ## Code Example ```python from autogen import AssistantAgent, UserProxyAgent from autogen.tools.experimental import PerplexitySearchTool tool = PerplexitySearchTool(api_key="pplx-...", max_tokens=1024) tool.register_for_llm(assistant) tool.register_for_execution(user_proxy) ``` Ideal for research agents, fact-checking workflows, and data-gathering pipelines.
Reads and summarizes scientific papers in plain language
Monitors supply chain disruptions and logistics developments globally
Analyzes job market conditions, salary trends, and skill demand
Monitors clinical trials for specific conditions or treatments
Monitors content for outdated information and suggests updates
Collects cybersecurity threat intelligence from open sources