Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.swarms.world/llms.txt

Use this file to discover all available pages before exploring further.

Reasoning agents are sophisticated agents that employ advanced cognitive strategies to improve problem-solving performance beyond standard language model capabilities. Unlike traditional prompt-based approaches, reasoning agents implement structured methodologies that enable them to think more systematically, self-reflect, collaborate, and iteratively refine their responses. These agents are inspired by cognitive science and human reasoning processes, incorporating techniques such as:
  • Multi-step reasoning: Breaking down complex problems into manageable components
  • Self-reflection: Evaluating and critiquing their own outputs
  • Iterative refinement: Progressively improving solutions through multiple iterations
  • Collaborative thinking: Using multiple reasoning pathways or agent perspectives
  • Memory integration: Learning from past experiences and building knowledge over time
  • Meta-cognitive awareness: Understanding their own thinking processes and limitations

Available Reasoning Agents

Agent NameTypeResearch PaperKey FeaturesBest Use Cases
Self-Consistency AgentConsensus-basedSelf-Consistency Improves Chain of Thought Reasoning (Wang et al., 2022)Multiple independent reasoning paths, majority voting aggregation, concurrent execution, validation modeMathematical problem solving, high-accuracy requirements, decision making
Reasoning DuoCollaborativeNovel dual-agent architectureSeparate reasoning and execution agents, collaborative problem solving, task decomposition, cross-validationComplex analysis tasks, multi-step problem solving, research and planning
IRE AgentIterativeIterative Reflective Expansion frameworkHypothesis generation, path simulation, error reflection, dynamic revisionComplex reasoning tasks, research problems, strategy development
Reflexion AgentSelf-reflectiveReflexion: Language Agents with Verbal Reinforcement Learning (Shinn et al., 2023)Self-evaluation, experience memory, adaptive improvement, learning from failuresContinuous improvement tasks, long-term projects, quality refinement
GKP AgentKnowledge-basedGenerated Knowledge Prompting (Liu et al., 2022)Knowledge generation, multi-perspective reasoning, information synthesisKnowledge-intensive tasks, research questions, fact-based reasoning
Agent JudgeEvaluationAgent-as-a-JudgeQuality assessment, structured evaluation, performance metrics, feedback generationQuality control, output evaluation, performance assessment

Agent Architectures

Self-Consistency Agent

Implements multiple independent reasoning paths with consensus-building to improve response reliability and accuracy through majority voting mechanisms. Use Cases: Mathematical problem solving, high-stakes decision making, answer validation, quality assurance Self-Consistency Agent Guide

Reasoning Duo

Dual-agent collaborative system that separates reasoning and execution phases, enabling specialized analysis and task completion through coordinated agent interaction. Use Cases: Complex analysis tasks, multi-step problem solving, research and planning, verification workflows Reasoning Duo Guide

IRE Agent (Iterative Reflective Expansion)

Sophisticated reasoning framework employing iterative hypothesis generation, simulation, and refinement through continuous cycles of testing and meta-cognitive reflection. Use Cases: Complex reasoning tasks, research problems, strategy development, iterative learning IRE Agent Guide

Reflexion Agent

Advanced self-reflective system implementing actor-evaluator-reflector architecture for continuous improvement through experience-based learning and memory integration. Use Cases: Continuous improvement tasks, long-term projects, adaptive learning, quality refinement Reflexion Agent Guide

GKP Agent (Generated Knowledge Prompting)

Knowledge-driven reasoning system that generates relevant information before answering queries, implementing multi-perspective analysis through coordinated knowledge synthesis. Use Cases: Knowledge-intensive tasks, research questions, fact-based reasoning, information synthesis GKP Agent Guide

Agent Judge

Specialized evaluation system for assessing agent outputs and system performance, providing structured feedback and quality metrics through comprehensive assessment frameworks. Use Cases: Quality control, output evaluation, performance assessment, model comparison Agent Judge Guide

Implementation Guide

Unified Interface via Reasoning Agent Router

The ReasoningAgentRouter provides a centralized interface for accessing all reasoning agent implementations:
from swarms.agents import ReasoningAgentRouter

# Initialize router with specific reasoning strategy
router = ReasoningAgentRouter(
    swarm_type="self-consistency",
    model_name="claude-sonnet-4-6",
    num_samples=5,
    max_loops=3
)

# Execute reasoning process
result = router.run("Analyze the optimal solution for this complex business problem")
print(result)
Reasoning Agent Router Reference

Direct Agent Implementation

from swarms.agents import SelfConsistencyAgent, ReasoningDuo, ReflexionAgent

# Self-Consistency Agent for high-accuracy requirements
consistency_agent = SelfConsistencyAgent(
    model_name="claude-sonnet-4-6",
    num_samples=5
)

# Reasoning Duo for collaborative analysis workflows
duo_agent = ReasoningDuo(
    model_names=["claude-sonnet-4-6", "gpt-5.4"]
)

# Reflexion Agent for adaptive learning scenarios
reflexion_agent = ReflexionAgent(
    model_name="claude-sonnet-4-6",
    max_loops=3,
    memory_capacity=100
)

Choosing the Right Reasoning Agent

ScenarioRecommended AgentWhy?
High-stakes decisionsSelf-ConsistencyMultiple validation paths ensure reliability
Complex research tasksReasoning Duo + GKPCollaboration + knowledge synthesis
Learning & improvementReflexionBuilt-in self-improvement mechanisms
Mathematical problemsSelf-ConsistencyProven effectiveness on logical reasoning
Quality assessmentAgent JudgeSpecialized evaluation capabilities
Iterative refinementIREDesigned for progressive improvement