Python: [Feature]: A deterministic pre-execution verification middleware for agent actions — AgentDojo v2.2 re-run: ASR=0 / FP=0 (open artifacts, full fix-cycle trajectory inside)
维护者通常 1 天内回复
@eavanvalkenburg 已经在做这个了。
开始于 2026年10月7日。
评估
这个 Issue 还没有评估数据。
描述
Description
Discussions like #8862 (budget enforcement in AgentLoopMiddleware) and #7853 (sandbox abstraction for tool execution) point at the same gap: agent frameworks today observe actions, but the decision to block a dangerous action before it executes is usually left ad hoc. We built that missing piece and would like to offer it to this community as a candidate middleware contract.
What it is
agent-action-verifier (https://github.com/Lsy1533133/agent-action-verifier) is a deterministic pre-execution enforcement layer: every pending action (tool call, network egress, file write) is checked against the agent's declared plan before execution. The judge is fixed-constant math — no LLM call in the enforcement path, no learned parameters — so it adds microsecond-scale cost per action (P99 = 0.13 ms in the synthetic stress suite; production latency not yet measured) and is deterministic and auditable by construction.
Closed-loop results (each reported number is backed by a checksummed artifact in the repo)
- AgentDojo official benchmark, real LLM in the loop (97 tasks × 2 rounds, official injection suite, official
security()judgment): ASR = 0, FP = 0 in the v2.2 full re-run (FP-rate 95% upper bound ≈3.8% at n=97 benign rounds) - Published fix-cycle trajectory FP 16 → 1 → 0 across v1.2 → v2.1 → v2.2 — same-source iteration, failures included, not independent stability trials
- Cross-model spot check: GLM subset (24 benign + 24 attack): FP = 0, ASR = 0
- Synthetic stress layer (100,000 seeded scenarios): FN = 0, FP = 0; interception Wilson-95 lower bound 99.99%+ on that synthetic distribution
- White-box adaptive attacks: 49 cases, 16 adaptive vector families — 43 hard-blocked, 0 bypass; 6 boundary cases documented and not counted as bypasses under the stated threat model
Integration shape (matches your middleware seam)
Wrap the action-dispatch point; the verifier receives (declared plan, pending action) and returns PASS / VETO + rule id. verifier_interface.pyi in the repo specifies the contract; typical adapter is ~10 lines around an AgentLoopMiddleware. Rule families: out-of-plan action, egress breach, scope escalation, tool-consent violation, dangerous value class, arithmetic guard, uninitialised state.
Honest boundaries
Synthetic scenarios are abstracted from publicly disclosed incident categories, not production traffic. Same-source fix cycles ≠ independent stability trials. GLM subset vs full run differ in model and sample size and are not directly comparable. This layer complements monitoring/alignment — it does not replace them.
Verify it yourself
python verify_artifacts.py in the repo recomputes every SHA-256 chain and the Wilson-95 bounds from raw counts — no trust required, stdlib only.
We'd genuinely value feedback on the metrics methodology, and if a deterministic enforcement seam fits the framework's roadmap, if maintainers see a fit, we can align the contract with the framework's middleware design.
Code Sample
Language/SDK
Both
- 主要语言
- Python
- 星标
- 14.5k
- 派生
- 2.6k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 356
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/agent-framework 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
microsoft/agent-framework#9946 · 1 条评论 ·
维护者通常 1 天内回复
-
.NET: [Issue]: Function invocation middleware receives tool results as JsonElement, which the docs do not mention可能已有人在做 @LHB0317 于 3 天前认领。 未关闭.NET triage
难度 1/5 1 小时以内 新手友好度 72/100
microsoft/agent-framework#9918 · 1 条评论 ·
维护者通常 1 天内回复
-
.NET triage
难度 2/5 1-3 小时 新手友好度 66/100
microsoft/agent-framework#9704 · 2 条评论 ·
维护者通常 1 天内回复
-
Python: FileSessionStore.set fails on Windows for long session IDs because its temp file name is 38 characters longer than the snapshot可能已有人在做 @Sonica-B 于 9 天前认领。 未关闭python ready-for-implementation
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/agent-framework#9682 · 已指派 2 人 ·
维护者通常 1 天内回复
-
Python: raw-data content mappings lose annotations and attachment metadata可能重新可做 @moonbox3 于 36 天前认领,目前没有进行中的 PR。 未关闭python triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/agent-framework#8632 · 2 条评论 ·
维护者通常 1 天内回复
查看 microsoft/agent-framework 的全部 Issue
相似的 Issue
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 2 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
Official-Space-AI/OpenPhysGraspGen#114 ·
维护者通常 2 天内回复
-
changelog investigate
难度 2/5 1-3 小时 新手友好度 62/100
ramnes/notion-sdk-py#441 ·
-
qa_bug
难度 2/5 1-3 小时 新手友好度 78/100
NVIDIA-NeMo/Gym#5644 ·
维护者通常 2 天内回复
-
BUG: catalog database credentials printed to logs at startup可能已有人在做 @cjboyle 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复