Multi-Agent

Chat Chain

Decompose a long, multi-disciplinary task into ordered phases; within each phase, run a paired-role chat between two agents until the phase artefact is signed off; pass the artefact to the next phase.

Problem

A single agent loop loses focus halfway through, forgetting the early requirements by the time it is writing tests. A broadcast multi-agent chat where every agent sees every message tangles design discussion with code review and blows up context windows. Flat prompt-chaining — one prompt feeds the next — cannot host the multi-turn back-and-forth a discipline like design review needs. The team needs structure across the disciplines but flexibility inside each one.

Solution

Define an ordered chain of phases. Each phase has (a) a defined input artefact, (b) two role-paired agents (e.g. designer + coder, coder + tester), (c) a phase-specific completion predicate, (d) a defined output artefact. Within a phase, the two agents converse multi-turn; the completion predicate ends the phase; the artefact moves to the next phase. The chain is the macro-control; the chat is the micro-control.

When to use

  • The work decomposes naturally into ordered phases, each with a paired role and an artefact.
  • Phase-specific completion predicates can be expressed clearly enough to gate handoff.
  • A single agent loop loses focus and broadcast multi-agent chat tangles context.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related