/v1/reasoning-agent/types endpoint provides information about specialized reasoning architectures designed for different problem-solving approaches.
Reasoning agents use advanced techniques like self-consistency, majority voting, and iterative refinement to improve answer quality and reliability.
Quick Start
- Python
- JavaScript
- cURL
Reasoning Agent Type Comparison
The/v1/reasoning-agent/types endpoint currently returns 9 reasoning agent types:
Request Parameters
Send these fields in the JSON body ofPOST /v1/reasoning-agent/completions (the ReasoningAgentSpec schema):
The schema default for
swarm_type is the underscore spelling "reasoning_duo", which is not itself one of the 9 accepted values — the enum only contains the hyphenated "reasoning-duo". If you set swarm_type explicitly, use one of the 9 hyphenated/listed values above; the underscore form is rejected.Response Format
POST /v1/reasoning-agent/completions returns a ReasoningAgentCompletionOutput object:
Usage Examples
- Basic Reasoning Agent
- Self-Consistency Agent
- Iterative Refinement Agent
- Reasoning Duo
Advanced Configuration
- Custom Sample Count
- Multi-Iteration Reasoning
- Knowledge Integration
Output Format
The
output_type request field is accepted by the schema but ignored by the server — the reasoning agent always runs with dict-all-except-first, which returns every reasoning step after the initial prompt as role/content entries in the outputs field. Passing "dict", "list", or "final" validates but has no effect on the response.Performance Optimization
- Quality vs Speed
- Cost Optimization
Use Cases by Domain
- Scientific Research
- Business Strategy
- Legal Analysis
- Technical Problem Solving
Best Practices
Configuration Guidelines
- Task Complexity: Match reasoning type to task complexity
- Sample Count: Use more samples for high-stakes decisions
- Iteration Count: Increase iterations for complex refinement
- Model Selection: Choose appropriate model based on requirements
Quality Assurance
- Consistency Checking: Use self-consistency for critical decisions
- Diverse Perspectives: Leverage reasoning-duo for balanced analysis
- Iterative Improvement: Apply IRE for complex problem-solving
- Validation: Always validate reasoning outputs
Performance Considerations
- Resource Usage: Monitor token usage and costs
- Response Time: Balance quality with response speed
- Scalability: Consider parallel processing for multiple tasks
- Caching: Cache reasoning results when appropriate
Error Handling
- Fallback Logic: Implement fallback to simpler reasoning types
- Timeout Handling: Set appropriate timeouts for long-running tasks
- Result Validation: Validate reasoning outputs for correctness
- Logging: Log reasoning processes for debugging