Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration | |||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
The expectation gapWhen a team says "we're building agents," two very different pictures are usually in the room. The engineering picture is a workflow with LLM calls in it. There is a DAG. Node 3 extracts entities, node 4 classifies them, node 5 writes a summary. The LLM is a smarter The stakeholder picture is an employee. You hand it a goal — "reconcile last month's vendor invoices and flag anything that looks wrong" — and it figures out the rest. It discovers that three invoices are in a different currency, decides on its own to pull the FX rates, notices the PDF parser choked on a scanned document, and routes that one to a human instead of guessing. The gap between those two pictures is the whole problem. The first is orchestration of LLM calls. The second is orchestration by an LLM. Moving from one to the other is not a matter of adding a The rest of this post covers what that architecture looks like, the failure modes that show up the moment you leave the demo environment, and the design patterns that make autonomous behavior survivable in production.
DAG = Directed Acyclic Graph - a structural concept commonly used in mathematics, computer science, and data engineering to represent workflows or dependencies. Part 1: What actually changesIn a static workflow, the control flow is written by a human, at design time, in code. The LLM fills in values. In an autonomous system, the control flow is generated at runtime, by the model, as a function of what it has observed so far. That single change cascades:
The last row is where most teams get hurt. In a static pipeline, "why did it do that" is answered by reading code. In an autonomous system, the answer only exists if you designed for it to exist.
Part 2: A reference architectureHere's the shape I'd recommend as a starting point. The critical structural idea: the plan is data, not control flow. The model emits a plan; a deterministic engine executes it. The model never is the scheduler.
The layers, briefly1) Intent layer. A goal is not a prompt. It's a structured object: the objective, hard constraints, success criteria, a resource budget, and a risk tier. If the success criteria can't be written down, the system has no way to know when to stop — and neither will you. 2) Cognitive layer (stochastic). Planning, routing, and criticism. Everything here is allowed to be non-deterministic because nothing here does anything. It only proposes. 3) Execution layer (deterministic). The scheduler, the step governor, retry logic, checkpointing, compensation. Plain code. This is what makes the system debuggable. 4) Capability layer. The agents themselves — each one a role with a scoped toolset and a scoped permission set. Not "an agent per department," but an agent per distinct capability that needs its own context and its own tools. 5) State layer. A blackboard for working state, an artifact store for anything large, and memory for what should survive the run. 6) Governance layer. Permissions, human gates, and traces. Bolted on at the end, this layer never works. Designed in from the start, it's what lets you raise the autonomy dial later. The three loopsA useful mental model is that a mature system runs three nested loops at different frequencies:
Part 3: The challengesThis is where demos and production part ways. 1. Error compoundingThe arithmetic is brutal and unavoidable. A step that is 95% reliable, chained twenty times, gives you a 36% chance of an end-to-end success. At 98% per step you're still only at 67%. Autonomy makes this worse, because autonomous systems choose to take more steps. Longer horizons multiply more terms. The naive response is "use a better model," which buys you a per-step improvement and loses it again the moment the model decides on a thirty-step plan. 2. Context degradation across handoffsAgent A does careful work and hands a summary to Agent B. The summary is lossy. Agent B makes a decision that would have been different with the full context, hands its own summary to Agent C, and by the time you reach the end the system is confidently reasoning about a distorted version of reality. It's the telephone game with an unlimited budget. Long contexts don't solve this either — relevant details in the middle of a large context get attended to less reliably than details at the edges, and stuffing every agent's full history into every other agent's window is how you get a $40 workflow run. 3. Planning is the weakest linkLLMs are strong at local reasoning and notably weaker at long-horizon planning with interdependencies. Plans tend to fail in characteristic ways: steps that assume information that won't exist yet, missing failure branches, sequential plans for work that's naturally parallel, and — most commonly — plans that are actually just a restatement of the goal in five bullet points. 4. No natural termination conditionA static pipeline ends when it reaches the last node. An autonomous system ends when it decides it's done, which means it can also decide it's not done, forever. The characteristic pathologies:
5. Cost and latency become unboundedCost is now a runtime variable that the model itself controls. A single misjudged decomposition — "I'll analyze each of these 400 records individually" — turns a $2 run into a $600 run. Latency behaves the same way, and multi-agent systems that fan out sequentially can be an order of magnitude slower than the single-agent version that would have been good enough. 6. Side effects have no transaction boundaryStep 7 sent the email. Step 9 failed. There is no rollback for a sent email. Any agent that touches the outside world creates state that outlives the failure, and a re-plan after a partial failure can happily re-execute an action that already succeeded. 7. Debugging is archaeology"It gave a wrong answer" is now a question about a decision tree that existed for 90 seconds and was never written down. Without deliberate instrumentation, root-causing means re-reading a 200KB blob of interleaved messages and guessing. 8. Evaluation has no ground truthFor a classifier you have labels. For an autonomous workflow, the same goal has many valid trajectories and the "right" answer is often a judgment call. Worse, output quality and process quality are different things: an agent can reach a correct answer through a broken process that will fail next week on a slightly different input. 9. Multi-agent is often the wrong answerWorth saying plainly: a well-scoped single agent with good tools beats a five-agent committee on most tasks. Every additional agent adds a handoff, a context boundary, a coordination cost, and a new failure mode. Multi-agent earns its keep when subtasks genuinely need isolated context, different tools/permissions, or parallel execution — not because the org chart has five teams.
Part 4: The architecture that survives contact with productionEach pattern below maps to challenges above. The unifying principle: push non-determinism into proposals, keep determinism in execution, and close every loop with verification.
Pattern 1 — Plan as a typed artifactThe planner does not execute anything. It emits a structured plan that a deterministic scheduler validates and runs. If the plan doesn't validate, the planner is asked again — no code has run yet, so the failure is free. Notice what this buys you: the dependency graph is now inspectable before execution, side effects are declared, budgets are attached to the plan rather than to a global config, and every step carries its own verification predicate.
Pattern 2 — Verification gates that reset the error rateThis is the single highest-leverage fix for error compounding. Compounding assumes errors propagate silently. A verification gate that catches errors turns the chain from Verification should be layered by cost:
Run them in that order and short-circuit. Most failures are caught by layers 1–2, which cost nothing. Two rules that matter more than they look:
Pattern 3 — Blackboard + artifact store, not message-passingInstead of agents forwarding summaries to each other, agents read from and write to shared state. Handoffs pass references, not content. This fixes context degradation two ways. Downstream agents pull the source rather than a summary of a summary, and each agent gets a curated view of state sized to its job instead of the full transcript. It also makes the run inspectable at any moment by a human or a monitor.
Pattern 4 — The step governorA deterministic component that sits between the plan and execution and refuses to let the system hurt itself: The
Pattern 5 — Saga semantics for side effectsEvery step that touches the world declares:
Then order the plan so irreversible actions happen last and together, after everything reversible has succeeded. This is standard distributed-systems hygiene, and it's routinely skipped in agent systems because the LLM framing makes people forget they're building a distributed system. They are.
Pattern 6 — Capability-scoped permissionsAgents don't get tools; they get capabilities bound to a scope. The research agent gets read-only web access and no database. The data agent gets a read replica, not production. The writer agent gets no external network at all. The permission broker enforces this at call time, independent of what the model asked for. The point is blast radius: a prompt injection in a fetched web page can only exercise the permissions the calling agent holds, not the union of everything the system can do. Related and non-negotiable: content retrieved by a tool is data, not instructions. Anything that arrives from a web page, document, or email should be structurally separated from the instruction channel, and no plan step should be created purely on the authority of retrieved content.
Pattern 7 — Trace-first observabilityEmit a span per agent turn with: inputs (with references, not blobs), the model and parameters, the raw completion, the tool calls attempted and their results, tokens and cost, the verification outcome, and the state hash before and after. Two things this unlocks:
If you can't replay a run, you don't have a system you can improve — you have a system you can only restart.
Pattern 8 — Evaluate trajectories, not just outputsBuild the eval harness before you build the fifth agent. Minimum viable version:
Process metrics are the leading indicator. Re-plan count creeping up is what a quality problem looks like two weeks before it looks like a quality problem.
Pattern 9 — The autonomy dialDon't ship full autonomy. Ship a dial, and turn it based on evidence.
The dial is per capability, not per system.
Part 5: How the pieces fit togetherPutting the loops and the guardrails together, one iteration of the middle loop looks like this:
The important detail: a verification failure routes to the planner, with a diagnosis — not to a blind retry. Blind retry with the same context reproduces the same failure at additional cost. Re-planning with the failure as an observation is the mechanism that makes the system look like it's solving problems, because it is.
Part 6: A pragmatic build orderIf I were starting Monday:
Teams that do this in reverse — five agents on day one, observability in month three — spend month four unable to tell whether anything they change makes it better.
ClosingThe instinct is to treat autonomy and control as opposites: more guardrails, less autonomy. In practice it runs the other way. Every constraint in this architecture — typed plans, verification gates, budgets, scoped permissions, replayable traces — is what makes it safe to let the model decide more. An agent with no guardrails gets exactly one chance to be trusted, and it will spend it. An agent with strong scaffolding can fail visibly, recover, and be granted more scope next quarter. Autonomy isn't the absence of structure. It's structure that operates on goals instead of steps.
Further reading
| |||||||||||||||||||||||||||||||||||||||
| | |||||||||||||||||||||||||||||||||||||||
| |