Skip to main content

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 (claude command 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.

How It Works

  1. Two Claude Code CLI instances are launched with persistent sessions
  2. Agents take strict alternating turns responding to each other
  3. Each agent can save notes to its memory filesystem for long-term retention
  4. Agents can produce shared artifacts (code, documents)
  5. Agents formalize shared decisions using an agreement protocol ([PROPOSE]/[ACCEPT]/[REJECT]/[REVISE]); confirmed agreements persist to agreements.md and 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.
  6. Pacing nudges guide agents through exploration, convergence, and deliverable production
  7. In --auto-complete mode, agents signal [DONE] when the topic is well-explored
  8. Sessions can be paused with Ctrl+C and resumed later; each session records why it stopped (visible via storm show)
  9. When running in a terminal, a full-screen TUI provides scrollable 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

claude_storm-0.1.5.tar.gz (162.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_storm-0.1.5-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file claude_storm-0.1.5.tar.gz.

File metadata

  • Download URL: claude_storm-0.1.5.tar.gz
  • Upload date:
  • Size: 162.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_storm-0.1.5.tar.gz
Algorithm Hash digest
SHA256 351fd45d767e3478e7171b90d86458bb0a8862c308e3b326f39da6cbad7234ed
MD5 305d02e9da634c8c504a988c1ffaeecf
BLAKE2b-256 899cd8155573d26c82c41eadda6f0e342e58d58d44b29aa845d99b4fa5ff19f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_storm-0.1.5.tar.gz:

Publisher: publish.yml on phobologic/claude_storm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_storm-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: claude_storm-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_storm-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 03029b9a99417d7f8b8039347dd40f0b67c16eb238ad743c709d1df80e91c09f
MD5 8f9b6e43eea8725d4b08ca58987a276d
BLAKE2b-256 64a8cf6caeb3c985d6044fe33a9e595d5cc957876fc977e7150e3c56e9945919

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_storm-0.1.5-py3-none-any.whl:

Publisher: publish.yml on phobologic/claude_storm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page