Class: RCrewAI::Process::Consensual

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

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



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/rcrewai/process.rb', line 377

def execute
  log_execution_start
  @logger.info 'Consensual execution - agents collaborate on decisions'

  # For now, implement as enhanced sequential with collaboration
  # Full consensual process would involve agent voting/discussion
  results = []

  crew.tasks.each do |task|
    @logger.info "Collaborative execution of task: #{task.name}"

    # Simple consensus: let multiple agents provide input
    consensus_result = execute_with_consensus(task)
    results << consensus_result
  end

  log_execution_end(results)
  results
end