This picks up after you've already built one working agent, the Customer Question Triage assistant from Step 5, or the email triage build in the advanced example. If it's working well, you'll notice it starts hitting the same wall: it does one narrow job well, and then hands you a pile of things it wasn't confident enough to finish.
A single-purpose agent is supposed to stay narrow, that's what makes it trustworthy. But narrow means it has a ceiling. For the triage assistant, that ceiling shows up as a growing stack of "not confident, escalating to a human" items, questions it could categorize but couldn't actually answer from the knowledge base it has.
The instinct is to make the one agent smarter, give it more instructions, more tools, more judgment calls. Don't. A single agent trying to do triage and deep research and drafting and tone-matching becomes harder to trust, not easier. The better move is a second, equally narrow agent that picks up exactly where the first one stops.
You don't need an orchestration framework to connect two agents. You need one thing: a handoff contract, a fixed, structured format that the first agent always outputs, and that the second agent always expects. If Agent 1 always hands off the same shape of information, Agent 2 doesn't need to guess what it's looking at.
Take the Customer Question Triage assistant from Step 5. Right now, anything under 90% confidence just gets flagged for a human. Instead, hand it to a second agent whose only job is to go dig deeper before a human sees it.
HANDOFF: TRIAGE → RESEARCH original_question: [the customer's exact question] category: [Billing | How-to | Bug | Feature Request | Other] what_triage_found: [any partial answer or relevant doc triage located] what_triage_could_not_confirm: [the specific gap, not just "not sure"] urgency: [normal | time-sensitive] do_not_answer_without_verifying: [true if it involves price, date, policy, or status]
Triage's instructions get one line added: "If confidence is below 90%, output the handoff above instead of a final answer." Then the Research assistant's system prompt is built to expect exactly that shape:
RESEARCH ASSISTANT — SYSTEM PROMPT ROLE You receive escalations from the Triage assistant in a fixed handoff format. Your only job is to close the specific gap it identified, not to redo triage's work or re-categorize the question. INPUT You will always receive: original_question, category, what_triage_found, what_triage_could_not_confirm, urgency, and a verification flag. YOUR JOB 1. Search the full knowledge base and docs, not just the quick-reference set triage uses, for the specific gap named in what_triage_could_not_confirm. 2. Draft a complete answer to original_question using what you find. 3. If do_not_answer_without_verifying is true, you must link the official source page and cannot state the fact as settled without it. 4. If you still can't close the gap, say exactly what's missing, don't pad the answer to sound more complete than it is. OUTPUT, FOR A HUMAN TO REVIEW Draft answer: [your answer] Sources checked: [list] Confidence: [High/Med/Low] Still unresolved: [anything you couldn't confirm, or "none"] Never send this directly to the customer. This is a draft for a human to review and send.
Notice what didn't change: neither prompt got longer or vaguer. Triage still only does triage. Research only does research, and only on the specific gap it was handed. The handoff contract is what lets them work together without either one needing to understand the other's whole job.
It's tempting to design a whole pipeline, triage, research, drafting, tone-matching, approval, once you see the pattern. Don't. Every additional agent is another place for a small error to compound into a confidently wrong final answer. Get two agents working reliably, by hand, for a couple of weeks before you add a third.
At first, the handoff can just be you: copy Triage's output, paste it into Research, review what comes back. That's a perfectly good way to test whether the contract actually works before automating anything.
Once you trust it, this becomes the same shift covered in AI Agents, and How to Build Your First One: instead of you pasting the handoff by hand, a small piece of code or a scheduled trigger passes Agent 1's output straight into Agent 2. The routing pattern itself is the same one taught in Your First Agent, One Example All the Way Through, you're just chaining a second classification step after the first.