liveBook · Manning

Agent orchestration

As explained in Context Engineering

Agentic orchestration coordinates an agent's actions, tools, and execution steps toward a task.

Agent orchestration controls multi-step execution in an LLM-based system: it selects the next step, invokes tools or agents, and routes intermediate context between components. Unlike context management, which shapes the context window for one model call, orchestration governs how work progresses across calls. section 7.6 section 7.0

The two layers communicate through runtime state. The orchestrator records the plan, completed steps, and intermediate results; the context manager selects the slice needed for the next invocation and writes back new outputs. Tool calls, retrieved evidence, user feedback, and validation can change both the state and the next decision. section 7.6

Customer support routing

A support assistant can answer a ticket directly, route it through policy validation, or escalate it to a human. The selected path determines which checks and participants receive the current context. section 7.6

Orchestration models differ in where control decisions live. A system can combine models, and a framework can support more than one. section 7.6.1

Four common models are:

  • Imperative: application code invokes agents and tools using conditionals, loops, exceptions, and asynchronous execution. It offers fine-grained control but can become harder to inspect. section 7.6.1
  • Graph-based: nodes perform work, edges define transitions, and state moves through a graph or state machine. Explicit branches, loops, and joins aid testing and debugging, but unplanned paths have less room. section 7.6.1
  • Agent-driven: an LLM coordinator chooses tools, agents, or subtasks and can revise its plan. Its flexibility requires external limits and stop conditions. section 7.6.1
  • Platform-mediated: a platform runtime or design surface controls execution. Assembly can be fast, but the workflow is constrained by what the platform exposes. section 7.6.1
Table 7.1 Comparison of the four orchestration models, by their control logic, the frameworks and platforms that exemplify each one, and the trade-off each one carries
Model Control logic Frameworks and platforms Main trade-off

Imperative

Application code

LangChain, LlamaIndex, Spring AI, Pydantic AI, AI SDK

Fine-grained control, harder to inspect as the system grows

Graph-based

A graph, state machine, or directed execution plan

LangGraph

Explicit transitions, less room for paths nobody planned

Agent-driven

A model deciding the next step

CrewAI, Agent Development Kit, Microsoft Agent Framework, Agno, Parlant, DeepAgents

Flexible, needs budgets and stop conditions enforced outside the model

Platform-mediated

A platform runtime or design surface

Dify, LangFlow, Flowise, Zapier, n8n, Temporal

Fast to assemble, constrained by what the platform exposes

Compare the control logic, representative tools, and trade-offs of the four models. section 7.6.1

Coordination patterns describe the shape of work independently of the orchestration model: sequential pipelines, parallel branches, loops, routers, networks, and hierarchical delegation. Coordination also includes decomposition, dispatch, retries, and result merging. Interoperability protocols provide shared boundaries for exchanging context across agents, applications, editors, and interfaces. section 7.10 section 7.6.2

Coding-agent role decomposition

A software workflow can give planning agents requirements and architecture notes, implementation agents code and tests, and reviewers diffs and failure signals. In the BMAD Method, product management, architecture, development, and review have specialized roles; planning and implementation artifacts preserve their outputs. This structure adds coordination overhead, so it is more useful for cross-functional work than for a small endpoint. section 11.3.9 section 11.5.7 section 11.5.8

For agent-driven execution, enforce tool allowlists, step and cost budgets, timeouts, recursion limits, approval gates, and termination conditions outside the model. Capture execution progress, token usage, tool calls, and retries as telemetry for observing and diagnosing the workflow. section 7.6.1 section 7.6.2

How Context Engineering covers it

How deep it goes
Explains runtime state, four control models, coordination patterns, interoperability, and operational safeguards.
Examples
Illustrates support-ticket routing and coding workflows divided among product, architecture, development, and review roles.
What you can do after
Evaluate orchestration models and coordination overhead, and identify external controls for agent-driven workflows.
How it connects
Connects context management, runtime state, multi-agent coordination, interoperability, and observability.

Also explained in

Compare how 19 books explain agent orchestration →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.