haive.core.graph.node.multi_agent_node¶

Multi-agent node with hierarchical state projection.

This module provides node configurations for multi-agent systems that properly handle state projection between the container state and individual agent states.

Classes¶

MultiAgentNode

Node for executing agents within a multi-agent state container.

StateProjectionNode

Generic state projection node for any schema transformation.

Functions¶

create_multi_agent_node(agent_name[, name])

Create a multi-agent node for executing an agent from MultiAgentState.

create_projection_node(input_schema, output_schema[, name])

Create a state projection node.

Module Contents¶

class haive.core.graph.node.multi_agent_node.MultiAgentNode¶

Bases: haive.core.graph.node.base_node_config.BaseNodeConfig[haive.core.schema.prebuilt.multi_agent_state.MultiAgentState, haive.core.schema.prebuilt.multi_agent_state.MultiAgentState]

Node for executing agents within a multi-agent state container.

This node handles: - State projection from MultiAgentState to agent-specific schema - Agent execution with its expected state type - State updates back to the container - Recompilation tracking

The key innovation is that each agent receives its exact expected state schema, not a flattened global state.

validate_config()¶

Validate node configuration.

Return type:

Self

class haive.core.graph.node.multi_agent_node.StateProjectionNode¶

Bases: haive.core.graph.node.base_node_config.BaseNodeConfig[TInput, TOutput]

Generic state projection node for any schema transformation.

This node can project from any input schema to any output schema, useful for bridging between different state representations.

haive.core.graph.node.multi_agent_node.create_multi_agent_node(agent_name, name=None, **kwargs)¶

Create a multi-agent node for executing an agent from MultiAgentState.

Parameters:
  • agent_name (str)

  • name (Optional[str])

Return type:

MultiAgentNode

haive.core.graph.node.multi_agent_node.create_projection_node(input_schema, output_schema, name=None, **kwargs)¶

Create a state projection node.

Parameters:
  • input_schema (type[pydantic.BaseModel])

  • output_schema (type[pydantic.BaseModel])

  • name (Optional[str])

Return type:

StateProjectionNode