A proof-of-concept multi-agent research assistant built with Dart, demonstrating LLM agent orchestration using Dart Isolates for true parallelism.
- Multi-agent Architecture: A supervisor agent decomposes complex queries into sub-tasks, spawning worker agents to research them in parallel
- Dart Isolates: Each worker agent runs in its own isolate, enabling true parallelism with message passing for communication
- MCP Integration: Workers use Model Context Protocol (MCP) servers for web search (Brave Search, Tavily) and page fetching
- Terminal UI: Built with Nocterm, providing a Flutter-like development experience for terminal applications
┌──────────────────────────────────────────────────────────────┐
│ Main Thread │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ Nocterm UI │◄──►│ Supervisor │◄──►│ Agent │ │
│ │ │ │ Agent │ │ Controller │ │
│ └─────────────┘ └──────────────┘ └───────┬───────┘ │
└─────────────────────────────────────────────────┼────────────┘
│ SendPort/ReceivePort
┌──────────────────────┼──────────────────────┐
│ │ │
┌───────▼───────┐ ┌───────▼───────┐ ┌───────▼───────┐
│ Worker │ │ Worker │ │ Worker │
│ Isolate 1 │ │ Isolate 2 │ │ Isolate N │
│ │ │ │ │ │
│ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │
│ │ MCP │ │ │ │ MCP │ │ │ │ MCP │ │
│ │ Servers │ │ │ │ Servers │ │ │ │ Servers │ │
│ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │
└───────────────┘ └───────────────┘ └───────────────┘
- SupervisorAgent: Orchestrates the research workflow - decomposes queries, spawns workers, synthesizes results
- AgentController: Manages isolate lifecycle and message passing between main thread and workers
- Worker Agents: Run in separate isolates, each with their own MCP server connections for tool access
- Nocterm UI: Real-time visualization of worker status with animated indicators
- Dart SDK 3.10 or higher
- Node.js (required for Brave Search and Tavily MCP servers)
- Python 3 with
uvx(required for the Fetch MCP server) - API Keys:
ANTHROPIC_API_KEY(required) - for Claude LLMBRAVE_API_KEYand/orTAVILY_API_KEY(at least one for web search)
-
Clone and install dependencies:
git clone https://github.com/amscotti/dart-agent.git cd dart-agent dart pub get -
Create a
.envfile with your API keys:ANTHROPIC_API_KEY=your-anthropic-key BRAVE_API_KEY=your-brave-key TAVILY_API_KEY=your-tavily-key -
Run the application:
dart run
- Enter your research question in the search box
- Watch as the supervisor decomposes your query and spawns workers
- Monitor worker progress in real-time (animated status indicators)
- View the synthesized answer when research is complete
| Key | Action |
|---|---|
Enter |
Submit query |
↑ / ↓ |
Scroll through results |
s |
Save output to markdown file |
n |
Start new search |
q |
Quit application |
# Run tests
dart test
# Format code
dart format .
# Analyze code
dart analyze .- dartantic_ai - LLM integration framework
- mcp_dart - Model Context Protocol client
- nocterm - Terminal UI framework
MIT License - see LICENSE for details.