Skip to main content
← Back to blog

getting started: first multi-agent claude code run in 5 min

Five minutes from pip install to the first session, assuming you have Python 3.12 and Claude Code already on the box. If you don't, the prereqs eat the first three.

install

pip install bernstein
# or
uv pip install bernstein
 
bernstein --version
# bernstein 1.8.8

point it at an agent

Bernstein needs at least one CLI agent on PATH. Eighteen adapters ship in the box; Claude Code is the path of least resistance:

npm install -g @anthropic-ai/claude-code
export ANTHROPIC_API_KEY=sk-ant-...
 
bernstein agents
# Available agents:
#   claude (Claude Code) ✓

Codex, Gemini CLI, the OpenAI Agents SDK, Aider, Cursor - see the adapter guide for the full list. Bernstein auto-detects whichever ones are installed.

run a goal

cd your-project
bernstein run --goal "Add type hints to all functions in src/utils.py"

What happens, in order: goal gets decomposed into tasks, tasks get a role and a model, agents spawn into isolated worktrees, heartbeats and stdout get parsed, completed work merges back through the queue. Failed tasks roll back and end up in .sdd/dead_letter.json.

read the TUI

┌─ Bernstein v1.8.8 ─────────────────────────────────┐
│ Goal: Add type hints to all functions in src/utils  │
│ Tasks: 3 total │ 1 running │ 1 done │ 1 pending    │
│ Agents: 2 active │ Cost: $0.12                      │
├─────────────────────────────────────────────────────┤
│ ✓ task-001  Analyze existing type usage    00:42    │
│ ► task-002  Add type hints to helpers      01:15    │
│ ○ task-003  Add type hints to validators   pending  │
└─────────────────────────────────────────────────────┘

merged, running, waiting on a dependency or a free agent. q is a graceful stop (lets the current task finish), Ctrl+C is the hammer.

see what changed

git log --oneline -5
# a1b2c3d Add type hints to validator functions
# d4e5f6g Add type hints to helper functions
# h7i8j9k Analyze existing type usage in src/utils.py

One commit per agent, all merged through the same queue.

next things to poke

YAML plans for anything multi-stage:

bernstein run plans/my-project.yaml

Plans take stages, dependencies, roles, and complexity per task. Schema's in the docs.

A second adapter so the router has something to choose between:

pip install codex-cli   # or any other supported agent
bernstein agents

Per-session cost:

bernstein cost
# Session total: $0.47
# By model: haiku=$0.03, sonnet=$0.28, opus=$0.16

The task server runs on :8052 while a session is live, if you want to script against it.

further

Bernstein

Prefer a weekly recap? Subscribe to the weekly digest.