agents.multi.simple.agent

Simple Multi-Agent implementation for basic multi-agent coordination.

This module provides a simplified multi-agent system that focuses on ease of use and straightforward coordination patterns without complex orchestration.

Classes

SimpleMultiAgent

Simplified multi-agent system using MultiAgent.

Functions

create_simple_conditional(*agents[, name])

Create a simple conditional multi-agent using enhanced pattern.

create_simple_parallel(*agents[, name])

Create a simple parallel multi-agent using enhanced pattern.

create_simple_sequential(*agents[, name])

Create a simple sequential multi-agent using enhanced pattern.

Module Contents

class agents.multi.simple.agent.SimpleMultiAgent

Bases: haive.agents.multi.agent.MultiAgent

Simplified multi-agent system using MultiAgent.

This class provides a simplified interface to MultiAgent with common defaults and simplified configuration. Perfect for simple workflows and quick prototyping using the enhanced base agent pattern.

Examples

Basic sequential execution:

from haive.agents.simple.agent import SimpleAgent
from haive.agents.react.agent import ReactAgent

agents = [
    ReactAgent(name="analyzer", tools=[...]),
    SimpleAgent(name="formatter")
]

simple_multi = SimpleMultiAgent(
    name="simple_workflow",
    agents=agents,
    execution_mode="sequential"
)

result = await simple_multi.arun("Process this input")

Parallel execution:

simple_multi = SimpleMultiAgent(
    name="parallel_workflow",
    agents=agents,
    execution_mode="parallel"
)
model_post_init(__context)

Initialize with simplified defaults.

Parameters:

__context (Any)

Return type:

None

setup_simple_workflow()

Set up the simple multi-agent workflow with enhanced features.

Return type:

None

agents.multi.simple.agent.create_simple_conditional(*agents, name='simple_conditional')

Create a simple conditional multi-agent using enhanced pattern.

Parameters:
  • agents (haive.core.engine.agent.Agent)

  • name (str)

Return type:

SimpleMultiAgent

agents.multi.simple.agent.create_simple_parallel(*agents, name='simple_parallel')

Create a simple parallel multi-agent using enhanced pattern.

Parameters:
  • agents (haive.core.engine.agent.Agent)

  • name (str)

Return type:

SimpleMultiAgent

agents.multi.simple.agent.create_simple_sequential(*agents, name='simple_sequential')

Create a simple sequential multi-agent using enhanced pattern.

Parameters:
  • agents (haive.core.engine.agent.Agent)

  • name (str)

Return type:

SimpleMultiAgent