agents.planning.p_and_e.enhanced_multi_agentยถ
Enhanced Multi-Agent Base for Plan and Execute patterns.
This module provides an enhanced version of MultiAgent that allows for cleaner configuration with agents, state schema, and branches passed directly.
Classesยถ
Enhanced MultiAgent that accepts agents, state schema, and branches directly. |
|
Plan and Execute multi-agent using enhanced base. |
Module Contentsยถ
- class agents.planning.p_and_e.enhanced_multi_agent.EnhancedMultiAgent(agents, state_schema=None, branches=None, schema_composition_method='smart', execution_mode='conditional', **kwargs)ยถ
Bases:
haive.agents.multi.base.MultiAgent
Enhanced MultiAgent that accepts agents, state schema, and branches directly.
Initialize enhanced multi-agent with direct configuration.
- Parameters:
agents (list[Any]) โ List of agents to orchestrate
state_schema (type[haive.core.schema.state_schema.StateSchema] | None) โ Optional state schema override
branches (dict[str, dict[str, Any]] | None) โ Branch configuration for conditional routing
schema_composition_method (str) โ How to compose schemas (โsmartโ, โsharedโ, โnamespacedโ)
execution_mode (str) โ Execution pattern
**kwargs โ Additional MultiAgent arguments
- setup_multi_agent()ยถ
Override to use state schema override if provided.
- Return type:
- class agents.planning.p_and_e.enhanced_multi_agent.PlanAndExecuteMultiAgent(agents, state_schema=None, **kwargs)ยถ
Bases:
EnhancedMultiAgent
Plan and Execute multi-agent using enhanced base.
Initialize Plan and Execute multi-agent.
- Parameters:
- build_custom_graph(graph)ยถ
Build the Plan and Execute workflow graph.
- Parameters:
graph (haive.core.graph.state_graph.base_graph2.BaseGraph)
- Return type:
haive.core.graph.state_graph.base_graph2.BaseGraph