Prerequisites
1
Install Package
Install required packages:
praisonaiagents[llm] includes all necessary dependencies for reasoning agents
2
Set API Key
Configure your API key:
3
Create File
Create a new file called
app.py
and add the following code:4
Run Application
Execute the script:
Code
Features
Step-by-Step Reasoning
Break down complex problems into logical steps.
Multi-Agent Collaboration
Combine reasoning and processing agents.
Flexible Models
Use different models for reasoning and processing.
Task Chaining
Connect reasoning output to processing tasks.
Understanding Reasoning Agents
What are Reasoning Agents?
Reasoning agents enable:
- Detailed step-by-step analysis
- Logical problem decomposition
- Clear reasoning paths
- Enhanced decision making
Troubleshooting
Reasoning Issues
If reasoning steps aren’t clear:
- Check reasoning_steps parameter
- Verify model compatibility
- Review task descriptions
Agent Communication
If agents aren’t coordinating:
- Ensure task order is correct
- Check task dependencies
- Verify agent configurations
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.