---
title: Tutorial — Multi-Agent Research Team
description: End-to-end walkthrough is in progress. This page sketches the topology and points at the framework pieces for composing a coordinator + specialists + judge fleet.
---

# 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](https://github.com/TnsAI-Framework/TnsAI/discussions) 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

```text
                       Coordinator
                            │
            ┌───────────────┼───────────────┐
            ▼               ▼               ▼
        Researcher        Writer        (delegate as needed)
            │               │
            └───────┬───────┘
                    │
                    ▼
                  Judge
                    │
                    ▼
              Final answer
```

This 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 `ResearcherRole` and `WriterRole` with their own action sets (`@ActionSpec`). Each becomes an `Agent` instance 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`** — a `tnsai-coordination` primitive that runs as a post-step against the group's composed output. Returns approve / reject / revise with feedback.
- **Streaming progress** — wire `AgentEventPublisher` so the coordinator can stream partial results from each specialist back to the caller while the workflow is still in flight.

## Related

- [Multi-agent guides](../multi-agent/index.md)
- [Coordination module](https://github.com/TnsAI-Framework/TnsAI/tree/main/tnsai-coordination)
