basic_web.py
1 """ 2 Basic Web Search Example - Agent-Centric API 3 4 Demonstrates web search with consolidated params. 5 Presets: duckduckgo, tavily, google, bing, serper, search_only, fetch_only 6 """ 7 8 from praisonaiagents import Agent 9 10 # Basic: Enable web search with preset 11 agent = Agent( 12 instructions="You are a research assistant with web access.", 13 web="duckduckgo", # Presets: duckduckgo, tavily, google, bing, serper 14 ) 15 16 if __name__ == "__main__": 17 response = agent.start("What are the latest AI developments in 2024?") 18 print(response)