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

# Orchestration

> Learn how MINDBLIX's orchestration engine coordinates multiple agents to solve complex problems.

## Overview

The **Orchestration Engine** is the control plane of MINDBLIX. It handles task decomposition, agent selection, execution scheduling, and result aggregation.

***

## How Orchestration Works

**1. Task Reception**

A complex task arrives via API, webhook, or user interaction.

**2. Decomposition**

The orchestrator breaks the task into subtasks using a planning agent.

**3. Agent Matching**

Each subtask is matched to the best available agent based on specialization and current load.

**4. Execution**

Subtasks are executed — sequentially, in parallel, or conditionally based on the execution plan.

**5. Aggregation**

Results from all subtasks are combined into a coherent final output.

**6. Validation**

The final output is validated against the knowledge graph before delivery.

***

## Orchestration Patterns

### Fan-Out / Fan-In

Distribute work across multiple agents and collect results:

```mermaid theme={null}
graph LR
    A[Task] --> B[Agent 1]
    A --> C[Agent 2]
    A --> D[Agent 3]
    B --> E[Aggregator]
    C --> E
    D --> E
    E --> F[Result]

    style A fill:#9300FF,color:#fff
    style E fill:#6A00B8,color:#fff
```

### Pipeline

Sequential processing where each agent's output feeds the next:

```mermaid theme={null}
graph LR
    A[Input] --> B[Research] --> C[Analysis] --> D[Report] --> E[Output]

    style A fill:#9300FF,color:#fff
    style E fill:#00C853,color:#fff
```

### Supervisor

A supervisor agent oversees and coordinates worker agents:

```mermaid theme={null}
graph TD
    A[Supervisor Agent] --> B[Worker 1]
    A --> C[Worker 2]
    A --> D[Worker 3]
    B --> A
    C --> A
    D --> A
    A --> E[Final Output]

    style A fill:#9300FF,color:#fff
```

***

## Load Balancing

The orchestrator automatically distributes tasks based on:

| Factor | Weight | Description |
| - | - | - |
| Agent Specialization | 40% | Match task type to agent expertise |
| Current Load | 25% | Prefer agents with lower queue depth |
| Historical Performance | 20% | Agents with better track records get priority |
| Cost | 15% | Optimize for token/compute cost |

> [!TIP]
>
> You can override the load balancing strategy by specifying a preferred agent in your workflow definition.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.