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.

The short answer
Generative AI model orchestration is the layer that decides which model handles a given call, what data that call receives, what order calls run in, and what happens when one of them fails. Workflow orchestration coordinates steps. Model orchestration coordinates models. Once your system calls more than one model, the two stop being the same problem.
The canonical explainer on this topic is IBM's, and it is careful, accurate, and completely silent on the question most readers arrive with. It names LangChain, LlamaIndex, watsonx Orchestrate, and LangFlow. It does not name a single model you would actually route between. Someone searching for model orchestration gets handed a Python framework instead of a routing decision.
This piece is about the routing decision.
What AI orchestration actually is
IBM defines the practice as software that "helps prompt, chain, manage and monitor large language models," driven by orchestration frameworks that handle "prompt engineering, API interaction, data retrieval and state management across conversations with language models" (ibm.com/think/topics/llm-orchestration). That holds up. The coordination layer does four jobs.
Integration. Connecting models, tools, and data sources so a single request can reach all of them.
Automation. Advancing steps without a human pressing a button between each one.
Management. Routing, retries, state, and handoffs.
Governance. Enforcing who can do what, and writing down what happened.
A typical run looks the same everywhere. A trigger starts it. A planner decides the steps. The system calls models, APIs, and data stores, validates each result, retries or reroutes around failures, and writes an audit trail. The orchestration layer owns routing and state. The model is one tool it calls.
That last sentence is where most implementations quietly diverge from the diagram, and we will come back to it.
Model orchestration versus agent orchestration versus workflow orchestration
Here is the direct answer to the question people actually type: an LLM generates, and an orchestrator decides. The model takes tokens in and produces tokens out. The orchestrator decides which model is called, in what order, with what context, what to do when the output fails validation, and where the result goes next. The model has no memory of the last call and no opinion about the next one. Every decision surrounding the generation belongs to the orchestrator.
The three orchestration flavors coordinate three different units.
Model orchestration coordinates models. Which tier handles this request, what the fallback is, how many tokens it may spend. The unit of work is an inference call.
Agent orchestration coordinates agents. Sequential pipelines, parallel fan-out, deliberation, handoff to a specialist, or a manager agent that plans and delegates. The unit of work is a reasoning loop that may make many model calls of its own. If you are designing at this level, agentic workflow patterns is the deeper treatment.
Workflow orchestration coordinates steps across systems. Pull the record, call the model, update the CRM, notify the owner. The unit of work is a business step, and most of those steps involve no model at all.
These nest. A workflow step invokes an agent, the agent makes several model calls, and model orchestration decides which model serves each one. Confusing them produces the two most common architecture mistakes we see: buying an agent framework to solve a cost problem that was really about routing, and building a routing layer to solve a reliability problem that was really about workflow state.
Routing across models: how it actually works
Routing is a decision made per request, in code, before the model sees anything. The inputs are the task type, the sensitivity of the data, the latency budget, and whatever the last attempt told you. The output is a model identifier.
Here is a concrete starting table. Model names below are current as of August 2026 and taken from provider documentation, which is the only place worth taking them from.
- Classification, labeling, routing tickets Model tier: Small and fast · Named example models: Claude Haiku 4.5, GPT-5.6 Luna, Gemini 3.5 Flash Lite · Why this tier: High volume, constrained output space, schema-checkable results · Escalation trigger: Confidence below threshold, or schema validation failure
- Extraction from known-format documents Model tier: Small and fast · Named example models: Claude Haiku 4.5, GPT-5.6 Luna · Why this tier: The structure is fixed, so the work is pattern matching · Escalation trigger: Required field missing after two attempts
- Extraction from messy or varied documents Model tier: Mid · Named example models: Claude Sonnet 5, GPT-5.6 Terra, Gemini 3.7 Flash · Why this tier: Layout varies enough that the model must interpret, not just match · Escalation trigger: Cross-field consistency check fails
- Ambiguous reasoning, judgment calls, planning Model tier: Frontier · Named example models: Claude Opus 4.8, GPT-5.6 Sol, Gemini 3.1 Pro (preview) · Why this tier: The task has no single correct decomposition · Escalation trigger: No escalation path above this. Route to a human
- Long-horizon agentic execution Model tier: Frontier · Named example models: Claude Opus 4.8, GPT-5.6 Sol · Why this tier: Sustained coherence across many tool calls is the differentiator · Escalation trigger: Step budget exhausted, hand off to a person
- Bulk processing under data residency constraints Model tier: Open-weight, self-hosted · Named example models: gpt-oss-120b, Qwen3.8-27B, DeepSeek-V4-Flash · Why this tier: Weights run inside your boundary · Escalation trigger: Quality gate fails, escalate to a hosted tier only if policy permits
Two things about that table are worth flagging. Google's Flash line now spans several tiers rather than marking the cheap one: gemini-3.7-flash is the most capable stable Flash model, Flash-Lite sits below it, and the newest Pro model, gemini-3.1-pro-preview, is preview while gemini-2.5-pro remains the stable Pro option (ai.google.dev/gemini-api/docs/models). And OpenAI's Sol, Terra, and Luna suffixes replaced the old flagship, mini, and nano scheme, so tier is no longer inferable from the name (developers.openai.com/api/docs/models). Any routing config that encodes tier by string matching on the model name is already broken.
Route by task difficulty
The useful version of this is a cascade with a measurable exit condition. Take document classification. The cheap model runs first and returns a label plus a confidence score under a strict schema. If confidence clears the threshold, the result is accepted and the request is done. If it does not, the same document goes to a frontier model, and the frontier result is accepted.
Pick the threshold from your own labeled data. Start at the point where the cheap model's accuracy on accepted results matches what you would have gotten from routing everything to the frontier model, then watch the escalation rate. The number itself is workload-specific and anyone who quotes you a universal one is guessing. What matters is that the threshold is a value in code with a name, not a judgment made fresh inside a prompt each time.
Two things have to be true for the cascade to work. The cheap model's output must be schema-constrained, so a malformed response is a detectable failure rather than a plausible-looking wrong answer. And every escalation must be logged with the document ID, the cheap model's answer, its confidence, the frontier model's answer, and whether they agreed. That log is how you tune the threshold next quarter. Without it you are running a cascade you cannot evaluate.
Where those two artifacts live is the question the rest of this article is about.
Route by cost and latency
The cost argument for routing is real and smaller than it is usually sold. Moving a request from a frontier tier to a small tier reduces the price of that inference. It does not reduce the number of inferences, and cascades add inferences, because an escalated request pays for both attempts. A cascade that escalates 40% of the time is not cheap.
Latency behaves differently. A small model answering directly is faster than a frontier model answering directly, and a cascade that escalates is slower than either. If your p99 matters more than your median, cascades are the wrong shape and a classifier or a rules-based split is better. Routing strategies and their limits covers the four production approaches and where each one breaks.
Avoid encoding current prices into your architecture. Provider pricing moves, tiers get renamed, and models retire on published schedules. OpenAI's deprecation page currently lists gpt-4o-2024-05-13, o1, o3-mini, gpt-5-mini, and a dozen others with dated shutdowns (developers.openai.com/api/docs/deprecations). Google retired the entire Gemini 2.0 line in June 2026. If swapping a model in your system requires a code review rather than a config change, the retirement calendar is going to set your roadmap for you.
Open-weight and self-hosted options
Open weights earn their place when data residency, air-gapped deployment, or predictable unit economics at very high volume outweigh raw capability. The current field is genuinely strong: gpt-oss-120b and gpt-oss-20b under Apache 2.0 (developers.openai.com/api/docs/models/gpt-oss-120b), Qwen3.8-27B under Apache 2.0, DeepSeek-V4-Flash and GLM-5.2 under MIT, and Mistral's Small 4 and Ministral 3 families.
Read the license per model rather than per family. Qwen3.8-27B is Apache 2.0 while the much larger Qwen3.8-2.4T-A95B ships under a custom license, and treating the whole family as uniformly permissive is a legal review waiting to happen. One more note for anyone whose reference architecture still leads with Llama: Meta has not shipped a new open-weight Llama release since Llama 4 in April 2025, and its 2026 flagship is proprietary. Diagrams age faster than they look.
Self-hosting also moves work onto your team. You now own capacity planning, GPU utilization, model updates, and the evaluation suite that tells you when a new checkpoint regressed. That is a real operating cost, and it is the reason most organizations that could self-host do not.
Fallback tiers and failure handling
Routing introduces a failure surface that did not exist when you called one provider directly. Plan for four cases.
Provider unavailable. Fall back to a different provider at a comparable tier. This only works if your prompts are not tuned so tightly to one model that the alternative produces garbage.
Response fails validation. Retry once against the same model, then escalate a tier. Two failures at the same tier is a signal, not noise.
Model refuses or stops early. Providers now return structured stop reasons distinguishing a policy refusal from hitting a token cap (platform.claude.com/docs/en/about-claude/models/overview). These require different handling, and code that treats every non-normal completion identically will retry refusals forever.
The escalation target is also rate limited. Queue, or fail loudly. Silently returning the cheap model's rejected answer is the worst option available and it is what happens by default in most hand-rolled cascades.
Here is the second position worth stating plainly: an abstraction layer that hides differences between models also hides the failure modes you need to see. A gateway that normalizes every provider's errors into one generic exception has removed exactly the information your on-call engineer needs at 3am. Normalize the request shape. Keep the failure detail.
The app layer and the agent layer
Two definitions, because the industry uses these terms loosely and the distinction decides whether your orchestration is governable.
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, which model to call, and when to escalate. The distinction matters for a practical reason: it determines where agent work runs, and therefore what you can inspect after the fact.
Orchestration is almost always sold as an agent-layer concern. A planner model decides the routing at runtime, holds the state in its context window, and re-derives the whole coordination on the next execution. That is a working design and it has a specific structural cost. The most important logic in your system becomes the least inspectable part of it. If the routing rules, the escalation threshold, and the state transitions exist only inside a prompt, nobody can review them, diff them, or attribute yesterday's decision to a specific version of them.
The stronger version is to let the agent work out the coordination once and then write it down as an app. The routing table becomes a config table in a database. The confidence threshold becomes a named constant with a change history. The escalation log becomes rows you can query. The model still handles the judgment calls it is genuinely needed for, and it stops re-deriving the parts that were settled months ago.
Practitioners keep arriving at this independently. A well-upvoted r/LLMDevs thread this year is titled "We stopped trying to make our agents deterministic and made the orchestration deterministic instead." That is the same conclusion from the other direction.
When you do not need an orchestration layer
Most teams asking this question do not need one yet, and building one early creates an abstraction that costs more to maintain than the spend it saves.
Stay with a single provider when your call volume is low enough that inference is not a line item anyone questions, when your workload is one shape rather than several, when you have no data residency constraint, and when nobody has yet produced an evaluation set that would tell you whether a cheaper model is good enough. That last condition is the real gate. Routing without evaluation is guessing with extra steps, because you cannot tell a successful downgrade from a quality regression you have not measured yet.
The honest signal that you need routing: you can point at a specific high-volume task, you have measured that a cheaper model handles it acceptably, and the savings exceed the cost of maintaining the layer. Until all three are true, one provider and a good evaluation set beat a routing layer.
And no routing strategy rescues a task that no available model does reliably. If the frontier tier gets it right 70% of the time, routing changes which model is wrong and how much being wrong costs. It does not change the number. That is a decomposition problem or a human-in-the-loop problem, and dressing it up as an orchestration problem delays the fix.
The differences that matter
- Unit coordinated Model orchestration: Inference calls across models · Agent orchestration: Autonomous agents · Workflow orchestration: Steps across systems
- Core decision Model orchestration: Which model, at what cost, with what fallback · Agent orchestration: Which agent, in what pattern, with what shared goal · Workflow orchestration: Which step runs next, on what trigger
- Where state lives Model orchestration: Usually stateless per call · Agent orchestration: Shared context across agents · Workflow orchestration: A durable workflow store
- Governance locus Model orchestration: The gateway or routing layer · Agent orchestration: Per agent plus the coordinator · Workflow orchestration: The workflow engine
- Typical owner Model orchestration: Platform engineering · Agent orchestration: AI or agent engineering · Workflow orchestration: Operations and business systems
- Fails by Model orchestration: Routing to a model that cannot do the task · Agent orchestration: Re-deriving coordination on every run · Workflow orchestration: Steps that cannot resume after a failure
Most production systems run all three, owned by different teams. That is workable as long as governance is consistent across them, which means policy to implementation has to survive the handoff between layers rather than being re-invented at each one.
The Major take
Orchestration is sold as runtime coordination, which means the coordination logic is regenerated by a model on every execution. We think that is the wrong default, for a reason that has nothing to do with model quality. Coordination logic is the most consequential code in an agentic system and the part that changes least often. Regenerating it every run pays the full cost of reasoning to reproduce a decision that was already made, and leaves nothing behind that an auditor, a reviewer, or next quarter's engineer can read.
On Major, when an agent works out how coordination should go, it builds an app for it. The routing rules and escalation thresholds become code. The state lives in a managed database. Every decision writes to a log, with scoped credentials and role-based access applied at the point where the agent acts, which is what makes control at the point of action structural rather than procedural. The model keeps the judgment calls. The coordination stops being re-derived. Reason once, run forever.
Two limits, stated plainly. Major is not a model gateway and does not sell inference routing, so nothing here brokers your calls or negotiates your provider contracts. Use a gateway for that, and read this as an argument about where coordination should live rather than about who should carry the packets. And moving coordination into an app relocates the repeatable part of reasoning. It does not remove reasoning. Agents still decide, still escalate, and still get things wrong; they just do it against rules you can read.
Orchestration you can read is orchestration you can govern. That is the whole claim.
If you want to see what it looks like when the routing rules and the escalation log live in a real app instead of a prompt, see how Major's agents build the app layer they run on.
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.