Tool Info
| Field | Value |
|---|---|
| Name | Bernstein |
| Type | CLI / Python library / MCP server |
| GitHub | sipyourdrink-ltd/bernstein |
| Stars | 1,220 (checked 2026-11-25) |
| Language | Python 3.12+ |
| License | Apache-2.0 |
| Install | pipx install bernstein |
What Problem It Solves
Running several Claude Code or Codex sessions on the same codebase at once sounds efficient until three problems show up: who owns which piece, whether two agents just touched the same file, and whether anything they changed actually passes lint, type checks and tests. Hand-rolling this yourself means scripting worktree creation, retries and cost tracking from scratch — and when something breaks, you have no record of what the agent actually decided along the way.
Bernstein wraps that management layer into one CLI, and deliberately keeps the scheduler itself free of LLM calls: it's plain Python. It decomposes a goal — or a YAML plan with staged, dependent steps — into tasks, spawns a short-lived CLI agent per task inside its own git worktree, runs quality gates (lint, type checks, tests, optionally a security scan), merges only the worktrees that pass, and escalates to a stronger model on failure before giving up and dropping the task into a dead-letter queue with the worktree preserved for inspection. Because decomposition, assignment and merging are deterministic code, replaying the same plan twice reproduces the same task graph, and a lineage spine lets you step back through a run by default. An optional HMAC-chained audit log turns every step into a signed record that someone who never ran the job can still verify offline.
It fits teams who want to queue a batch of work before bed and wake up to a set of green PRs; teams that need a paper trail of what an autonomous agent did and why for an audit; or anyone who just wants a CI-style wrapper — fan out to N tasks, merge what's green — on top of whatever CLI agent they already use. The project lists 55 selectable adapter names, including Claude Code, Codex, Gemini CLI and Aider.
Simplified from the official docs; heartbeat monitoring, the warm pool and the bulletin board are left out.
Getting Started
Install
pipx install bernstein # recommended; pip install bernstein / uv tool install bernstein also work
# Requires: Python 3.12+, at least one installed CLI coding agent (Claude Code / Codex / Gemini CLI...), git
Basic usage
cd your-project
bernstein -g "add JWT-based user authentication"
# Bernstein decomposes the goal, runs each task's agent in its own worktree,
# and merges only what passes the quality gate — results land straight in git history
Advanced usage (optional)
# plan.yaml: multi-stage project with dependencies between stages
name: "Add authentication"
stages:
- name: database
steps:
- goal: "Create user table migration"
role: backend
complexity: low
- name: api
depends_on: [database]
steps:
- goal: "Implement /login endpoint"
role: backend
complexity: medium
priority: high
bernstein run plan.yaml --routing bandit --audit # pick models with a contextual bandit, enable the HMAC audit chain
bernstein audit verify # verify the audit chain offline afterward
How It Compares
| Bernstein | Hand-rolled multi-agent scripts | Most LLM-driven agent orchestrators | |
|---|---|---|---|
| Scheduler itself calls an LLM | (plain Python, zero scheduling tokens) | — | |
| Each task gets its own git worktree | You build it | Partial | |
| HMAC-chained audit log, offline-verifiable | Mostly missing | ||
| Number of supported CLI agents | 55 selectable adapters (Claude Code, Codex, Gemini CLI, Aider...) | Whatever you wire up | Usually 1–3 |
| Auto model-escalation retry, dead-letter queue on exhaustion | You build it | Partial |
Things to Watch
- Beta status, solo-maintained: the README itself says "status: beta, solo-maintained." The version number counts releases, not maturity, and interfaces can change between minor versions — pin your version.
- The HTTP task server binds 127.0.0.1:8052 by default: fine for local use, but don't expose it externally. Each agent calls its own model API with credentials you configure; Bernstein doesn't proxy or store those keys for you.
- Not a compliance certification: the docs are explicit that Bernstein doesn't claim SOC 2, HIPAA or FedRAMP coverage. The HMAC audit chain is a technical primitive you can build your own compliance case on, not a certification in itself.
- Cloudflare-based cloud execution is still experimental; you deploy it to your own Cloudflare account, and there's no hosted service from the project.
Today's Takeaway
Whether the scheduler itself spends LLM tokens decides whether you can ever replay a run. Bernstein deliberately keeps decomposition, assignment and merge-decisions as plain Python that never touches a model, which buys you a task graph that's identical across two runs of the same plan, and a replay journal you can step back through when something diverges. That's a different bet from "have a smarter agent coordinate the other agents" — the latter is more flexible, but nobody can promise the coordination comes out the same way twice.