Skip to content
Simon Place
FR EN
Book a Meet call

Module 5 of 10, lesson 1 of 5

Multi-agent systems

Know when several agents are worth their coordination cost, and which structures are available.

A multi-agent system brings several agents together toward a shared result. One agent called as a mere tool doesn’t qualify: the goals, memory and plans of the others must be taken into account.

Centralized or not

Structures

What justifies several agents

Specialization is the best reason: different instructions, tools and permissions per role, which keeps each context small. Parallel work on independent subtasks is another.

What it costs

Opinions differ: Anthropic describes a multi-agent system in production, while Cognition advises against the approach. Read both, then test on your own case and count the cost.

One cook is enough for breakfast.

Worked example: Passing a decision, not a transcript

When one agent hands work to another, what it passes on is a cost and a risk. Pass what the next agent needs to act.

function handoff(state) {
  return {
    orderId: state.orderId,
    decision: state.decision,
    reason: state.reason,
    tokens: Math.round(JSON.stringify(state.reason).length / 4) + 20,
  };
}

const triage = {
  orderId: 4512,
  decision: 'refund',
  reason: 'Delivered broken, photo checked',
  transcript: 'x'.repeat(8000),
};

handoff(triage).tokens < JSON.stringify(triage).length / 4;

true

The refund agent receives the decision and its reason. The eight thousand characters of conversation stay behind, along with any instruction a customer may have hidden in them.

Try it in the editor

async function fanOut(tasks, worker, { limit = 2 } = {}) {  return Promise.all(tasks.map((task) => worker(task)));}module.exports = { fanOut };
Give the agent a skillFan out with a limit
Open in the editor

Legal notice and privacy