Routing
Easy requests to a small model, hard ones to a larger model or a person.
Read more about Routing
Send a simple request to a small cheap model and a hard one to a larger model, or to a person.
Coordination that turns separate model calls, tools and human approvals into one dependable process.
Orchestration sets step order, passes data, keeps state, handles retries and approvals, and logs it all. It sits between fixed workflows and free agents.
AI orchestration is the coordination of several AI and non-AI components into one dependable process. It decides the order of steps, passes data between them, keeps track of state, chooses between models, handles retries and timeouts, pauses for human approval, and logs everything.
It sits between plain workflow automation, where every path is fixed in advance, and a free-running AI agent, where the model decides its own next step. Most business systems need both: fixed rails for the parts that must always happen, and model decisions inside clearly bounded steps.
Easy requests to a small model, hard ones to a larger model or a person.
Send a simple request to a small cheap model and a hard one to a larger model, or to a person.
Models reach APIs and databases through function calling or MCP, with permissions per tool.
Let models call APIs and databases through function calling or the Model Context Protocol, with permissions per tool.
Remembers where a long process stands, so it resumes after a crash or wait.
Remember where a long process is, so it can resume after a crash or a day-long wait for approval.
Retries failed calls, checks output against a schema, and falls back when a provider fails.
Retry failed calls, validate model output against a schema, and fall back when a provider is down.
Logs every prompt, response, tool call, cost and latency so problems can be traced.
Log every prompt, response, tool call, cost and latency so problems can be traced.
Popular choices: n8n for visual workflows with AI nodes, LangGraph for graphs of steps with saved state, Temporal for long processes that survive failures.
Visual platforms such as n8n combine ordinary workflow nodes with AI agent and model nodes. Code frameworks such as LangGraph model a process as a graph of steps with saved state. Durable execution engines such as Temporal keep long-running processes alive across failures. For multi-agent systems, orchestration also covers how agents hand work to each other.
A supplier's quotation PDF arrives by email; the orchestrator stores it and starts a run.
A supplier emails a quotation PDF. The orchestrator stores it and starts a run.
A document model pulls line items into a fixed JSON schema, which gets validated.
A document model pulls line items into a fixed JSON schema; the orchestrator validates the schema.
Last quarter's prices are fetched and an LLM notes the differences.
A tool call fetches last quarter's prices; an LLM writes a short note on differences.
Orders above a set amount wait for a manager, even if that takes a day.
Orders above a set amount wait for a manager in a human in the loop step, which may take a day.
Once approved, a purchase order is created in the ERP and every step is logged.
On approval, a purchase order is created in the ERP and every step's input and output is kept for audit.
Keep fixed steps fixed; give the model freedom only where judgement is needed.
Keep fixed steps fixed. Give the model freedom only where judgement is actually needed.
Without step traces you cannot debug a wrong output or answer an auditor.
Without traces of each step you cannot debug a wrong output or show an auditor what happened.
Restarting from zero after a crash duplicates emails and orders. Make steps resumable.
A process that restarts from zero after a crash duplicates emails and orders. Make steps resumable and idempotent.
No. An agent is one component that decides its own steps toward a goal. Orchestration is the surrounding structure that runs agents, models, tools and people in a controlled order.
Not always. Many business processes fit well in n8n or a similar platform. Code frameworks help when the logic is complex, needs custom state, or must be tested like normal software.
By routing each request to the cheapest model that can handle it, caching repeated work, and stopping runs early when validation fails instead of passing bad data down the line.
Last updated