interlock documentation
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.
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 |
Guides
| Guide |
You'll learn to |
| Writing rules |
Block, rewrite, check results, scope rules to tools, and test your policy |
| Using detectors |
Pick from the 105 built-in detectors, make sure they see your tools, and start from a tested set |
| 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 |
| Production checklist |
Roll out safely: monitor mode, refusals, logging, deployment |
Reference
| Page |
Covers |
| Python API |
Every public class and function, with signatures |
| Detector catalog |
All 105 detectors: what they catch, which calls they see, how to build them |
| Sidecar |
The interlock-sidecar daemon for Node.js agents, and its wire protocol |
| Node.js client |
The interlock-guard npm package |
| Native scope store |
The optional Rust backend for very large scope trees |
More