Replace all files with clean upstream Cline v3.83.0 content. ShengSuanYun provider code automatically removed.
1.5 KiB
1.5 KiB
Multi-Agent Fan-Out
A web app that spawns three specialist agents in parallel, streams their responses to the browser in real time via SSE, then feeds their findings into a synthesizer agent that produces a unified answer.
Getting started
Install dependencies:
bun install
bun run build:sdk
Set an API key:
export CLINE_API_KEY="cline_..."
Run:
bun dev
Open http://localhost:3456 in your browser, enter a topic, and watch the agents work.
What it does
- You enter a topic in the browser
- The server spawns three
Agentinstances in parallel viaPromise.all:- Technical Expert (engineering perspective)
- Practical Analyst (real-world applications)
- Critical Reviewer (limitations and trade-offs)
- Each agent streams
assistant-text-deltaevents to the browser via SSE, rendered in its own card - Once all three finish, a fourth synthesizer agent combines their findings into a unified answer, also streamed live
Concepts demonstrated
- Running multiple
Agentinstances concurrently withPromise.all - Per-agent
subscribe()for independent event streams - Server-Sent Events (SSE) to stream agent output to a browser
- Agent composition: feeding one agent's output as input to another
- Inline HTML frontend served from the same Node.js server (single file, no build step)
Notes
For a simpler starting point, see quickstart. For custom tools and structured workflows, see code-review-bot.