Bernstein: Deterministic Multi-Agent CLI Orchestration

Summary

Bernstein is a deterministic Python scheduler that runs a crew of CLI coding agents (45+ adapters including Claude Code, Codex, Gemini CLI) against a single goal in parallel git worktrees, with an HMAC-SHA256-chained audit log. 648 stars at the 2026-07-09 capture.

Key Architecture Decisions

  • Deterministic scheduling: Uses LLM only once for goal decomposition; the rest (parallel execution, branch isolation, testing, retry routing) is plain Python — supports reproducing the recorded plan/task graph and verifying governance records; it does not make fresh LLM outputs or changing external services identical
  • HMAC-SHA256 audit chain: Optional audit mode adds an HMAC chain; the journal and lineage record are separate. HMAC is a symmetric MAC, not a public-key signature, and integrity alone does not establish the signer identity
  • Signed agent cards: Ed25519/JWS detached signatures
  • Per-artefact lineage: Merkle-chained spine recording every adapter file write
  • Verifiable governance: RBAC, budget, and seat decisions are deterministic projections over the lineage spine
  • Air-gap deploy: Install from signed wheelhouse, deny outbound by default

Key Commands (2026-10-09 official README)

  • bernstein -g "fix the failing test" — one-shot multi-agent run
  • bernstein audit verify — verify an audit chain produced with audit enabled
  • bernstein verify receipt <receipt.json> — check a recorded receipt; pin the expected public key when identity matters
  • bernstein workflow run idea-to-pr -g "<goal>" — YAML workflow DAGs

Relevance to Hermes

  • HMAC audit chain pattern could apply to Hermes multi-agent coordination
  • Complementary to Kanban Worker pattern: Bernstein does deterministic scheduling, Kanban does queue management
  • Install: pipx install bernstein && bernstein init

References

2026-10-09 source check: official README. Commands and audit defaults above supersede the capture; adapters and stars are historical counts.