Compare
Bernstein vs Pydantic AI: quick decision guide
Adapter for Pydantic AI, built from its capability profile.
Page built on 2026-11-20 from data/adapters-meta.json. Every claim below links to its primary source.
Install both
Pydantic AI
No install command recorded in the bernstein adapter source as of 2026-11-20.
Bernstein
pipx install bernsteinApache-2.0. Deterministic Python scheduler.
Feature matrix
| Capability | Pydantic AI | Bernstein |
|---|---|---|
| Install method | Not recorded | pipx install bernstein |
| License | Not recorded | Apache-2.0 |
| Authentication | Not recorded | Per-agent credential scoping (no shared key) |
| Multi-agent orchestration | One agent in a terminal | Pydantic AI plus 52 other adapters in parallel worktrees |
| MCP support | Not measured | Yes |
| Parallel-safe in worktrees | Not measured | Yes (designed around git worktrees) |
| HMAC-chained audit log | No | Yes (RFC 2104 SHA-256 chain in .sdd/) |
| Deterministic scheduler | Not applicable (single-agent CLI) | Yes (Deterministic Python scheduler) |
| Live cost calculator and receipt verification | Not included | Interactive run cost calculator (/cost) and offline cryptographic receipt verifier (/verify) |
Adapter source: src/bernstein/adapters/capability_profile.py
Verifiable facts
The brief for this surface requires at least three facts that a reader can verify against a primary source. The list below is built from the bernstein adapter source and, when available, the upstream project's own pages.
- Bernstein ships a Pydantic AI adapter at src/bernstein/adapters/capability_profile.py that wraps the upstream CLI. [source: bernstein adapter source, as of 2026-11-20]
- Bernstein is an open-source governance layer for AI agents licensed Apache-2.0, with a deterministic Python scheduler that routes work across CLI agents in parallel git worktrees. [source: bernstein repo, as of 2026-11-20]
- Bernstein records lineage and a replay journal on every run; with the audit log enabled it also writes an HMAC-SHA256 chained record under .sdd/ that lets a reviewer replay every routing and quality-gate decision. [source: bernstein repo, as of 2026-11-20]
Where Pydantic AI fits in Bernstein
Bernstein registers Pydantic AI under the slug "pydantic-ai" and the registry name "pydantic_ai". The adapter source lives at src/bernstein/adapters/capability_profile.py in the bernstein repo and was last touched at build time 2026-11-20. The Pydantic AI adapter file is 1,596 lines and 65,043 bytes long, fingerprinted f07b69b87b3a5997 (first 16 hex chars of SHA-256). No upstream GitHub repository is recorded in the bernstein adapter for Pydantic AI; refer to the upstream vendor's documentation when auditing. The bernstein adapter file for Pydantic AI does not yet carry a "Last verified against upstream" line; this means the adapter still tracks an unpinned upstream binary. Bernstein routes tasks to Pydantic AI when its pass rate on similar work clears the configured threshold, otherwise the deterministic Python scheduler picks a different adapter from the catalog.
Adapter source excerpt
The module docstring of the Pydantic AI adapter, as it stands in the bernstein repo. Punctuation is normalised for the web; the wording is the author's. Length: 59 characters.
Adapter for Pydantic AI, built from its capability profile.Adapter telemetry
| Registry name | pydantic_ai |
|---|---|
| Adapter class | Pydantic AI |
| Source file | src/bernstein/adapters/capability_profile.py |
| Source file size | 1,596 lines, 65,043 bytes |
| Source SHA-256 | f07b69b87b3a599733c7f1a0a23f4557a9c3f0b31433ffd8eefd4c1b19813850 |
| Category bucket | cli-family |
| Upstream repo | Not derivable from adapter source |
| Upstream homepage | Not recorded |
| Last verified upstream | No "Last verified" line in adapter source |
| Operator-curated overlay | No (programmatic page) |
When to pick which
Choose Pydantic AI
Reach for Pydantic AI when the work is a single thread that fits one agent: in a single-process terminal session, designed for single-instance use per repo. Auth model is configured per upstream docs. You skip the orchestrator round-trip and get the smallest possible surface between you and the model.
Choose Bernstein
Wrap Pydantic AI under Bernstein when the goal splits into parallel tasks, when you want an HMAC-chained audit log on every routing decision, or when a deterministic Python scheduler (no LLM picking who runs what) is a hard requirement.
FAQ
Does Bernstein replace Pydantic AI?
No. Bernstein wraps Pydantic AI as one of 52 CLI adapters and routes tasks to it based on per-task pass-rate history. Pydantic AI keeps running unchanged; Bernstein decides when it gets work.
Can I run Pydantic AI alongside other agents in the same repo?
Yes. Each agent runs in its own git worktree under .sdd/worktrees/{session_id}, so file edits never collide. Bernstein merges results back to the trunk only after the configured quality gates (lint, types, tests) pass.
Is this comparison page handwritten?
No. The template is fixed; every fact and every link is pulled from the bernstein adapter source in the master branch and (when available) the upstream project's own pages. The data extractor lives at scripts/gen-compare-data.mjs. No LLM writes the prose.