💡 Summary
Interlock is a circuit-breaker for AI infrastructure that ensures quality and provides forensic logging.
🎯 Target Audience
🤖 AI Roast: “Powerful, but the setup might scare off the impatient.”
Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); filesystem read/write scope and path traversal. Run with least privilege and audit before enabling in production.

INTERLOCK
Interlock is a circuit-breaker + evidence layer for AI infrastructure. It monitors runtime signals (confidence/latency/failure), refuses or degrades when the system is outside safe bounds, and writes verifiable forensic logs.
What it does
- Quality gating: refuse/degrade low-certainty responses
- Survivability: shed load and recover cleanly under stress
- Evidence: cryptographic provenance for interventions + configs
- Adapters: integration points for vector DBs and local models
Quickstart
Docs: Quickstart · Local AI · Middleware
Express (Node)
import { interlockExpress } from '@interlock/express'; app.use(interlockExpress({ quality_floor: 0.8 }));
FastAPI (Python)
from interlock_fastapi.middleware import InterlockMiddleware app.add_middleware(InterlockMiddleware, interlock_url="http://brain:3000")
Supported Integrations
| Integration | Status | |-------------|--------| | Pinecone | ✅ Production | | FAISS | ✅ Production | | LangChain | ✅ Production | | LlamaIndex | ✅ Production | | Weaviate | ✅ Stable | | Milvus | ✅ Stable | | Ollama / Local AI | ✅ Tested |
Evidence & Validation
CI workflows produce repeatable artifacts (stress, scale, adapter certification).
See: Test Results · Live Incidents
OperatorPack Receipt Verification
Interlock includes tools to verify and index OperatorPack receipts (JSON).
Usage
-
Verify a receipt:
python tools/verify_operatorpack.py "C:\path\to\operatorpack.json"Outputs a JSON verdict (PASS/WARN/FAIL) based on performance and quality thresholds.
-
Index a receipt:
python tools/append_receipt_index.py "C:\path\to\operatorpack.json" "receipts/RECEIPTS_INDEX.md"Appends metrics to a Markdown table index file for long-term tracking.
Recommended Workflow
Place new receipts in receipts/inbox/ for verification before promotion.
Example using a sample receipt:
python tools/verify_operatorpack.py "receipts/examples/operatorpack_example_pass.json"
Receipt Workflow
Interlock supports a standard promotion workflow for OperatorPacks with 2-Tier Governance:
-
Inbox: Copy new receipt JSON files into
receipts/inbox/. -
Promote: Run the promotion script with the desired tier:
- Production (Default): Strict gates ($N \ge 10,000$).
pwsh -File tools/promote_receipt.ps1- Results land in
receipts/approved/orreceipts/rejected/. - Primary index:
RECEIPTS_INDEX.md.
- Results land in
- Exploration: Faster iteration gates ($N \ge 2,000$).
pwsh -File tools/promote_receipt.ps1 -Mode exploration- Results land in
receipts/approved_experimental/orreceipts/rejected_experimental/. - Secondary index:
RECEIPTS_INDEX_EXPERIMENTAL.md.
- Results land in
- Production (Default): Strict gates ($N \ge 10,000$).
-
Audit: Review the
receipts/approved/folder andRECEIPTS_INDEX.md(or the experimental equivalents) for historical data.
[!NOTE] Approved receipts and summaries are generated locally and are not committed to the repository to maintain data privacy.
Practical: What to do next
- Generate Evidence: Obtain a receipt JSON (OperatorPack) from a lab (e.g., TESLA) — keep it outside Interlock as the source of truth.
- Stage: Copy it into
receipts/inbox/. - Promote (Production):
Or specify a file:pwsh -File tools/promote_receipt.ps1pwsh -File tools/promote_receipt.ps1 -Receipt "C:\path\to\receipt.json" - Promote (Exploration):
pwsh -File tools/promote_receipt.ps1 -Mode exploration - Summarize:
python tools/summarize_receipts.py - Artifact Locations:
receipts/approved/orreceipts/approved_experimental/(Local only)receipts/rejected/orreceipts/rejected_experimental/(Local only)receipts/summary/(Local only)
These outputs are local artifacts and are gitignored by design in this public repo.
AI Collaboration
This repo uses a multi-agent workflow with safety guardrails.
- Project Memory: CLAUDE.md - Build commands, safety rules, agent assignment
- Safety Policy: docs/AI_COLLAB_SAFETY.md - PII protection, merge gates
- Coordination: multi_agent_coord.template.md - Handoff protocol template
AI agents must run tools/precommit_safety_scan.ps1 before commits.
License
MIT. See LICENSE.
Pros
- Enhances AI response quality
- Provides forensic evidence for interventions
- Supports multiple integrations
- Improves system resilience under stress
Cons
- Requires proper configuration for effectiveness
- May add complexity to the AI workflow
- Dependency on external integrations
- Potential performance overhead
Related Skills
useful-ai-prompts
A“A treasure trove of prompts, but don’t expect them to write your novel for you.”
mcpspy
A“MCPSpy: because who doesn't want to spy on their AI's secrets?”
fastmcp
A“FastMCP: because who doesn't love a little complexity with their AI?”
Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.
Copyright belongs to the original author CULPRITCHAOS.
