from praisonaiagents import Agent# Research agent with web searchresearcher = Agent( name="Researcher", instructions="Research topics and provide clear summaries", web=True # Enable web search)researcher.start("What are the latest trends in AI?")
Enable web=True to give your agent web search capabilities.
from praisonaiagents import Agent# Create a research agentresearcher = Agent( name="ResearchAgent", instructions="""You are a research specialist.When researching:- Search for accurate, current information- Organize findings clearly- Identify key facts and insights- Present in a structured format""", web=True)# Research a topicresearcher.start("Research the impact of renewable energy on carbon emissions")
comparison_agent = Agent( name="ComparisonAgent", instructions="""Compare options and present findings.- Identify key criteria- Research each option- Create side-by-side comparison- Highlight pros and cons""", web=True)comparison_agent.start("Compare solar vs wind energy for homes")
Multiple agents working together for deep research:
Copy
from praisonaiagents import Agent, AgentTeam# Researcher finds informationresearcher = Agent( name="Researcher", instructions="Find comprehensive information on topics", web=True)# Analyst interprets findingsanalyst = Agent( name="Analyst", instructions="Analyze research and identify key insights")# Writer creates the reportwriter = Agent( name="Writer", instructions="Write clear, structured research reports")# Create research teamteam = AgentTeam( agents=[researcher, analyst, writer], process="sequential")team.start("Research the future of electric vehicles")