Skip to main content
The Redundant Pattern is a reliability-focused approach where multiple agents tackle the same task using different methodologies, with their results evaluated to select the best outcome or synthesize a superior solution. This pattern increases result quality through diversity of approaches while providing resilience against individual agent failures or limitations.

Key Characteristics

Redundant Pattern The Redundant Pattern employs multiple specialized agents to process the same input independently, creating a system that can leverage diverse strengths and mitigate weaknesses through redundancy and evaluation.
  • Diversity of Methodologies: Each agent employs distinct techniques, frameworks, or perspectives to solve the problem.
  • Comprehensive Evaluation: Results undergo thorough assessment against domain-appropriate criteria.
  • Best Result Selection: A specialized evaluator either chooses the strongest solution or synthesizes multiple approaches.
  • Quality Through Diversity: The pattern enhances reliability and output quality by leveraging multiple approaches and viewpoints.

Information Flow

Redundant Flow Pattern In the Redundant Pattern, information flows through a coordinated multi-branch process that enables independent processing followed by comparative evaluation, ensuring optimal outcomes through methodological diversity.
  • Dispatch Phase: A central coordinator distributes the same task to multiple specialized agents through an isolated nested chat where each agent has access to only the task message.
  • Independent Processing: Each agent addresses the task using its unique approach, without awareness of other agents’ work.
  • Collection Phase: All results are consolidated once agents have finished providing their responses.
  • Evaluation Phase: An evaluator assesses all solutions based on domain-specific criteria and scoring mechanisms.
  • Selection or Synthesis: The evaluator either selects the best individual solution or creates a composite result combining strengths from multiple approaches.

Implementation

Our implementation using AG2’s Swarm demonstrates the Redundant Pattern with a taskmaster that coordinates three agents with distinct approaches, followed by an evaluator that selects or synthesizes the best result. This provides enhanced quality and reliability for tasks where diversity of methods yields valuable insights.
  • Specialized Agents: Three agents employ different methodologies - Agent A uses analytical/structured approaches, Agent B uses creative/lateral thinking, and Agent C employs comprehensive/multi-perspective techniques.
  • Nested Chat: By using a nested chat, the agents can be isolated from the information in the broader orchestration, allowing only the task to be provided to them to respond to.
  • Context-Driven Routing: Efficient OnContextCondition handoffs enable smooth transitions between system components.
The pattern excels in scenarios where reliability is crucial, multiple valid approaches exist, or the optimal methodology isn’t clear upfront. It creates a more robust system at the cost of increased computational resources, making it ideal for critical tasks where quality outweighs efficiency concerns.

Agent Flow

Code

In this code example we use OpenAI’s GPT-4o mini with structured outputs.We also set the LLM parameter parallel_tool_calls to False so that our agents don’t recommend more than one tool call at a time. This parameter may not be available with all model providers.

Output