interlock checks every tool call your AI agent makes, inside the agent's own
process, and allows, blocks, or rewrites it before it runs. These docs take you
from a first guarded function to a production deployment.
New here? Do the getting started tutorial (about fifteen
minutes), then read how interlock works . Running several machines
and want one review queue and audit trail across them? Read
the cloud plane ; a single-machine install needs none of it.
How these docs are organised
Section
What it's for
Read it when
Getting started
A guided first run, every step with real output
You've never used interlock
Concepts
How a decision is made: events, rules, verdicts, order, failures
You want to understand what you're relying on
Security model
What interlock protects against, what it assumes, where it stops
Before you trust it with anything that matters
Guides (below)
Step-by-step instructions for one task each
You know what you want to do
Reference (below)
Every function, parameter, detector, and CLI flag
You need an exact name or default
Guide
You'll learn to
Console
Build and launch the local web UI over your running policy engine
Writing rules
Block, rewrite, check results, scope rules to tools, and test your policy
Using detectors
Pick from the 122 built-in detectors, make sure they see your tools, and start from a tested set
Declarative policies
Write rules as JSON/YAML, lock the ones that must stay on, and accept project overlays safely
Approvals
Hold a call for a human with ESCALATE, and write an approver
Coding agents
Guard Claude Code, Codex and Cursor with one command
Credentials
Let agents use secrets they never see
Databases and APIs
Judge SQL by what it does, mask what comes back, keep personal data out of queries
Review queue
Refuse now, let a human approve later, run the identical retry once
Integrations
Connect @guard, MCP, LangChain, a model SDK loop, or a Node.js agent
MCP
Guard MCP sessions and decide which servers and tools to trust
Scopes
Give each tenant, agent, and sub-agent its own rules
Audit log
Keep a tamper-evident record of every decision
Sandbox
Run subprocesses under OS-level confinement built from your policy
Mesh
Subscribe to community policy packs, verified from a pinned root and applied in monitor mode first; publish a commons; or report counts with Prio3 validity proofs over DAP
Production checklist
Roll out safely: prove protection is on, monitor mode, refusals, logging, deployment
Cloud plane
Run a hosted control plane for shared review, cross-host audit, and centrally compiled policy, without moving enforcement off the host
Rolling out a policy
Compile, publish to a canary, watch il_policy_swaps_total, promote to 10% and 100%, and roll back without a redeploy
Releasing
Cut a signed PyPI/npm release from a tag with trusted publishing and provenance attestations
Capability
What it buys you
Where
Signed commons
Policy packs verified from a pinned root, with rollback and split-view defences
Mesh
Monitor-first installs
A new pack escalates on a canary and early rings, and blocks only where an operator grants it
Mesh
Operator grants
A pack the operator has not granted never blocks
Mesh
Consent-gated reporting
Nothing leaves a node until report enable, layer by layer, never retroactively
Mesh
Secret-shared counts
Aggregators see one additive share each; only their sum is a total, above a batch floor
Mesh
Prio3 counts over DAP
Validity proofs stop a node from lying about its counts; fixed, non-overlapping batches stop differencing; any DAP deployment can host the leader and helper
Mesh
Transparency log and mirrors
Every published entry is appendable and attributable; mirrors and gossip expose split views
Mesh
Membership credentials
A consensus service can require a credential before a report counts
Mesh
Data licence and erasure
Samples carry a warranty and a licence; an erasure request names what it removes
Mesh
Offline root ceremony
Root keys are held by distinct people, offline, with a published quorum
Root ceremony
Page
Covers
Python API
Every public class and function, with signatures
Detector catalog
All 122 detectors: what they catch, which calls they see, how to build them
Command line
interlock doctor, report, hook, install-hook, policy, learn, trust, mcp, reviews, drift, mesh (including mesh dap task|submit|collect and serve --role dap-leader|dap-helper)
Sidecar
The interlock-sidecar daemon for Node.js agents, and its wire protocol
Policy artifact
Every field of the signed artifact a host enforces, canonical JSON, the epoch, the C ABI, and the parity and budget contract
Cloud runbook
Key rotation, host freeze, chain fork, org deletion, restore and the version floor, manifest expiry, kill switch, evaluator rollback, and webhook triage
Node.js client
The interlock-guard npm package
Native scope store
The optional Rust backend for very large scope trees