Class: RCrewAI::Process::Consensual

Inherits:
Base
  • Object
show all
Defined in:
lib/rcrewai/process.rb

Overview

Multi-agent consensus: for each task, several agents propose candidate answers, all participants score each candidate, and the highest-scored candidate wins (ties break toward the task's assigned agent).

Constant Summary collapse

DEFAULT_CONSENSUS_AGENTS =
3

Instance Attribute Summary

Attributes inherited from Base

#crew, #logger

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RCrewAI::Process::Base

Instance Method Details

#executeObject



382
383
384
385
386
387
388
# File 'lib/rcrewai/process.rb', line 382

def execute
  log_execution_start
  @logger.info 'Consensual execution - agents propose, vote, and pick'
  results = crew.tasks.map { |task| execute_with_consensus(task) }
  log_execution_end(results)
  results
end