from praisonaiagents import Agent, AgentFlow
from praisonaiagents import parallel
# Create agents
ai_researcher = Agent(name="AI", instructions="Research AI trends")
ml_researcher = Agent(name="ML", instructions="Research ML trends")
nlp_researcher = Agent(name="NLP", instructions="Research NLP trends")
summarizer = Agent(name="Summary", instructions="Combine all research")
# Run in parallel, then summarize
flow = AgentFlow(steps=[
parallel([ai_researcher, ml_researcher, nlp_researcher]),
summarizer
])
result = flow.start("Research latest developments")