Learn how to create AI agents that can perform step-by-step reasoning and extract information
A workflow where a reasoning agent breaks down complex problems into steps, followed by a smaller agent that processes these steps to provide concise answers.
from praisonaiagents import Agent, Task, PraisonAIAgentsreasoning_agent = Agent( role="Helpful Assistant", reasoning_steps=True, llm="deepseek/deepseek-reasoner")small_agent = Agent( role="Helpful Assistant", llm="gpt-3.5-turbo")reasoning_task = Task( description="How many r's in the word 'Strawberry'?", agent=reasoning_agent)small_task = Task( description="With the provided reasoning tell me how many r's in the word 'Strawberry'?", agent=small_agent)agents = PraisonAIAgents( agents=[reasoning_agent, small_agent], tasks=[reasoning_task, small_task])agents.start()
The reasoning agent uses a specialized model (deepseek-reasoner) optimized for step-by-step analysis, while the small agent can use a more general-purpose model for processing the reasoning output.