Once specialists start returning results, three design choices decide whether the team stays reliable:
What happens when a result is wrong.
Who talks to whom.
What each agent is allowed to see.
Intuition
A specialist result is not automatically true. It is a claim that must pass checks before it joins the shared plan.
Failures and validation
flowchart LR
R[Agent result] --> V{Validate}
V -->|pass| S[Shared state result accepted]
V -->|fail| E[Structured error failure recorded]
E --> C[Coordinator acts]
C --> X[Retry, reassign, or ask the user]
Validation should check more than grammar:
Does the result match the expected schema?
Are required fields present?
Does the total stay under the ₹80,000 ceiling?
Do times and dates line up with other accepted results?
A failed result must become a structured error. Hide it, and the coordinator cannot retry, reassign, or ask the user.
flowchart LR
subgraph Super["Supervisor"]
C[Coordinator]
C --- F1[Flight]
C --- H1[Hotel]
C --- P1[Policy]
C --- B1[Budget]
end
subgraph Peer["Peer-to-peer"]
F2[Flight] --- H2[Hotel]
H2 --- P2[Policy]
P2 --- B2[Budget]
B2 --- F2
end
For the Paris booking desk, supervisor–worker is the safer start. Peer-to-peer is useful when agents must argue or review one another, not when money is about to be spent.
Shared state
The coordinator keeps the full picture. Each specialist receives a slice, then returns an update.
flowchart TB
S[Coordinator state goal, dates, budget, results]
S -->|dates, max ₹50,000| F[flight_agent]
F -->|fares + arrivals| S
S -->|dates, cap ₹7,000| H[hotel_agent]
H -->|hotels + check-in| S
S -->|chosen pair| P[policy + budget]
P -->|verdict + total| S
Do not send the whole state to every agent. The policy agent does not need every discarded fare. Extra context raises cost and makes it easier to follow a poisoned or noisy field.
What goes wrong
Accepting a specialist result because it is fluent, without schema or budget checks.
Swallowing errors as empty text, so the coordinator thinks nothing happened.
Letting every specialist read and write the full state.
Switching to peer-to-peer because it looks more "advanced," then losing the audit trail.
Storing final decisions only in chat text instead of a decisions list the next round can read.
One-line summary
Validate every result before it enters shared state, keep one coordinator unless peer review is the actual job, and send each specialist only the slice it needs.
Key terms
Validation — Checking a result against schema, required fields, and constraints.
Structured error — A recorded failure the coordinator can act on.
Supervisor–worker — One coordinator delegates to specialists.
Peer-to-peer — Specialists exchange messages without a single hub.
State slice — The subset of shared state one agent is allowed to see.