SENTINEL
SENTINEL
面向运行在支付基础设施上的 LLM 智能体的策略执行、审计与评估控制平面。
提示词级别的护栏只是建议性的。SENTINEL 通过将执行强制移动到工具调用边界——一个模型无法控制的过程——使其成为强制性的,然后用确定性的评估框架和对抗性红队测试套件证明其有效。
⚠️ 仅测试模式 · 与 Razorpay 无关联
独立开源项目。与 Razorpay 无关联、未经其认可,也非其出品。 集成的是公开发布的开源
razorpay/razorpay-mcp-server。
仅使用测试模式密钥(rzp_test_*)——rzp_live_ 密钥会在启动时被拒绝,并被 CI 阻止进入仓库。所有数据均为合成数据且校验和无效,因此任何生成的值都不可能撞上真实标识符。红队测试仅针对本地 fixture 服务器运行,绝不针对托管端点。
问题,用三句话说明
一个无代码构建平台即将让非工程师把 LLM 智能体指向能移动资金的 API,而这些智能体按设计就会摄入攻击者控制的文本——支持工单、退款证据、上传的银行对账单。业界标准的护栏是系统提示词里的一句话,那是对模型的请求:它无法进行单元测试,无论生效还是失效都不产生任何工件,并且在对抗性输入和模型更新下会退化。SENTINEL 在协议边界拦截每一次工具调用,对其分类、脱敏 PII、对照声明式策略进行评估,并在其执行之前允许 / 拒绝 / 升级给人工处理。
Related MCP server: NORNR MCP Control
三个关键数字
由 make redteam 离线生成(配对 A/B 测试,基于规则的评分),任何人无需 API 密钥即可复现。
如何解读这些数字(这一点很重要)。 被测智能体是一个最坏情况、完全被攻破的智能体——一个确定性的替身,被编写为遵循每一条注入指令。这是有意为之:用最大对抗者而非普通对手来测试防御是标准的安全方法论。真实模型可能靠运气抵抗注入;这个替身永远不会。因此,"护栏关闭"列并不是声称真实模型有 X% 的概率被骗——那是最坏情况,关键在于代理层对此做了什么:
面对一个遵循每条注入指令的最坏情况智能体 | 结果 |
护栏关闭(无控制平面) | 执行了 24 次未授权资金移动 + 5 次数据外泄 |
护栏开启 | 0 次未授权资金移动,0 次数据外泄(24/29 次尝试仍然发生——全部在边界被拦截) |
合法工作的误报率 | 0% (基于一个小型良性数据集——见局限性) |
执行不依赖于模型自身的抵抗。 那个"0"是模型无关的、真正被证明的一半——代理层拒绝智能体尝试的任何操作。(隔离包装是一种缓解措施;边界处的权限收窄才是保证。我们并没有"解决"提示注入——没有人解决过。)
护栏开销: 策略评估实测每次调用远低于 0.1 ms,且无可测量的精度损失。
智能体能力区分(尚非真正的多模型对比结果)
运行时按设计是模型无关的,评估框架针对两个不同质量的确定性替身智能体运行:
一个"强"替身取得了 100% 的任务成功率;一个"弱"替身取得了 87% 的成功率,伴有 13 次格式错误的工具调用和较低的高难度用例准确率——而两者的未授权执行、PII 泄露、策略错误均为 0。 这证明了评估框架能够在执行结果保持不变的同时区分智能体能力。 这不是 Groq 与 Gemini 的对比——那需要一次使用真实提供商密钥的一次性录制流程(
SENTINEL_CASSETTE=record),该流程已接好线并准备就绪,但尚未运行。
已针对真实的 razorpay/mcp(测试模式)验证
不仅仅是 mock——SENTINEL 已对照真实发布的服务器进行校验:
工具面一致性是真实的。 参考清单是通过在 MCP stdio 上运行
razorpay/mcp:latest并调用tools/list(41 个工具)实机捕获的;fixture 原样加载该捕获,因此一致性是真实的,而非循环论证。(这纠正了若干源自文档的错误——见DECISIONS.mdADR-003a。)针对实机服务器的执行是成立的。 使用测试模式密钥时,
create_refund在被转发到 Razorpay 之前就被拒绝,而真实的fetch_all_payments会通过代理返回真实的{entity,count,items}结构,且脱敏与审计保持完整。复现方法:
export RAZORPAY_KEY_ID=rzp_test_… RAZORPAY_KEY_SECRET=… && make check-schemas-live(需要 Docker)。仅限测试模式密钥;不会执行任何资金移动操作;密钥从不写入文件。
快速开始(无需凭据)
一切都在 fixture 模式下离线运行,使用 cassette 回放——无需 API 密钥,无需网络。
make install # venv + dependencies
make test # tiers 1-3 + the 5 load-bearing safety tests (~3s, no model)
make demo-cli # THE HEADLINE: an injected refund DENIED with a plain reason
make eval # golden set, per-model metrics, regression gates
make redteam # the paired A/B (100% -> 0%), ablation, false-positive rate
make verify-audit # walk the tamper-evident hash chain
make demo # the operator surface at http://localhost:8080make demo-cli 输出(节选):
2 · Prompt injection in the statement — the refund is DENIED
the fooled model attempted: create_refund amount=₹450.00
✕ DENIED [DENY_FAIL_CLOSED]
Blocked: no rule permits create_refund for this agent, and the default is to deny.
refunds actually executed in the fixture: 0
4 · The audit chain — verifiable, and it breaks when tampered
⛓ verified — 7 entries, chain intact
after altering entry #2: ⛓ CHAIN BROKEN at entry #2 — refusing to certify部署公开演示(fixture 模式,无需凭据)
操作员界面 + API 打包为一个多阶段 Docker 镜像(已验证:它能构建并同时提供 SPA、API 和红队数字)。可免费托管在 Render / Fly / Railway 或任何 Docker 主机上——完整步骤见
DEPLOY.md:
docker build -t sentinel . && docker run -p 8080:8080 sentinel # -> http://localhost:8080
# Render: New > Blueprint (reads render.yaml). Fly: fly launch --no-deploy && fly deploy.不要在公开演示上设置任何真实密钥——它旨在无真实数据地运行护栏(仓库中没有任何真实数据)。
架构——在模型无法控制的过程中执行
Operator surface (React) ──REST+SSE──> Control-plane API (FastAPI)
│
Agent runtime (in-house loop)
├─ in-loop guard (layer 2, the experience)
└─ provider abstraction (Groq/Gemini, cassettes)
│ MCP protocol
SENTINEL MCP proxy (layer 1 — THE GUARANTEE)
classify → redact → evaluate → allow/deny/escalate
→ idempotency → forward → scan/quarantine → audit
│
fixture upstream (default) | razorpay/mcp (live, test keys)
cross-cutting: pure policy engine · redaction · hash-chained audit · approvals
offline: eval harness (golden set) · red-team A/B → CI regression gatesMCP 代理是一个真正的 MCP 服务器,因此指向它的任何完全不同的 MCP 客户端都受相同策略约束——这是提示词永远无法拥有的属性。两个执行层通过同一个上下文构建器调用同一个纯策略引擎;不一致会被记录为 P0 事件。完整讲解和每个决策:docs/handbook.html 及下文阅读材料。
即使模型出错时它如何仍然成立
纯策略引擎 ——
evaluate(policy_set, context),无 I/O,经过穷举测试和属性测试。一个类别下限不变量使得任何策略文件,无论怎么写,都不可能在没有审批的情况下自动放行资金移动(在 400 个生成的策略上得到证明)。脱敏 —— 模型基于稳定令牌(
ACCT_a17f)进行推理,永远不会接触到真实的 PAN/账户/VPA;工具调用中出现未签发的令牌即被标记为外泄企图。PII 不变量在每次提交时针对每一个输出面进行测试。信任隔离 —— 不可信文本被包裹在每次运行的 nonce 分隔符中;
provenance_guard在智能体摄入不可信内容后收窄其权限。防篡改审计 —— 追加式 SHA-256 哈希链;验证器会在精确位置报告第一个断裂点。
这不是什么
不是 Agent Studio 的克隆,不是支付产品,不是通用 AI 防火墙,不是欺诈模型,也与 Razorpay 无关联。
局限性(诚实的那些——完整列表见 LIMITATIONS.md)
审计账本是防篡改的,而非防篡改证明:任何能写入数据库的人都可以重算整条链。真正的抵抗力需要外部锚点(RFC 6962 风格的透明度日志)或一次性写入存储——尚未实现。
提示注入并未解决。 即使护栏开启,L1(行为被改变)也非零;设计使其变得无害,而不是假装它不可能发生。
离线的"模型"是确定性替身——真实的 Groq/Gemini 适配器和 cassette 层已构建好,并在存在密钥时激活(
SENTINEL_CASSETTE=record);执行结果无论如何都可以离线证明。智能体在真实数据上的
tools/call响应仅验证了结构和执行(测试账户为空);对真实 PII 的脱敏是在合成 fixture 上证明的,尚未在已填充的实机数据上验证。
文档
docs/handbook.html—— 端到端手册(在浏览器中打开)。DECISIONS.md—— 每一个架构决策,及其权衡取舍。LIMITATIONS.md—— 它不能做什么,毫不讳言。docs/spec/—— 构建它所依据的规范包。
复现这些数字
git clone <repo> && cd sentinel && make install
SENTINEL_CASSETTE=replay make eval # replays committed cassettes, no key -> same numbers
SENTINEL_CASSETTE=replay make redteam按 docs/spec/11-BUILD-ORDER.md 分阶段构建;
169 个测试通过(第 1–3 层),其中五个承重安全测试标记为
@pytest.mark.critical。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA transparent proxy and execution firewall that intercepts and audits AI agent tool calls against configurable security policies before forwarding them to downstream MCP servers. It provides safe execution environments with features like data redaction, anti-loop protection, and unified alert dispatching.
- AlicenseNot gradedqualityDmaintenanceA governance and control layer for MCP tools that manages tool requests as intents through policy-based approval, queuing, or blocking. It enables secure human oversight and audit trails for consequential agent actions across platforms like Claude Desktop and Cursor.1MIT No Attribution
- AlicenseNot gradedqualityAmaintenanceA local-first control plane for AI agent tools, providing policy enforcement, spend caps, rate limiting, and audit trails for MCP servers.1Apache 2.0
- FlicenseNot gradedqualityBmaintenanceRuntime agent firewall for PII redaction, rate limits, and policy enforcement, enabling autonomous agent security via MCP integration.
Related MCP Connectors
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Runtime permission, approval, and audit layer for AI agent tool execution.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/codeit-ronit/SENTINEL'
If you have feedback or need assistance with the MCP directory API, please join our Discord server