agents.reasoning_and_critique.self_discover.self_discover_multiagent

Self-Discover Agent using the unified MultiAgent implementation.

This implementation demonstrates how to use the new MultiAgent class to create a sophisticated reasoning system that follows the Self-Discover methodology: 1. Select relevant reasoning modules 2. Adapt modules to the specific task 3. Structure a step-by-step plan 4. Execute the reasoning plan

This showcases sequential execution with the unified MultiAgent.

Classes

SelfDiscoverMultiAgentState

State schema for the Self-Discover multi-agent workflow.

Functions

create_adapter_agent()

Create the module adapter agent.

create_reasoner_agent()

Create the reasoning execution agent.

create_selector_agent()

Create the module selector agent.

create_self_discover_multiagent([name, reasoning_modules])

Create a Self-Discover system using MultiAgent.

create_self_discover_with_conditional_routing()

Create Self-Discover with conditional routing for demonstration.

create_structurer_agent()

Create the reasoning structure agent.

get_default_reasoning_modules()

Get the default set of reasoning modules.

run_self_discover_example()

Run an example of the Self-Discover multi-agent system.

Module Contents

class agents.reasoning_and_critique.self_discover.self_discover_multiagent.SelfDiscoverMultiAgentState(/, **data)

Bases: haive.core.schema.StateSchema

State schema for the Self-Discover multi-agent workflow.

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)

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_adapter_agent()

Create the module adapter agent.

Return type:

haive.agents.simple.SimpleAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_reasoner_agent()

Create the reasoning execution agent.

Return type:

haive.agents.simple.SimpleAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_selector_agent()

Create the module selector agent.

Return type:

haive.agents.simple.SimpleAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_self_discover_multiagent(name='self_discover_system', reasoning_modules=None)

Create a Self-Discover system using MultiAgent.

This demonstrates sequential execution with the unified MultiAgent implementation.

Parameters:
  • name (str) – Name for the multi-agent system

  • reasoning_modules (list[str] | None) – Optional custom reasoning modules

Returns:

MultiAgent configured for Self-Discover workflow

Return type:

haive.agents.multi.agent.MultiAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_self_discover_with_conditional_routing()

Create Self-Discover with conditional routing for demonstration.

This shows how you could add conditional logic if needed, though sequential execution is sufficient for Self-Discover.

Return type:

haive.agents.multi.agent.MultiAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.create_structurer_agent()

Create the reasoning structure agent.

Return type:

haive.agents.simple.SimpleAgent

agents.reasoning_and_critique.self_discover.self_discover_multiagent.get_default_reasoning_modules()

Get the default set of reasoning modules.

Return type:

list[str]

async agents.reasoning_and_critique.self_discover.self_discover_multiagent.run_self_discover_example()

Run an example of the Self-Discover multi-agent system.