Simple example showing how to set up a web search agent with PilottAI framework.
pip install pilott
from pilottai import Serve from pilottai.core import AgentConfig, LLMConfig # Initialize pilott = Serve(name="WebSearchAgent") # Create agent search_agent = await pilott.add_agent( role="web_searcher", goal="Execute and analyze web searches effectively", tools=["search_executor", "result_analyzer"] ) # Execute search task = { "type": "web_search", "query": "latest AI developments 2024", "search_type": "news", "filters": { "date_range": "last_month" } } result = await pilott.execute([task])
Ready to use code web_search.py