Bicameral
Pi coding harness where any LLM writes and Jev returns typed reflex scores that policy code turns into allow, confirm, block, warn or steer.
Overview
Bicameral is a hybrid coding harness for the Pi agent. System 2, any LLM Pi runs, plans, writes, explains and debugs. System 1, TypeSafe Jev, answers judgment packs about redacted session state: is this tool call safe, did this edit weaken a test, is the agent looping. Deterministic TypeScript policy and a bicameral.yaml turn the probabilities into allow, confirm, block, warn or steer.
Jev only scores and never writes prose; it answers noul, score and choice questions such as exfiltration, secret access, injected intent and scope escape. A HUD shows the reflexes, and fail-safe behaviour is documented. The README is explicit that this is not a sandbox and isolation remains the job of containers. Version 0.1.0 targets a specific Pi version and @typesafe-ai/sdk 0.6.0 on Node 20+.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does this tool call risk exfiltration / secret access / injected intent / scope escape? | yes · no |
| Yes / no | Did this edit weaken a test? | yes · no |
| Yes / no | Is the agent looping? | yes · no |
How it works
- Pi's LLM proposes a tool call or edit
- Redacted state and a question pack go to Jev
- Jev returns noul, score or choice probabilities
- Policy maps them to allow, confirm, block, warn or steer
- HUD shows the result
Strengths
- Policy in code, not prompts
- Covers safety, test integrity and loop detection
- Explicit fail-safe design
Caveats
- Not a sandbox
- Early version tied to specific Pi and SDK versions
Getting started
See the Install section; requires Node 20+, pnpm and a TypeSafe key.At a glance
- Type
- Project
- Status
- prototype
- Language
- TypeScript
- Runtime
- Pi extension (Node 20+)
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Pi coding harness: LLM writes, Jev supplies typed reflexes for policy, loop detection, and review. Explicitly not a sandbox.
AnotiaWang/awesome-decision-modelsHybrid coding harness: System 2 writes, System 1 (Jev) runs reflexes.
hellogumbo/awesome-jev
Frequently asked questions
Does Jev write code?
No, it only scores; Pi's LLM writes.
Is it a sandbox?
No, the README says isolation is still the job of containers.
What outcomes can policy produce?
Allow, confirm, block, warn or steer.
Related projects
Python agent development kit for building System One pipelines with Jev for guardrails, routing and PR triage.
ProjectprototypePythonCoding-agent hook that asks Jev one yes/no per project rule on every edit or turn and makes the agent fix any violation.
HookbetaTypeScriptSoftware-factory supervisor where Jev independently judges coding agents' completion, test sufficiency, progress and need for a human.
ProjectbetaPythonPi extension that checks proposed code edits against repository Markdown rules with Jev, reporting rule text and line ranges.
ProjectbetaTypeScriptOh My Pi coding agent (a Pi fork with IDE wiring) with an optional TypeSafe judgment provider for bounded decisions.
ProjectproductionRustAgent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.
PluginbetaTypeScript