Interlock如何为AI基础设施提供熔断保护与证据层?(附核心功能详解)
AI Summary (BLUF)
Interlock is an AI infrastructure circuit-breaker and evidence layer that monitors runtime signals, refuses or degrades unsafe responses, and provides cryptographic forensic logging for quality control and system resilience.
原文翻译: Interlock是一个AI基础设施断路器与证据层,监控运行时信号,在系统超出安全范围时拒绝或降级响应,并提供加密取证日志,用于质量控制和系统弹性。

Interlock:为 AI 基础设施构建的熔断器与证据层
项目概述
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.
Interlock 是一个为 AI 基础设施设计的熔断器与证据层。它监控运行时信号(置信度/延迟/故障),当系统超出安全边界时拒绝或降级请求,并生成可验证的取证日志。
核心功能
Interlock 提供以下核心功能:
- 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 · Local AI · Middleware
Docs: Quickstart · Local AI · Middleware
Express (Node.js)
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")
支持的集成
Interlock 与主流 AI 基础设施组件广泛兼容,其集成状态如下:
| 集成组件 | 状态 | 备注 |
|---|---|---|
| Pinecone | ✅ Production | 生产就绪 |
| FAISS | ✅ Production | 生产就绪 |
| LangChain | ✅ Production | 生产就绪 |
| LlamaIndex | ✅ Production | 生产就绪 |
| Weaviate | ✅ Stable | 稳定 |
| Milvus | ✅ Stable | 稳定 |
| Ollama / Local AI | ✅ Tested | 已测试 |
Supported Integrations
Interlock offers broad compatibility with mainstream AI infrastructure components. The integration status is as follows:
Integration Status Notes Pinecone ✅ Production Production-ready FAISS ✅ Production Production-ready LangChain ✅ Production Production-ready LlamaIndex ✅ Production Production-ready Weaviate ✅ Stable Stable Milvus ✅ Stable Stable Ollama / Local AI ✅ Tested Tested 证据与验证
CI workflows produce repeatable artifacts (stress, scale, adapter certification).
持续集成(CI)工作流生成可重复的制品(压力测试、规模测试、适配器认证)。
参见:Test Results · Live Incidents
See: Test Results · Live Incidents
OperatorPack 收据验证
Interlock includes tools to verify and index OperatorPack receipts (JSON).
Interlock 包含用于验证和索引 OperatorPack 收据(JSON格式)的工具。
使用方法
验证收据:
python tools/verify_operatorpack.py "C:\path\to\operatorpack.json"根据性能和质量阈值输出 JSON 格式的裁决结果(PASS/WARN/FAIL)。
Outputs a JSON verdict (PASS/WARN/FAIL) based on performance and quality thresholds.
索引收据:
python tools/append_receipt_index.py "C:\path\to\operatorpack.json" "receipts/RECEIPTS_INDEX.md"将指标追加到 Markdown 表格 索引文件中,用于长期跟踪。
Appends metrics to a Markdown table index file for long-term tracking.
推荐工作流
Place new receipts in
receipts/inbox/for verification before promotion.将新收据放入
receipts/inbox/目录,以便在升级前进行验证。使用示例收据:
python tools/verify_operatorpack.py "receipts/examples/operatorpack_example_pass.json"收据工作流
Interlock supports a standard promotion workflow for OperatorPacks with 2-Tier Governance:
Interlock 为 OperatorPack 支持一个标准的升级工作流,采用 两级治理 模式:
收件箱:将新的收据 JSON 文件复制到
receipts/inbox/。Inbox: Copy new receipt JSON files into
receipts/inbox/.升级:使用所需的层级运行升级脚本:
Promote: Run the promotion script with the desired tier:
- 生产环境(默认):严格的门控($N \ge 10,000$)。
pwsh -File tools/promote_receipt.ps1
- 结果存放在
receipts/approved/或receipts/rejected/。- 主索引:
RECEIPTS_INDEX.md。Production (Default): Strict gates ($N \ge 10,000$).
- Results land in
receipts/approved/orreceipts/rejected/.- Primary index:
RECEIPTS_INDEX.md.- 探索环境:更快的迭代门控($N \ge 2,000$)。
pwsh -File tools/promote_receipt.ps1 -Mode exploration
- 结果存放在
receipts/approved_experimental/或receipts/rejected_experimental/。- 二级索引:
RECEIPTS_INDEX_EXPERIMENTAL.md。Exploration: Faster iteration gates ($N \ge 2,000$).
- Results land in
receipts/approved_experimental/orreceipts/rejected_experimental/.- Secondary index:
RECEIPTS_INDEX_EXPERIMENTAL.md.审计:审查
receipts/approved/文件夹和RECEIPTS_INDEX.md(或对应的实验环境文件)以获取历史数据。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.实践:后续步骤
- 生成证据:从实验室(例如 TESLA)获取收据 JSON(OperatorPack)——将其保留在 Interlock 外部作为事实来源。
Generate Evidence: Obtain a receipt JSON (OperatorPack) from a lab (e.g., TESLA) — keep it outside Interlock as the source of truth.
- 暂存:将其复制到
receipts/inbox/。Stage: Copy it into
receipts/inbox/.- 升级(生产环境):
或指定文件:pwsh -File tools/promote_receipt.ps1pwsh -File tools/promote_receipt.ps1 -Receipt "C:\path\to\receipt.json"Promote (Production):
Or specify a file:pwsh -File tools/promote_receipt.ps1 -Receipt "C:\path\to\receipt.json"- 升级(探索环境):
pwsh -File tools/promote_receipt.ps1 -Mode explorationPromote (Exploration):
- 汇总:
python tools/summarize_receipts.pySummarize:
- 制品位置:
Artifact Locations:
receipts/approved/或receipts/approved_experimental/(仅本地)
receipts/approved/orreceipts/approved_experimental/(Local only)receipts/rejected/或receipts/rejected_experimental/(仅本地)
receipts/rejected/orreceipts/rejected_experimental/(Local only)receipts/summary/(仅本地)
receipts/summary/(Local only)These outputs are local artifacts and are gitignored by design in this public repo.
这些输出是本地制品,在此公共仓库中已通过
.gitignore设计为忽略。AI 协作
This repo uses a multi-agent workflow with safety guardrails.
本仓库采用具有安全护栏的多智能体工作流。
- 项目记忆:CLAUDE.md - 构建命令、安全规则、智能体分配
Project Memory: CLAUDE.md - Build commands, safety rules, agent assignment
- 安全策略:docs/AI_COLLAB_SAFETY.md - PII 保护、合并门控
Safety Policy: docs/AI_COLLAB_SAFETY.md - PII protection, merge gates
- 协调:multi_agent_coord.template.md - 交接协议模板
Coordination: multi_agent_coord.template.md - Handoff protocol template
AI agents must run
tools/precommit_safety_scan.ps1before commits.AI 智能体在提交前必须运行
tools/precommit_safety_scan.ps1。许可证
MIT. See LICENSE.
MIT。参见 LICENSE。
常见问题(FAQ)
Interlock 如何提升 AI 搜索系统的可靠性?
Interlock 作为 AI 基础设施的熔断器,通过监控运行时信号(如置信度、延迟),在系统超出安全边界时自动拒绝或降级低质量响应,从而保障系统在压力下的生存能力和服务质量。
Interlock 支持哪些常见的 AI 工具或数据库集成?
Interlock 与主流 AI 基础设施广泛兼容,包括生产就绪的 Pinecone、FAISS、LangChain、LlamaIndex,以及稳定的 Weaviate、Milvus,并支持已测试的 Ollama / Local AI 等本地模型集成。
Interlock 的加密取证日志有什么作用?
Interlock 提供的加密取证日志为所有干预操作和配置变更生成可验证的来源证明,用于质量控制和事后审计,确保系统行为的透明性与可追溯性,增强整体系统弹性。
版权与免责声明:本文仅用于信息分享与交流,不构成任何形式的法律、投资、医疗或其他专业建议,也不构成对任何结果的承诺或保证。
文中提及的商标、品牌、Logo、产品名称及相关图片/素材,其权利归各自合法权利人所有。本站内容可能基于公开资料整理,亦可能使用 AI 辅助生成或润色;我们尽力确保准确与合规,但不保证完整性、时效性与适用性,请读者自行甄别并以官方信息为准。
若本文内容或素材涉嫌侵权、隐私不当或存在错误,请相关权利人/当事人联系本站,我们将及时核实并采取删除、修正或下架等处理措施。 也请勿在评论或联系信息中提交身份证号、手机号、住址等个人敏感信息。