april 27, 2026 · 2 min read · multi-agent, architecture, llm, testing
Six multi-agent patterns nobody tells you about
Building with AI agents isn't prompting. It's distributed systems design where one of your components happens to think.
Building with AI agents in 2026 isn't prompting. It's distributed systems design, where one of your components happens to think.
I spent the last stretch architecting a multi-agent system. Here are six patterns nobody tells you about until you've already learned them the wrong way.
Orchestrator–worker beats the monolith
The instinct is to scale up: bigger prompt, more tools, longer context. Wrong direction.
The right move: N narrow specialists fan out in parallel. Isolated context, scoped permissions, one domain each. A separate orchestrator finds the cross-domain connections the workers had no mandate to find.
Design for partial failure, not all-or-nothing. One worker crashing should never abort the run. Capability surface equals blast radius.
Tool calls are the output. Prose is exhaust.
Every UI element in my system is a structured tool call with a typed payload. Zero regex over model output.
You get schema validation, deterministic tests, swappable agents and first-class provenance. If you're parsing model prose with regex in 2026, you skipped a layer.
Self-grading agents lie. Cheerfully.
I asked agents to self-verify "reading level at or below grade 6". They approved grade-12 output as "perfectly accessible".
The fix is structural, not prompt-engineered:
const final = Math.min(agentScore, deterministicCheck);LLM-as-judge is fine. LLM-as-judge-of-itself is a tautology.
Context engineering beats prompt engineering
Prompt engineering optimises a string. Context engineering optimises the token economy of a session:
- what lives in the ephemeral cache,
- what lives in persistent memory,
- the context budget per agent,
- how prior runs get summarised versus re-injected.
The art isn't a clever prompt. It's deciding where information lives.
Cross-session memory is a filesystem problem
In-session context is solved by the vendor. Cross-session is on you.
Per-entity sandboxed filesystem, path-traversal guards, atomic writes, byte caps, an append-only audit log. Treat it like a database, not a journal the model scribbles in.
Depend on an interface, not on HTTP
The best decision I made: my orchestrator talks to an IAgentClient interface, not the vendor SDK. The result:
- 400+ tests,
- zero live API calls,
- prompt changes regression-locked,
- a vendor swap is a one-file change.
If your code is hard to test, it's coupled to the network.
The meta-pattern
You assign scope. You enforce permissions. You isolate failure. You verify deterministically. You version the contract, not the wording.
The agents are the easy part. The system around them is the product.
Originally posted on LinkedIn.