Multi-agent systems
Multiple agents introduce coordination, not automatic correctness. Use them where specialization or independent work has a measurable benefit.
Divide responsibilities before adding workers
A support workflow may separate policy research from order lookup. These workers should return typed artifacts to a coordinator rather than repeatedly paraphrasing each other's messages. A final coordinator needs evidence and provenance, not just a confident consensus.
How it works
Specify who owns each task, which tools each role may access, and how conflicting results are resolved. Bound fan-out, total tokens, and elapsed time. Avoid circular delegation. Independent reviewers can still share model biases or training data; agreement is not equivalent to independent experimental evidence.
A concrete example
Two workers disagree about return eligibility because one used an old policy. Majority voting cannot fix the missing version check. The coordinator should compare document IDs and effective dates, then resolve the evidence conflict or escalate.
Apply it to your assistant
Add a worker with a different policy version and surface the conflict. Before running the exercise, predict the result. Afterward, explain which assumption changed and add one case where the system should refuse, ask for clarification, or escalate.
All exercise inputs and outputs are deterministic teaching examples. No language model is called. Run the same idea against a versioned dataset before making a production claim.
Key takeaway
Coordinate typed evidence under a shared budget, and test whether extra agents improve the whole system.
JavaScript exercise: Multi-agent systems · code experiment
Add a worker with a different policy version and surface the conflict.
const artifacts = [
{ worker: 'policy', policyVersion: 3, eligible: true },
{ worker: 'reviewer', policyVersion: 2, eligible: true },
];
const versions = new Set(artifacts.map(a => a.policyVersion));
console.log({ evidenceConflict: versions.size > 1, votesAgree: artifacts.every(a => a.eligible) });
Knowledge check
Two agents agree on an unsupported claim. What does their agreement prove?
- The claim is true
- The agents are independent
- Only that these runs agreed; evidence still needs checking
Answer and explanation
Only that these runs agreed; evidence still needs checking
Correlated errors are common when systems share models, prompts, or evidence. Agreement does not establish truth.
Sources
- LangGraph overview — LangChain, Living documentation. Graph-based orchestration, state, persistence, and long-running workflows.
Continue learning
- Multi-agent systems — Multiple agents introduce coordination, not automatic correctness. Use them where specialization or independent work has a measurable benefit.
- Scaling & production — Production agents need durable state, concurrency limits, and safe recovery when processes or dependencies fail.
- Observability & monitoring — Observability connects a user-visible outcome to the steps that produced it, without collecting unnecessary sensitive data.
- Cost, latency & quality — Optimize cost per successful task, not merely cost per model call. Cheap repeated failures can be expensive.