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

# Orchestrator

> Learn about the Orchestration Agent at the center of the Agentic Framework

The **Orchestrator** is the central intelligence layer of the Corti Agentic Framework. It serves as the primary interface between users and the multi-agent system, coordinating the flow of conversations and tasks.

<Frame>
  <img src="https://mintcdn.com/corti/en_RPjQCFb1qJpbU/images/agent-orchestrator.svg?fit=max&auto=format&n=en_RPjQCFb1qJpbU&q=85&s=74032e26fbdcd2fc7b0c5ea48743185e" alt="Diagram showing guardrails in the agentic framework" width="773" height="507" data-path="images/agent-orchestrator.svg" />
</Frame>

## What the Orchestrator Does

The Orchestrator reasons about incoming requests and determines how to fulfill them by coordinating with specialized [Experts](/agentic/v1/experts). Its core responsibilities include:

* **Reasoning and planning**: Analyzes user requests and determines the necessary steps to complete them
* **Expert selection**: Decides which Expert(s) to call, in what order, and with what data
* **Task decomposition**: Breaks complex requests into discrete tasks that can be handled by individual Experts
* **Response generation**: Aggregates results from Experts and typically generates the final response to the user
* **Context management**: Has full access to the [context](/agentic/v1/context-memory), while Experts typically only have scoped access to relevant portions
* **Safety enforcement**: Enforces guardrails, type validation, and policy-driven constraints to ensure safe operation in clinical environments

The Orchestrator does not perform specialized work itself—instead, it delegates to appropriate Experts and coordinates their activities to accomplish complex workflows.

## Safety Mechanisms

### Max Iterations

The agent loop runs a maximum of 5 iterations by default (configurable per expert). After hitting the limit, it enters `forceFinish` mode, which makes up to 2 additional LLM calls restricted to terminal tools (`complete_tool`, `input_required_tool`, `task_failure_tool`). If those also fail to produce a terminal result, the task fails with "Max attempts reached without a finishing tool call."

### Credit Pre-flight Check

For orchestrator runs, the agent performs a pre-flight credit check before processing. If the metering service reports insufficient credits, the task is immediately rejected with state `rejected` and a message about insufficient credits.

### Expert Invocation Progress

When the orchestrator calls an expert tool, it emits a `Working` status update with the text "Calling expert: \<expert-name>". These intermediate status messages are part of the task's history but are not user-facing. If you are polling for task status, you may see these intermediate working states.

***

<Tip>
  For more information about how the Orchestrator fits into the overall architecture, see [Architecture](/agentic/v1/architecture). To understand how context and memory work, see [Context & Memory](/agentic/v1/context-memory).
</Tip>

<Note>Please [contact us](mailto:help@corti.ai) if you need more information about the Orchestrator in the Corti Agentic Framework.</Note>
