The AI coding assistant that
routes every task to the right model
Architecture to Opus. Coding to Sonnet. Quick edits to Haiku. Brainstorm learns which model handles each task best — and every decision feeds back into BrainstormRouter and BrainstormLLM, making the whole system smarter.
npm install -g @brainstorm/cli24
Packages
42+
Tools
10
MCP Servers
8
Subagents
6
Routing Strategies
Every task flows through the intelligence pipeline
When you type a prompt, it doesn't just go to one model. Brainstorm classifies the task (is it refactoring? debugging? architecture?), estimates complexity (trivial to expert), and selects the optimal model via Thompson sampling — a multi-armed bandit that learns from every outcome.
After execution, the result feeds back: did the code compile? Did tests pass? How much did it cost? This outcome data flows to BrainstormRouter, which updates its model rankings, and to BrainstormLLM, which trains on the full session trajectory.
The result: routing gets smarter with every task you run. Not just for you — for everyone.
Classify
Task type + complexity (code-gen, debug, refactor, architecture, Q&A)
Route
Thompson sampling picks optimal model from 10+ candidates across 8 providers
Execute
42+ tools available — filesystem, shell, git, web search, MCP servers
Verify
Auto-run build/test after edits. Self-correct on failure before responding.
Learn
Outcome → Router rankings update. Full trajectory → LLM training data.
24 packages. Each one does one thing well.
Not a monolith. A Turborepo monorepo where each package has a single responsibility — from the task classifier to the encrypted vault to the Docker sandbox. This means you can use the SDK without the CLI, the router without the tools, or swap any layer.
Core
@brainstorm/shared, @brainstorm/config, @brainstorm/db, @brainstorm/providers, @brainstorm/vault
Types, config, persistence, provider discovery, encrypted secrets
Intelligence
@brainstorm/router, @brainstorm/gateway, @brainstorm/eval, @brainstorm/core
Task classifier, 6 strategies, Thompson sampling, BR API client, capability probes, agent loop + 10 middleware
Agents
@brainstorm/agents, @brainstorm/workflow, @brainstorm/orchestrator, @brainstorm/hooks
8 subagent types, 4 workflow presets, 9-phase pipeline, lifecycle hooks
Tools
@brainstorm/tools, @brainstorm/mcp, @brainstorm/plugin-sdk
42+ tools, 10 MCP servers (OAuth, SSE, stdio), plugin SDK for extensions
Analysis
@brainstorm/ingest, @brainstorm/docgen
Deterministic codebase analysis + documentation generation (architecture, module, API docs with Mermaid)
Interface
@brainstorm/cli, @brainstorm/sdk, @brainstorm/vscode, @brainstorm/projects, @brainstorm/scheduler
Ink TUI (4 modes), programmatic SDK, VS Code extension, project registry, cron scheduler
10 middleware interceptors shape every interaction
Every message passes through a composable middleware pipeline before and after the LLM call. Context compaction, sentiment detection, trajectory recording, subagent limits, build state tracking — all running automatically, all configurable.
This is how Brainstorm stays aware of your project even in long sessions. Proactive compaction keeps context under the window limit. Style learning matches your codebase's patterns. Memory extraction captures important facts across sessions.
you > refactor auth to use JWT
# [classify] type: refactoring, complexity: medium
# [route] claude-sonnet-4.6 via Thompson (0.87 quality)
brainstorm > Reading auth files...
# [tool] file_read src/middleware/auth.ts ✓
# [tool] file_edit src/middleware/auth.ts ✓
# [tool] shell npm test ✓ (23 passed)
brainstorm > Done. $0.004
# [learn] outcome:success → Thompson updated
$ storm ingest
# Phase 1: Analyzing codebase...
✓ 847 files, 94K lines, 12 modules
# Phase 2: Generating documentation...
✓ ARCHITECTURE.md + 12 module docs
# Phase 3: Setting up AI infrastructure...
✓ BRAINSTORM.md generated
✓ 8 .agent.md domain experts
✓ Recipe directory initialized
Ingest complete in 2.1s. Run storm chat to start.
Every platform we build is built with Brainstorm CLI
This isn't a demo tool. It's how 4 production platforms were built — generating trajectories that train BrainstormLLM and routing data that sharpens BrainstormRouter.
BrainstormMSP
93% auto-heal
37 AI agents for autonomous MDR. Built entirely with storm chat + /architect + /sr-developer roles.
Peer10
App Store live
Youth sports platform with 35 domain services. ChangeSet pattern designed in /architect, implemented by /sr-developer.
Brainstorm-GTM
1 operator
70 autonomous marketing agents. Each agent designed via storm workflows, deployed through storm orchestrate.
Lead Network
Fully autonomous
33 domains across 7 verticals. Single codebase scaffold via storm ingest, expanded with storm spawn.
| Feature | Brainstorm | Claude Code | Cursor | Aider |
|---|---|---|---|---|
| Multi-model routing | 6 strategies + Thompson | — | Auto only | Manual |
| Open source | ✓ | — | — | ✓ |
| Built-in tools | 42+ | 20+ | 10+ | 5 |
| MCP servers | 10 built-in | User-config | — | — |
| Role workflows | 5 roles | — | — | Architect only |
| Subagents | 8 types | 1 | — | — |
| Terminal dashboard | 4 modes | — | IDE | — |
| Background agents | Worktree | — | ✓ | — |
| Codebase ingest | ✓ | — | — | Repo map |
| Programmatic SDK | ✓ | — | — | — |
Install
npm install -g @brainstorm/cliConfigure
storm initSets up config, discovers providers, connects to Router
Start coding
storm chatOr: storm ingest to analyze your codebase first