← Table of Contents · Page 455 of 868
ORCHESTRATION PATTERNS
Part 7 of 11
EXAMPLES
Example 1: The Supervisor pattern at work.
A user asks a harness, "Prepare a briefing on our three main competitors."
The supervisor agent reads the request and creates a plan: one subtask per competitor, plus one subtask to compare them.
It delegates each competitor subtask to a researcher subagent.
When the three results come back, the supervisor delegates the comparison to an analyst subagent.
Finally, the supervisor writes a single, unified briefing and returns it to the user.
The user saw one conversation with one agent, but a team did the work behind the scenes.
Example 2: The Pipeline pattern at work.
A company receives contracts in many languages.
Their pipeline has four stages: extract text from the scanned file, translate the text into English, summarize the key terms, and format the summary into a standard template.
The extracted text goes only to the translator.
The translation goes only to the summarizer.
The summary goes only to the formatter.
If the extraction stage misreads a number, the error travels down the line, so the team adds a quick check after extraction.
This shows both the strength (simple and testable) and the weakness (errors propagate) of pipelines.
Example 3: The Blackboard pattern at work.
A team builds a business-report system with three specialists sharing a single workspace document.
A data-analysis agent adds calculated figures about last quarter's sales.
A visualization agent notices the new figures and adds a chart.
A narrative agent notices both the figures and the chart and writes a paragraph explaining the trend.
Nobody called these agents in a fixed order.
Each contributed when it noticed something relevant.
The team had to add a rule that each agent writes only to its own section of the document, to prevent them from overwriting each other.
Example 4: The Swarm pattern at work.
A large online store runs a group of peer agents for customer service: a returns agent, a shipping agent, a payments agent, and a product-advice agent.
A customer message arrives at whichever agent is free.
That agent reads it, and if it is not the best fit, it passes the conversation to the peer that is.
There is no central supervisor.
When a new "gift cards" agent is added, the others simply learn it exists and begin routing gift-card questions to it.
The team accepts weaker central visibility in exchange for this flexibility, and compensates by logging every handoff.
Advertisement
Read Aloud:
0:00 / 0:00