Skip to content

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.

ProjectprototypeMIT

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

TypeQuestionAnswers
Yes / noDoes this tool call risk exfiltration / secret access / injected intent / scope escape?yes · no
Yes / noDid this edit weaken a test?yes · no
Yes / noIs the agent looping?yes · no

How it works

  1. Pi's LLM proposes a tool call or edit
  2. Redacted state and a question pack go to Jev
  3. Jev returns noul, score or choice probabilities
  4. Policy maps them to allow, confirm, block, warn or steer
  5. 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

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.

    ProjectprototypePython
  • Coding-agent hook that asks Jev one yes/no per project rule on every edit or turn and makes the agent fix any violation.

    HookbetaTypeScript
  • Software-factory supervisor where Jev independently judges coding agents' completion, test sufficiency, progress and need for a human.

    ProjectbetaPython
  • Pi extension that checks proposed code edits against repository Markdown rules with Jev, reporting rule text and line ranges.

    ProjectbetaTypeScript
  • Oh My Pi coding agent (a Pi fork with IDE wiring) with an optional TypeSafe judgment provider for bounded decisions.

    ProjectproductionRust
  • Agent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.

    PluginbetaTypeScript