Dual-agent brainstorming system using Claude Code CLI sessions
Project description
Claude Storm
A dual-agent brainstorming system that orchestrates two Claude Code CLI instances in strict alternating turns. Each agent maintains a persistent Claude session and has access to a markdown-based memory filesystem for long-term notes.
Try it now (no install needed):
uvx --from claude-storm storm start "Design a REST API for a todo app"
Prerequisites
- Claude Code CLI — must be installed and authenticated (
claudecommand available on your$PATH). See the Claude Code docs for setup instructions. - Python 3.11+
API usage: Claude Storm spawns Claude Code subprocesses — each agent turn is an API call billed through your Claude Code authentication (Anthropic API key or Claude Pro/Max subscription). Agents often finish early via consensus, so a session with --max-turns 20 typically uses fewer than 40 calls, plus a few more for deliverable compilation at the end.
Installation
# Run without installing (recommended for trying it out)
uvx --from claude-storm storm start "your topic"
# Install globally
pip install claude-storm
# Or with pipx
pipx install claude-storm
Once installed, the storm command is available:
storm start "your topic"
Development install (from source)
git clone https://github.com/phobologic/claude_storm.git
cd claude_storm
uv sync
uv run storm start "your topic"
Quick Start
# One-off brainstorming session
storm start "Design a REST API for a todo app" --max-turns 4
# Project-based workflow (recommended)
storm init --topic "Design a distributed task queue"
# Edit storm.toml to add roles, goal, deliverables...
storm start
Project Configuration
Run storm init to create a storm.toml in your project directory:
[session]
topic = """
Design a distributed task queue system that handles
job prioritization, retry logic, and horizontal scaling.
"""
goal = """
Favor battle-tested technologies; produce production-ready designs
with clear trade-off analysis for each decision.
"""
role_a = """
Systems Architect - Deep experience with distributed systems.
Favors pragmatic, battle-tested approaches.
"""
role_b = """
Reliability Engineer - Focuses on failure modes, observability,
and operational concerns.
"""
deliverables = [
"Architecture overview document",
"Data model specification",
"Failure handling policy",
]
# Optional: directories of notes/docs agents can read for context
# reference_dirs = ["/path/to/research/notes"]
[options]
max_turns = 20
model = "sonnet"
auto_complete = true
interactive = false
# truncate_conversation = true
Sessions are stored in .storms/ alongside storm.toml (add to .gitignore).
Configuration Reference
[session]
| Key | Default | Description |
|---|---|---|
topic |
(required) | The subject or question under discussion. Multi-line strings supported. |
goal |
— | Desired outcome or success criterion. Reinforced in pacing, summary, and deliverable compilation. Describes direction/quality, not a specific document. |
role_a / role_b |
— | Agent personas. Become the agent's system prompt, replacing Claude Code's default instructions. First line is used as the TUI display label — keep it short (a title); additional lines provide detailed persona guidance. |
deliverables |
[] |
Documents to produce as [ARTIFACT] files. Drives pacing and post-session compilation. Also settable via --deliverable CLI flag. Draft artifacts with matching filenames are used as foundations. |
reference_dirs |
[] |
Read-only directories agents can browse via Read/Glob/Grep. |
[options]
| Key | Default | Description |
|---|---|---|
max_turns |
20 |
Turn budget. Shapes percentage-based pacing. |
model |
"sonnet" |
Claude model to use ("sonnet", "opus", or a full model ID). |
auto_complete |
true |
Allow agents to signal [DONE]. Requires both agents to agree. |
interactive |
false |
Enable user nudges and [ASK_USER] questions. |
truncate_conversation |
true |
Truncate conversation to last ~50k chars during deliverable compilation. |
Usage
# Initialize a project config
storm init [--topic "quick topic"]
storm init --force # overwrite existing storm.toml
# Migrate existing config to latest schema
storm init --update
# Start a session (reads storm.toml if present, or pass a topic)
storm start [TOPIC] [OPTIONS]
storm start --config path/to/storm.toml
storm start "Quick topic" --max-turns 4
# With custom roles (one-off mode)
storm start "Microservices vs monolith" --roles "Advocate" "Skeptic" --auto-complete
# CLI flags override TOML values
storm start --max-turns 6 --model opus
# Give agents read-only access to reference materials (repeatable)
storm start --reference-dir ./research/notes --reference-dir ./design/specs
# Interactive mode — type nudges at any time to steer the conversation;
# agents can ask you questions via [ASK_USER]
storm start --interactive
# Resume a paused session (Ctrl+C to pause)
storm resume <session-id>
storm resume <session-id> --force # recover after a hard kill
# List and inspect sessions
storm list
storm show <session-id> # includes why the session stopped
Agent Protocol
Agents communicate via structured directives embedded in their responses.
Private Tools
| Directive | Syntax | Description |
|---|---|---|
[MEMORY] |
[MEMORY title="..." tags="t1,t2"]content[/MEMORY] |
Save a note to the agent's private long-term memory. Use for working notes, open questions, and ideas in development. |
[MEMORY_SEARCH] |
[MEMORY_SEARCH query="..."] |
Search saved memories. Results appear in the agent's next turn. |
Shared Output
| Directive | Syntax | Description |
|---|---|---|
[PROPOSE] |
[PROPOSE title="..."]content[/PROPOSE] |
Propose a shared agreement for the other agent to confirm. |
[ACCEPT] |
[ACCEPT id="..."] |
Accept a pending proposal by ID. |
[REJECT] |
[REJECT id="..." reason="..."] |
Reject a pending proposal with explanation. |
[REVISE] |
[REVISE id="..."]new content[/REVISE] |
Propose a revision to an existing confirmed agreement. Creates a new pending proposal. |
[ARTIFACT] |
[ARTIFACT filename="..."]content[/ARTIFACT] |
Produce a shared output file (code, document, etc.). |
[DONE] |
[DONE reason="..."] |
Signal that brainstorming is complete. The other agent must confirm; if they disagree, conversation continues. |
[ASK_USER] |
[ASK_USER]question[/ASK_USER] |
Pause to ask the human user a question (interactive mode only). |
Conversation Pacing
When deliverables or a goal are defined, agents receive pacing guidance based on turn progress:
| Progress | Guidance |
|---|---|
| ≤20% (interactive) | Use [ASK_USER] to clarify intent before narrowing |
| Default | Continue brainstorming, save ideas with [MEMORY] |
| 50% | Start narrowing; produce draft [ARTIFACT] files |
| 75% | Finalize artifacts, resolve open questions |
| Final 2 turns | Complete all artifacts; produce any missing deliverables |
Agreement nudges: After turn 3 with no agreements, agents are nudged to use [PROPOSE]. If 4+ turns pass since the last accepted agreement, agents get a reminder.
Deliverable compilation: After the session ends, each deliverable is compiled by a separate Claude instance from agent memories, agreements, conversation log, and matching draft artifacts.
Interactive Mode
- User nudges: Type at any time in the TUI to steer the conversation; queued and merged into the next turn prompt.
- Agent questions:
[ASK_USER]pauses the agent to ask the user. The TUI defers the question if the user is mid-typing. - Early clarification pacing: In interactive sessions, agents are encouraged to use
[ASK_USER]in the first 20% of turns. - Non-interactive: No user input during the session;
[ASK_USER]is not available to agents.
TUI Navigation
The TUI auto-scrolls to follow new output. Scrolling up pauses auto-follow and
shows a scroll indicator; scrolling back to the bottom (or pressing End) resumes it.
| Key | Action |
|---|---|
PageUp / Shift+Up |
Scroll up one page |
PageDown / Shift+Down |
Scroll down one page |
End |
Jump to bottom and resume auto-follow |
How It Works
- Two Claude Code CLI instances are launched with persistent sessions
- Agents take strict alternating turns responding to each other
- Each agent can save notes to its memory filesystem for long-term retention
- Agents can produce shared artifacts (code, documents)
- Agents formalize shared decisions using an agreement protocol (
[PROPOSE]/[ACCEPT]/[REJECT]/[REVISE]); confirmed agreements persist toagreements.mdand feed into deliverable compilation. Verbal agreement alone ("I agree", "good point") does not create a shared record — only[PROPOSE]+[ACCEPT]does. Pacing nudges encourage[PROPOSE]usage when no agreements have been recorded recently. - Pacing nudges guide agents through exploration, convergence, and deliverable production
- In
--auto-completemode, agents signal[DONE]when the topic is well-explored - Sessions can be paused with Ctrl+C and resumed later; each session records why it stopped (visible via
storm show) - When running in a terminal, a full-screen TUI provides live-streamed agent output, an animated thinking timer, and a persistent input bar for nudges (Shift+Enter for newlines); the header shows the session ID. Piped/non-TTY output falls back to plain Rich console
Security
Agent filesystem access is restricted via path-scoped --allowedTools patterns:
- Read/Glob/Grep: session directory + reference directories (if configured)
- Write/Edit: session directory only
- Bash/other tools: not available to agents
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_storm-0.2.1.tar.gz.
File metadata
- Download URL: claude_storm-0.2.1.tar.gz
- Upload date:
- Size: 162.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4033ad3abb03d659b46ee7978b8ad2acae11ae6218812936efefa8f87dd5d6d9
|
|
| MD5 |
d4acc9b2a5d57a664b5066c73a3e2e00
|
|
| BLAKE2b-256 |
6fa35d7595ad656e5bb27ae4e2ab55860e20af87db3f0b3848ee757d62fa06ff
|
Provenance
The following attestation bundles were made for claude_storm-0.2.1.tar.gz:
Publisher:
publish.yml on phobologic/claude_storm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_storm-0.2.1.tar.gz -
Subject digest:
4033ad3abb03d659b46ee7978b8ad2acae11ae6218812936efefa8f87dd5d6d9 - Sigstore transparency entry: 983621608
- Sigstore integration time:
-
Permalink:
phobologic/claude_storm@d001962677126db317bfb33b191d6e58f101f557 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/phobologic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d001962677126db317bfb33b191d6e58f101f557 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_storm-0.2.1-py3-none-any.whl.
File metadata
- Download URL: claude_storm-0.2.1-py3-none-any.whl
- Upload date:
- Size: 62.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
889cbd8d717411bfb5484204135539929c4470cd9c22bf2935849ee661973a57
|
|
| MD5 |
ec76e6d4ebc4a0b6467589abcb7692b0
|
|
| BLAKE2b-256 |
0003ee4cb232375e2176d6664d0ad93b2ddd8ba8bbc1b32eaab0a0c964a4b2f8
|
Provenance
The following attestation bundles were made for claude_storm-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on phobologic/claude_storm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_storm-0.2.1-py3-none-any.whl -
Subject digest:
889cbd8d717411bfb5484204135539929c4470cd9c22bf2935849ee661973a57 - Sigstore transparency entry: 983621611
- Sigstore integration time:
-
Permalink:
phobologic/claude_storm@d001962677126db317bfb33b191d6e58f101f557 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/phobologic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d001962677126db317bfb33b191d6e58f101f557 -
Trigger Event:
release
-
Statement type: