Class: RCrewAI::Process::Hierarchical
- Defined in:
- lib/rcrewai/process.rb
Instance Attribute Summary collapse
-
#hierarchy ⇒ Object
readonly
Returns the value of attribute hierarchy.
-
#manager_agent ⇒ Object
readonly
Returns the value of attribute manager_agent.
Attributes inherited from Base
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(crew) ⇒ Hierarchical
constructor
A new instance of Hierarchical.
Constructor Details
#initialize(crew) ⇒ Hierarchical
Returns a new instance of Hierarchical.
55 56 57 58 59 60 |
# File 'lib/rcrewai/process.rb', line 55 def initialize(crew) super @manager_agent = find_or_create_manager @hierarchy = build_hierarchy validate_hierarchy! end |
Instance Attribute Details
#hierarchy ⇒ Object (readonly)
Returns the value of attribute hierarchy.
53 54 55 |
# File 'lib/rcrewai/process.rb', line 53 def hierarchy @hierarchy end |
#manager_agent ⇒ Object (readonly)
Returns the value of attribute manager_agent.
53 54 55 |
# File 'lib/rcrewai/process.rb', line 53 def manager_agent @manager_agent end |
Instance Method Details
#execute ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/rcrewai/process.rb', line 62 def execute log_execution_start @logger.info "Hierarchical execution with manager: #{manager_agent.name}" # Manager coordinates all execution execution_plan = create_execution_plan results = execute_with_manager(execution_plan) log_execution_end(results) results end |