You have a backlog item that says "add an assistant" and the LangGraph docs open. Before you write a node or register a tool, you have to choose a shape. It could be a single tool-calling loop, a deterministic graph with LLM calls inside it, a planner that writes a plan for executors to carry out, or several agents handing work to each other. The structure comes before the library.
The common mistake is to reach for multi-agent because it looks like the serious option. It brings the oldest problems in distributed systems with it: coordination, partial failure and unclear ownership. Those problems now run on components that are not deterministic. My position is that multi-agent designs are justified mainly when you need isolation of context, permissions or responsibility between parts that each have to behave as agents. Looking sophisticated is not a reason. The practical default this guide arrives at is a deterministic graph skeleton with bounded agentic nodes, and multi-agent only where you need that isolation.
My technical focus is agent architecture, tool use and LangGraph workflows, which is why these questions come before code.
1. The structure decides how your agent fails
It is tempting to start with prompts and model choice, but the architecture settles four things first:
- who chooses the next step (your code or the model)
- where state lives
- which component holds which permissions
- how a failure surfaces
Keep workflows and agents distinct. Anthropic's Building effective agents puts it cleanly: workflows orchestrate LLMs and tools through predefined code paths, while agents are systems where LLMs dynamically direct their own processes and tool usage. Moving along that spectrum trades predictability for flexibility, and the same guide advises the simplest solution possible, adding complexity only when needed.
In principle one graph library, LangGraph for instance, can host all four shapes: a loop is a graph with a cycle, and a supervisor is a node that routes. The same Anthropic guide warns that frameworks often add layers of abstraction that can obscure the underlying prompts, so know which shape you are building before a library hides it.
2. Four shapes, one question: who owns the next step
Single tool-calling loop (ReAct-style). One model, one context and one tool set, interleaving reasoning and actions. The model reads the latest result and picks the next action until it decides it is done. It is the quickest to build and the hardest to bound once the tool list and the context grow, because every new tool adds another move the model can make at every step.
Graph workflow. Developers define the states and transitions. The LLM does classification, extraction or drafting inside nodes, and code decides what happens next. The result is predictable and testable. It is also rigid: an input that falls outside the designed paths has nowhere sensible to go.
Planner-executor. One call produces a plan, and executors carry it out step by step, with an optional path back to the planner. Because the plan exists before anything runs, you can inspect it; that doesn't make the system reliable. A plan is a model output like any other, so it needs validation and a replanning path.
Multi-agent (supervisor or peer). Separate agents with separate prompts, contexts and permissions hand work to each other, either through a supervisor that routes or directly between peers. Coordination becomes a design problem you own. Anthropic's multi-agent research system shows where the pattern earns it: research with heavy parallelization, breadth-first questions that split into independent threads. The same write-up says domains that need all agents to share the same context are a poor fit, and that most coding tasks have fewer truly parallelizable parts than research.
3. One problem, four designs: a support assistant that can issue refunds
The problem is a support assistant for a multi-tenant SaaS product. It reads a customer ticket and looks up account and billing data for that tenant. It checks the refund policy, issues a refund under a threshold and routes everything else to a person. Three constraints shape the design. Tenant isolation is non-negotiable. The refund tool is a write action with money attached. Every decision must be auditable.
Tenant isolation and authorization are concerns I keep returning to in multi-tenant architecture, and they matter more when the component deciding which data to fetch is a model.
All four designs share this illustrative state, which in production would be a validated, persisted schema.
from typing import Literal, Optional, TypedDict
class TicketState(TypedDict):
tenant_id: str # from the authenticated session, never from ticket text
ticket_text: str # untrusted input
category: Optional[str]
account: Optional[dict]
policy_decision: Optional[Literal["allow", "deny", "escalate"]]
refund_idempotency_key: Optional[str]
reply_draft: Optional[str]
owner: str # the component that currently owns the ticket
audit_log: list[dict]Single loop
One agent gets the read tools and the refund tool. It handles easy tickets well and fails predictably. The model may call refund before it checks the policy. The context may fill with months of billing history until the line that matters gets lost. The guardrails cannot live in the prompt. The refund tool itself has to check the threshold, use tenant-scoped credentials and reject any call that has no policy_decision recorded in state by the policy service, a field the model can't write.
Graph workflow
The flow is classify → fetch account → policy check in plain code → refund node gated by rules → draft a reply that reports what the refund actually did, with an edge to human escalation. Auditing is straightforward because every path exists in code. The failure path is the ticket that doesn't fit. "You double-charged me, and the export button is broken" falls through a classifier built for one intent per ticket. Inputs like that need a fallback edge to a human, or a broader node built to handle them.
Planner-executor
The planner proposes four steps: look up the invoice, check the policy, refund, reply. On a bad run it skips the policy check, or it names a lookup_contract tool that doesn't exist. Validate the plan against an allowed-step schema before execution: the policy check must come before the refund, and only registered tools may appear. When a step fails, send the error back to the planner instead of running the remaining steps blindly.
Multi-agent
This design has three agents. A triage supervisor routes the work. A billing agent is the only one with refund permission. A technical agent has read-only product tools. The split puts the agent that reads untrusted ticket text away from the one that can move money, but the isolation is only as good as the handoff. If triage forwards the ticket text, injected instructions reach the billing agent anyway. The handoff has to be structured fields validated in code, such as the invoice ID, the amount and a reason code, never the raw ticket. Narrowing the handoff narrows the injection path (code must still check each field against the billing records) and opens the first new failure; the others come straight from distributed systems:
- Handoff context gets lost, so the billing agent asks the customer for details that are already in the ticket.
- Two agents both reply to the customer.
- The billing agent times out after the refund call but before confirming it, and nobody knows whether the money moved.
4. Side by side: what each design costs you
The ratings are my judgement for this scenario, not measurements.
| Single loop | Graph workflow | Planner-executor | Multi-agent | |
|---|---|---|---|---|
| Who controls flow | Model | Code | Model plans, code executes | Supervisor or peer agents |
| Predictability | Low | High | Medium | Low to medium |
| Testability | Scenario evals only | Path by path | Plan validation plus scenario evals | Per agent and end to end; hardest |
| Unexpected inputs | Flexible, but unbounded | Weak without fallback edges | Medium, via replanning | Good within each specialism |
| Permission isolation | Only in tool code | Per node | Per executor step | Strong, per agent |
| Context isolation | None; one shared context | Per node, if node inputs are scoped | Partial | Strong, per agent |
| Observability effort | Medium | Low | Medium | High |
| Operational complexity | Medium: simple to build, hard to bound | Low to medium | Medium | High |
Cost and latency depend on your models and traffic, but the mechanism is the same everywhere: more calls and handoffs mean more tokens and round trips. Anthropic reports that its agents typically used about 4× the tokens of a chat interaction, and its multi-agent systems about 15×. Parallel sub-agents help only when the work is truly independent; if branch B needs branch A's result, you have a sequential pipeline with extra coordination.
The rows where multi-agent clearly wins are the isolation rows, not the capability rows. Even there, a graph matches it whenever one side of the boundary can be plain code or a single LLM call. Multi-agent pulls ahead mainly when both sides need open-ended autonomy of their own, or when the work splits into independent parallel threads.
5. The patterns combine
A graph node can contain a tool-calling loop, a supervisor can route to a graph, and a planner can emit steps for a workflow engine to execute.
For the refund assistant, I would keep the outer graph deterministic: intake, tenant resolution from the authenticated session, the policy check and an approval gate. A bounded loop handles only the investigation step, where the questions really are open-ended ("which invoice is this about, and was it actually charged twice?"). The loop reads untrusted ticket text, so its output leaves as structured fields (invoice ID, amount, reason code) that code validates against the billing records before the policy check sees them. The refund capability sits in a separately permissioned component that the loop cannot reach.
Each autonomous region needs its own step limits, evaluation set and traces.
6. What breaks after the diagram is finished
Partial failure. A tool call or handoff can succeed while its confirmation is lost. For write actions such as refunds, generate an idempotency key before the call and store it in state. Treat the payment system as the source of truth. The model's memory of what it did is not a record.
Ownership and termination. Every task needs exactly one owner at a time, step and budget limits, and a defined end state, which includes "gave up". Without these, loops spin, and supervisors and sub-agents pass work back and forth without anyone noticing. For the stopping side, see how circuit breakers bound agent loops, tool failures and runaway cost.
Observability. Trace every model call, tool call, handoff and plan revision under one correlation ID so you can reconstruct a single ticket end to end.
State and recovery. Anthropic's multi-agent write-up puts it bluntly: agents are stateful and errors compound. Persist checkpoints so a failed run can resume or be abandoned safely. Decide in advance what the customer and the support team see when the system gives up.
7. A selection framework you can apply this week
The first three questions pick the core shape: stop at the first clear yes. Answer the last two whatever you chose, because isolation and autonomy needs cut across every shape.
- Can you write down the steps in advance for most inputs? If yes, use a graph workflow with LLM calls inside nodes. If no, move to the next question.
- Is the path genuinely open-ended? With few read-only tools, a single bounded loop fits. If it also needs consequential writes, keep the loop for the open-ended part and move the writes behind code-enforced gates outside it, as in the hybrid above.
- Does the task benefit from an explicit, reviewable plan, and can you validate that plan mechanically? If yes, use planner-executor with a replanning path. If you can't validate the plan, don't use this pattern. The planning step would look like a control without acting as one.
- Do you need isolation that a graph can't give you? A graph can separate permissions and context per node, but only if you scope what each node reads: nodes often share one state object, so the refund node should receive validated fields, never the ticket text. Multi-agent earns its cost when each side of the boundary must itself be an open-ended agent, or when separate teams own and release separate agents. Only then use it, with structured handoffs, and budget for the coordination work.
- Which parts actually need autonomy? Combine the patterns accordingly; for the refund assistant that means a hybrid.
| Your situation | Starting architecture |
|---|---|
| Known steps, outcomes must be auditable | Graph workflow |
| Open-ended path, few low-risk tools | Bounded single loop |
| A plan you can review and validate | Planner-executor with replanning |
| Separately owned agents, or isolation between open-ended agents | Multi-agent under a deterministic outer layer |
| A mix of the above | Graph skeleton with bounded agentic nodes |
This assumes a backend team that has to operate, secure and audit what it ships. An exploratory or internal-only tool can take on more autonomy earlier, because a wrong answer costs a retry rather than a refund.
8. Start with the boundary you need, not the pattern you admire
Before you open a framework, sketch where control, context and permission must be separated in your own use case, and who owns each piece, as the refund assistant did. Then add autonomy one bounded region at a time.






