AI Orchestration: Coordinating Models, Agents, and the App Layer
Most orchestration guides treat "the model" as one abstraction and never name a single one. Real systems route across several, by task and by cost. Here is how model orchestration, agent orchestration, and the app layer actually divide the work.

What is the difference between an LLM and an orchestrator?
An LLM generates and an orchestrator decides. The model takes tokens in and returns tokens out, with no memory of the last call. The orchestrator chooses which model is called, in what order, with what data, what happens when an output fails validation, and where the result goes next. AI orchestration is that decision layer, and once your system calls more than one model, it becomes its own engineering problem.
On Major, the orchestration is software the agent writes down once. The routing rules, escalation thresholds and state live in a deterministic app with a managed database and an audit log, so the model spends its tokens on judgment and the coordination runs the same way every time. The sections below cover what orchestration does, how to route across models, and how to build it on Major.
What AI orchestration does
IBM describes orchestration as software that helps "prompt, chain, manage and monitor large language models," handling prompt engineering, API interaction, data retrieval and state management (IBM). The coordination layer does four jobs.
- Integration: connecting models, tools and data sources so one request can reach all of them.
- Automation: advancing steps without a person pressing a button between each one.
- Management: routing, retries, state and handoffs.
- Governance: enforcing who can do what, and recording what happened.
The IBM explainer names frameworks such as LangChain, LlamaIndex and watsonx Orchestrate. It never names a model you would route between, so readers searching for a routing decision get a framework tour instead. The rest of this piece is about the routing decision.
Model, agent and workflow orchestration
Three different units get coordinated under the same word.
- Model orchestration coordinates inference calls: which tier answers this request, what the fallback is, how many tokens it may spend.
- Agent orchestration coordinates reasoning loops: sequential pipelines, parallel fan-out, handoff to a specialist, or a manager agent that plans and delegates.
- Workflow orchestration coordinates business steps across systems: pull the record, call the model, update the CRM, notify the owner. Most of those steps involve no model at all.
They nest. A workflow step invokes an agent, the agent makes model calls, and model orchestration picks the model for each one. Two architecture mistakes follow from confusing them: buying an agent framework to fix a cost problem that was really about routing, and building a routing layer to fix a reliability problem that was really about workflow state.
How routing across models works
Routing is a per-request decision made in code before the model sees anything. The inputs are task type, data sensitivity, latency budget and what the previous attempt returned. The output is a model identifier.
The most useful pattern is a cascade with a measurable exit condition. Take document classification. A small model runs first and returns a label and a confidence score under a strict schema. If confidence clears the threshold, the result is accepted. If it does not, the same document goes to a frontier model.
Three conditions make that cascade work.
- The small model's output is schema-constrained, so a malformed response is a detectable failure rather than a plausible wrong answer.
- The threshold is chosen from your own labeled data. Any universal number is a guess.
- Every escalation is logged with the document ID, both answers, the confidence score and whether they agreed. That log is how you tune the threshold next quarter.
The cost case for routing is real and smaller than it is usually sold. A cascade that escalates often pays for two inferences on those requests, and it is slower than either model alone. If your p99 latency matters more than your median, a classifier or a rules-based split fits better.
Keep model names out of your architecture. Providers rename tiers and retire models on published schedules, so tier cannot be inferred from a string. If swapping a model takes a code review instead of a config change, the retirement calendar will set your roadmap. Model choice should be a configuration value.
Fallbacks and failure handling
Routing creates a failure surface that single-provider calls never had. Plan for four cases.
- Provider unavailable: fall back to a comparable tier at a different provider, which only works if your prompts are not tuned to one model.
- Response fails validation: retry once on the same model, then escalate a tier. Two failures at one tier is a signal.
- Model refuses or stops early: providers return stop reasons that distinguish a policy refusal from a token cap. Treating them identically retries refusals forever.
- Escalation target is rate limited: queue the request or fail loudly. Silently returning the small model's rejected answer is the worst option, and it is the default in many hand-rolled cascades.
An abstraction layer that normalizes every provider's errors into one generic exception also removes the detail your on-call engineer needs. Normalize the request shape and keep the failure detail.
Where orchestration logic should live
The app layer is deterministic software where work executes and state lives: code, a database, storage and logs. The agent layer is the reasoning that decides what to do. Most orchestration products put the coordination in the agent layer. A planner model decides routing at runtime, holds state in its context window and re-derives the coordination on the next run.
That design works, and it has a cost. The most consequential logic in the system becomes the least inspectable. If routing rules, thresholds and state transitions exist only inside a prompt, nobody can diff them or attribute yesterday's decision to a version of them. The alternative is to let the agent work out the coordination once and write it down as an app.
Build the orchestration layer on Major
Here is how a model-routing workflow looks when the agent builds the app and then steps out of the way. The example is inbound support email triage, with Gmail, Zendesk and Slack as connectors.
- A workflow trigger fires when a new message arrives through the Gmail connector.
- A routing app holds the config tables: which model handles which task type, the confidence threshold, the fallback order. Changing a threshold is a row edit with a history, not a prompt rewrite.
- The app calls the small model first under a strict schema and applies the threshold in code. Only low-confidence cases reach the agent, which reasons about the ambiguous ones.
- Every decision and escalation writes to the app's managed database: message ID, models called, confidence, outcome. That is the table you tune from.
- Results land in Zendesk through a scoped connector credential, and high-risk tickets post to a Slack channel for a person to approve.
- Governance applies at the point of action: scoped credentials per connector, role-based access on the app, and an audit log of what the agent and the app did.
The agent reasons once about how triage should work, builds the app, then runs it. The model keeps the judgment calls, and the repeatable routing stops being regenerated on every execution. Start building free to build this yourself.
When you do not need an orchestration layer
Most teams asking this question do not need one yet. Stay with a single provider when call volume is low enough that nobody questions inference spend, the workload has one shape, you have no data residency constraint, and nobody has produced an evaluation set showing a cheaper model is good enough. That last condition is the real gate. Routing without evaluation is guessing with extra steps.
The signal that you do need it: a specific high-volume task, a measurement showing a cheaper model handles it acceptably, and savings that exceed the cost of maintaining the layer. And no routing strategy rescues a task that no available model does reliably. If the best model is right 70% of the time, routing changes which model is wrong and how much it costs. That is a decomposition or human-review problem.
This piece does not cover agent evaluation or open-weight hosting economics, which deserve their own treatment. Major also does not remove the model. It moves the repeatable coordination into code and leaves the judgment with the model.
Start building on Major
Describe your routing or triage workflow and Major ships it as an app with state, scoped credentials and an audit log, then lets your agent run it without re-reasoning every step. Build it free, or walk through your own workflow with the team.
Related articles
Frequently asked questions
- What is AI orchestration?
- AI orchestration is the coordination layer that decides which model or agent handles a request, in what order, with what data, and what happens to the result. It covers routing, state between calls, output validation, retries and fallbacks, and the handoff into the systems that actually hold the work. Without it you have model calls, not a system. Major treats the orchestration as software the agent writes down: the repeatable steps become a deterministic app the agent runs, so the sequence holds its own state and audit trail rather than being re-reasoned on every request.
- What is the difference between an LLM and an orchestrator?
- An LLM generates and an orchestrator decides. The model takes tokens in and produces tokens out with no memory of the previous call. The orchestrator picks which model is called, in what order, with what data, what happens when a response fails validation, and where the result goes next. Every decision surrounding the generation belongs to the orchestrator. On Major, that surrounding logic lives in the app the agent built, so it is versioned code with a database behind it instead of instructions in a prompt.
- What is an example of an LLM orchestrator?
- An LLM orchestrator is a routing and state layer: it selects a model per request, holds the data between calls, validates outputs, and handles retries and fallbacks. Gateways and agent frameworks each solve one half, with a gateway centralizing provider access and credentials while an agent framework coordinates the reasoning loop. Most production systems use both. Major sits at the app layer above both, since the agent builds the routing and state handling into a deployed application with its own storage, permissions and logs.
- How do I decide which model handles which task?
- Route by task difficulty first: constrained work with a checkable output, such as classification and extraction from known formats, goes to a small fast model, and ambiguous reasoning or planning goes to a frontier model. For anything in between, run a cascade where the cheap model answers with a confidence score and requests below your threshold escalate. Set the threshold from your own labeled data and log every escalation. The cheapest tier is code, and on Major that is where stable steps end up once the agent has reasoned them out once.
- Do I need a model routing layer?
- Probably not yet. A single provider is the right answer when inference cost is not a line item anyone questions, your workload is one shape, you have no data residency constraint, and you have no evaluation set proving a cheaper model is good enough. Build routing when you can name a high-volume task, have measured that a cheaper model handles it, and the maintenance cost is worth the saving. Major is aimed at the same threshold, because there is nothing to turn into an app until a workflow runs often enough to be worth writing down.
- What is the difference between AI orchestration and ML orchestration?
- ML orchestration runs the model lifecycle, covering training pipelines, datasets, deployment and monitoring in the MLOps world of tools like Airflow and Kubeflow. AI orchestration coordinates models, agents and business systems at runtime to get work done. One ships and maintains the models. The other puts them to work alongside everything else in the business. Major operates on the runtime side, where the agent builds an app that carries the coordination and keeps the state and audit for each run.