Skip to main content
The ReasoningAgentRouter enables dynamic selection and execution of different reasoning strategies based on task requirements. It provides a flexible interface to work with multiple reasoning approaches.

Architecture

Parameters

Available Agent Types

The following values are supported for the swarm_type parameter:
  • "reasoning-duo" or "reasoning-agent"
  • "self-consistency" or "consistency-agent"
  • "ire" or "ire-agent"
  • "ReflexionAgent"
  • "GKPAgent"
  • "AgentJudge"

Methods

Examples

Basic Usage

Self-Consistency with Evaluation

ReasoningDuo with Image Support

GKP Agent

Reflexion Agent

Choosing the Right Type

Best Practices

  1. Swarm Type Selection: Match the reasoning strategy to your task requirements
  2. Performance: Adjust max_loops and num_samples based on task complexity
  3. Self-Consistency: Use 3-5 samples for most tasks, 7+ for critical decisions
  4. Multi-modal: Use vision-capable models when processing images
  5. ReasoningDuo: Set different models for reasoning vs execution via reasoning_model_name