> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beam.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-Agent Collaboration

> Enable agents to call other agents for complex workflow orchestration and specialized task delegation

Multi-agent collaboration allows one agent to trigger another agent within a workflow, enabling orchestration where specialized agents handle specific tasks while a coordinator manages the overall process.

## Understanding Multi-Agent Systems

Rather than building monolithic agents that handle everything, create specialized agents that excel at specific tasks and coordinate them through agent-to-agent communication.

<CardGroup cols={2}>
  <Card title="Specialization" icon="user-gear">
    Build focused agents optimized for specific domains or tasks
  </Card>

  <Card title="Reusability" icon="recycle">
    Use the same specialized agents across multiple workflows
  </Card>

  <Card title="Modularity" icon="cubes">
    Update individual agents without affecting the entire system
  </Card>

  <Card title="Orchestration" icon="diagram-project">
    Coordinate complex processes with clear separation of concerns
  </Card>
</CardGroup>

## How Agent Triggering Works

Agents trigger other agents using the **"Trigger Agent Task"** tool within workflow nodes.

<Frame>
  <img src="https://mintcdn.com/beamai/19PRqq2Lu11IakoJ/02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot%202025-11-07%20at%2020.52.05.png?fit=max&auto=format&n=19PRqq2Lu11IakoJ&q=85&s=b48d7ad446f44ce8d08b1380b30ea346" alt="Flow with Trigger Agent Task node" width="2900" height="1562" data-path="02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot 2025-11-07 at 20.52.05.png" />
</Frame>

**The Process:**

1. Parent agent reaches a node with "Trigger Agent Task"
2. Payload data is passed to the target agent
3. Target agent executes its workflow
4. Result is returned to parent agent
5. Parent agent continues execution

## Triggering Agents from Workflows

<Steps>
  <Step title="Add Node to Flow">
    Add a new node where you want to trigger another agent
  </Step>

  <Step title="Select Trigger Agent Task Tool">
    Choose **"Trigger Agent Task"** from the tool selector

    <Frame>
      <img src="https://mintcdn.com/beamai/19PRqq2Lu11IakoJ/02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot%202025-11-07%20at%2020.52.26.png?fit=max&auto=format&n=19PRqq2Lu11IakoJ&q=85&s=f007e428c7f88c886f89eeae841689a0" alt="Trigger Agent Task tool configuration" width="878" height="1414" data-path="02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot 2025-11-07 at 20.52.26.png" />
    </Frame>
  </Step>

  <Step title="Configure Agent Name">
    Specify which agent to trigger:

    **Static Configuration:**

    * Hardcode agent name: "Demo: Email Triage Agent"
    * Best for fixed orchestration

    **Dynamic Configuration:**

    * Agent name from previous node output
    * Enables conditional routing to different agents
  </Step>

  <Step title="Configure Payload">
    Define what data to send to the target agent:

    <Frame>
      <img src="https://mintcdn.com/beamai/19PRqq2Lu11IakoJ/02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot%202025-11-07%20at%2020.53.00.png?fit=max&auto=format&n=19PRqq2Lu11IakoJ&q=85&s=8e9178ef67d555ecdc00531df3f62b26" alt="Payload configuration with linked variables" width="868" height="1444" data-path="02-building-agents/advanced-patterns/multi-agent-collaboration/Screenshot 2025-11-07 at 20.53.00.png" />
    </Frame>

    **Payload Variable:**

    * Use "Linked" to pass data from previous nodes
    * Example: `${query_filter.CleanedConversation}`
    * The payload becomes the `task_query` input for the target agent
  </Step>

  <Step title="Handle Agent Output">
    The triggered agent returns its result

    **Access results:**

    ```
    ${trigger_node.output_variable}
    ```

    Output structure depends on the target agent's configuration
  </Step>
</Steps>

## Tool Execution Modes

**Fully Automated:**

* Agent triggers automatically
* Best for trusted collaborations
* Fastest execution

**Consent Required:**

* Pauses for user approval before triggering
* Best for critical operations or testing
* Shows what data will be sent

## Troubleshooting

<AccordionGroup>
  <Accordion title="Agent Not Found">
    **Error:** "Agent '{name}' not found"

    **Solutions:**

    * Verify exact agent name (case-sensitive)
    * Check agent exists and is published
    * Update configuration if agent renamed
  </Accordion>

  <Accordion title="Payload Not Received">
    **Issue:** Target agent doesn't receive expected data

    **Solutions:**

    * Verify previous node outputs contain data
    * Check variable names match exactly
    * Review target agent's expected input format
  </Accordion>

  <Accordion title="Circular Dependencies">
    **Issue:** Agent A triggers Agent B which triggers Agent A

    **Solutions:**

    * Add recursion depth tracking in payload
    * Implement max iteration limits
    * Redesign to avoid circular dependencies
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Publishing & Deployment" icon="rocket" href="/02-building-agents/advanced-patterns/publishing-deployment/publishing-deployment">
    Deploy multi-agent systems to production
  </Card>

  <Card title="Creating Flows" icon="diagram-project" href="/02-building-agents/agent-fundamentals/flow-configuration/flow-configuration">
    Learn advanced flow patterns for orchestration
  </Card>

  <Card title="Variables & State" icon="arrow-right-arrow-left" href="/02-building-agents/agent-configuration/variables-state/variables-state">
    Understand data passing between agents
  </Card>

  <Card title="Structured Outputs" icon="code" href="/02-building-agents/agent-configuration/structured-outputs/structured-outputs">
    Design output schemas for agent responses
  </Card>
</CardGroup>
