Overview
Bernstein is an open-source orchestrator and governance layer for AI agents, written in Python and released under Apache-2.0. You give it a goal or a declarative YAML plan; one LLM call decomposes the goal into tasks with roles, owned files and completion signals, and from there a deterministic scheduler written in plain Python takes over. No model sits in the coordination loop, so replaying yesterday's plan produces yesterday's task graph.
Each coding task runs in its own git worktree, so agents never share a mutable checkout and the main branch stays clean. A janitor checks concrete signals — tests pass, files exist, lint is clean, types check — before verified work is merged; failed tasks are retried or routed to a different model. The agents themselves are the CLI tools you already use: Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, Aider, Goose, OpenCode, OpenHands and more than 50 other adapters, plus a generic wrapper for anything with a --prompt flag, and you can mix cheap local models with heavier cloud models in the same run.
What sets it apart is the record it keeps. Every run writes a replay journal and an always-on lineage spine; an opt-in HMAC-chained audit log adds tamper-evident receipts, and a run can be sealed into a single Ed25519-signed receipt that a reviewer verifies offline from the file alone. The same machinery covers non-code work — a task can declare an artifact contract for a report, dataset or action log and complete on a signed lineage receipt instead of a commit. The maintainer labels the project beta and solo-maintained, and advises pinning the version, since minor releases may change interfaces.
What it does
- Deterministic scheduling: a single LLM call plans the work, then plain Python schedules, gates and merges it, so runs are reproducible and replayable
- Parallel CLI agents in isolated git worktrees, with more than 50 adapters (Claude Code, Codex CLI, Gemini CLI, Aider, Goose, OpenCode and others) plus a generic --prompt wrapper
- Verification gates before merge — tests, file existence, lint and type checks — with failed tasks retried or rerouted to another model
- Declarative YAML workflows with phases, role fences, conditional dependencies and retries, resumable from the first incomplete node
- Checkable runs: replay journal, lineage spine, opt-in HMAC audit chain and Ed25519-signed run receipts verified offline

- Two operator surfaces on the same task API: the bernstein live terminal dashboard and a browser dashboard via bernstein gui serve
Getting started
Bernstein needs Python 3.12 or later and Git, on macOS, Linux or Windows. Before the first run you also need at least one CLI coding agent (Claude Code, Codex CLI, Gemini CLI, ...) installed and authenticated.
Install it
uv tool install is the recommended path; pipx, pip, Homebrew and Docker also work. Optional extras pull in provider SDKs and sandbox backends only when you need them.
uv tool install bernstein # or: pipx install bernstein
# or: brew install chernistry/tap/bernstein
bernstein --versionInitialise the project and run the pre-flight check
init creates the .sdd/ workspace, bernstein.yaml and templates. doctor checks installed agent CLIs, API keys, ports and the workspace; each failing row names the step to fix.
cd your-project
bernstein init
bernstein doctorGive it a goal and watch the agents
Agents spawn in parallel worktrees, verify their work and exit. bernstein live opens the terminal dashboard; bernstein stop shuts down gracefully with a drain.
bernstein -g "fix the failing test in tests/test_foo.py"
bernstein live
Run a declared plan or workflow
A plan file skips LLM planning and executes directly. Workflows are YAML DAGs of agent, command and loop nodes, checkpointed to .sdd/runs/<run_id>/ so an interrupted run can be resumed.
bernstein run plan.yaml
bernstein workflow run idea-to-pr -g "Add JWT auth" # prints run_id
bernstein workflow resume <run_id>Prove what a run did
Enable the audit chain, then verify the journal, the lineage spine and the chain. A signed run receipt can be checked offline from the file alone.
BERNSTEIN_AUDIT=1 bernstein -g "fix the failing test in tests/test_foo.py"
bernstein replay latest --verify
bernstein lineage verify <run_id>
bernstein audit verify
bernstein verify run <run_id> --signing-key-path key.pem
bernstein verify receipt .sdd/runs/<run_id>/run-receipt.jsonCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Run several CLI coding agents on one repository at once without them trampling each other's checkout or merging unverified work
- Keep an auditable, replayable record of what agents did — for code review, compliance evidence or debugging a run that went wrong
- Encode a repeatable multi-stage process (scope, collect, validate, deliver) as a YAML workflow with role fences and approval gates
- Mix agents and models in a single run, sending boilerplate to cheap local models and architecture work to heavier cloud models
How Bernstein compares
Bernstein alongside other open-source coding-agent harnesses & runtimes tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CC Switch | ★ 150k | A cross-platform desktop app that manages provider configuration for eight coding-agent CLIs from one place, with a local failover proxy, MCP and skill management, and spend tracking. |
| Oh My OpenAgent | ★ 70.5k | Opinionated agent bundle for OpenCode and Codex CLI that ships preconfigured sub-agents, lifecycle hooks and built-in MCP servers behind a single ultrawork command. |
| herdr | ★ 47k | A single-binary terminal multiplexer built for coding agents: persistent sessions across local and SSH machines, per-pane working/blocked/idle status, and a socket API agents drive themselves. |
| oh-my-claudecode | ★ 40.4k | A plugin and CLI that adds multi-agent orchestration to Claude Code: staged autopilot workflows, parallel tmux workers, and advisors that route a second opinion to Codex, Gemini, Grok or Cursor. |
| AionUi | ★ 33.9k | An open-source desktop workspace that pairs a built-in agent engine with dozens of external CLI agents, adding scheduled runs, MCP tools and remote access from a WebUI or chat apps. |
| cmux | ★ 28.6k | A Ghostty-based macOS terminal built around coding agents: vertical tabs that show git branch, PR status and ports, attention notifications when an agent needs you, and a scriptable built-in browser. |
| cc-connect | ★ 16.2k | A Go daemon that bridges local coding agents — Claude Code, Codex, Cursor Agent, Gemini CLI, OpenCode, Kimi CLI and more — to Feishu, DingTalk, Slack, Telegram, Discord, LINE and WeCom, so you drive them from chat. |
| Bernstein | ★ 1.3k | A deterministic orchestrator that runs Claude Code, Codex, Gemini CLI and other CLI agents in parallel, gates their work and records every step for offline verification |
