Tutorial: Multi-Agent Research Team
A full code walkthrough is still being written. In the meantime this page describes the topology and points at the framework pieces you can wire up today. Open a discussion if you start the implementation and hit something missing.
Goal
Three agents collaborate on a single research question:
- Coordinator — splits the question, delegates each sub-question to a specialist, composes the final answer.
- Specialists — a researcher (gathers evidence) and a writer (drafts prose).
- Judge — reviews the composed answer for quality before it's returned.
Topology
Coordinator
│
┌───────────────┼───────────────┐
▼ ▼ ▼
Researcher Writer (delegate as needed)
│ │
└───────┬───────┘
│
▼
Judge
│
▼
Final answerThis is the hierarchical topology with a final judge review step — two patterns the tnsai-coordination module ships out of the box.
Building blocks you'd compose
- Per-specialist roles — define
ResearcherRoleandWriterRolewith their own action sets (@ActionSpec). Each becomes anAgentinstance with its own LLM client (you can mix providers per role). AgentGroup—tnsai-coordination's composition primitive. Pick the hierarchical topology so the coordinator decides delegation order; alternatives include peer round-robin and pipeline.JudgeAgent— atnsai-coordinationprimitive that runs as a post-step against the group's composed output. Returns approve / reject / revise with feedback.- Streaming progress — wire
AgentEventPublisherso the coordinator can stream partial results from each specialist back to the caller while the workflow is still in flight.
Related
Tutorial: Customer Support Bot
A full code walkthrough for this tutorial is still being written. In the meantime this page describes the shape of the system and links to the framework pieces you'd compose to build it. If you start the implementation and hit something missing, open a discussion — concrete questions accelerate the write-up.
Tutorial: Agent with Tool Approval
A full code walkthrough is still being written. In the meantime this page describes the shape and points at the framework pieces you can wire up today. Open a discussion if you start the implementation and hit something missing.