haive.core.schema.meta_agent_stateΒΆ

Meta agent state for multi-agent coordination.

This module provides a state schema that enables agents to share metadata, coordination information, and workflow state in multi-agent systems.

ClassesΒΆ

AgentExecutionInfo

Information about an agent's execution.

MetaAgentState

Meta state for multi-agent coordination.

Module ContentsΒΆ

class haive.core.schema.meta_agent_state.AgentExecutionInfo(/, **data)[source]ΒΆ

Bases: pydantic.BaseModel

Information about an agent’s execution.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class haive.core.schema.meta_agent_state.MetaAgentState(/, **data)[source]ΒΆ

Bases: haive.core.schema.state_schema.StateSchema

Meta state for multi-agent coordination.

This state provides shared fields for coordinating multiple agents including: - Tracking which agent is currently active - Storing outputs from each agent - Managing workflow metadata - Sharing coordination information

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

get_agent_output(agent_id)[source]ΒΆ

Get the output from a specific agent.

Parameters:

agent_id (str)

Return type:

Any | None

get_shared_context(key, default=None)[source]ΒΆ

Get a value from the shared context.

Parameters:
  • key (str)

  • default (Any)

Return type:

Any

record_agent_completion(agent_id, output)[source]ΒΆ

Record that an agent has completed execution.

Parameters:
  • agent_id (str)

  • output (Any)

Return type:

None

record_agent_error(agent_id, error)[source]ΒΆ

Record that an agent encountered an error.

Parameters:
Return type:

None

record_agent_start(agent_id, agent_name)[source]ΒΆ

Record that an agent has started execution.

Parameters:
  • agent_id (str)

  • agent_name (str)

Return type:

None

set_shared_context(key, value)[source]ΒΆ

Set a value in the shared context.

Parameters:
  • key (str)

  • value (Any)

Return type:

None

signal_stop(reason=None)[source]ΒΆ

Signal that the workflow should stop.

Parameters:

reason (str | None)

Return type:

None

update_workflow_stage(stage, metadata=None)[source]ΒΆ

Update the current workflow stage.

Parameters:
Return type:

None