AegisFlow Local-First Policy Gateway
AegisFlow Local-First Policy Gateway
一句话结论
AegisFlow 是一个本地优先的 agent policy gateway:它把 MCP、OpenAI-compatible API、Anthropic Messages API、shell/SQL/GitHub/HTTP 等动作统一抽象成 ActionEnvelope,再按 protocol、tool、target、capability、actor、task、session context 做 allow / review / block 决策,并把审批、scoped credential 和 signed evidence chain 纳入同一个运行时边界。
命中的知识点轴
- MCP Gateway / federation control plane:把 MCP remote gateway、stdio bridge、LLM provider API 与外部工具动作统一收口到 policy gateway。
- harness-runtime:把 coding-agent 的 read/test/PR/delete 等动作变成可路由、可审批、可复验的 harness action,而不是只靠提示词约束。
- sandbox-security:重点不是容器隔离,而是 destructive action、凭据、审批与证据链的本地控制边界。
- benchmark-evaluation:
record-proof.sh和 signed evidence chain 提供了最小可复现 proof:allow、block、review、approval、retry、verify signatures。
为什么对用户重要
| 对 Hermes / llm-wiki 来说,AegisFlow 的价值不在“又一个 MCP gateway”,而在它把无人 agent loop 最难治理的三件事放到同一个可操作界面里:动作归一化、审批/凭据边界、证据链。现有 wiki 已经积累了 MCP-Gateway-Runtime、[[agentflow-flow-centric-agent-security-policy | AgentFlow]]、[[gatra-zero-trust-agent-security-proxy | GATRA]]、[[aipermission-local-permission-gateway | AIPermission]]、[[onecli-team-agent-harness | OneCLI]] 等材料;AegisFlow 补上的关键点是“PR writer / coding agent 的日常动作如何被低摩擦治理”。 |
这对用户的日常 agentic coding 很实用:读 repo、跑测试、创建 feature branch 可以 allow;创建 PR 进入 review;merge、force push、删除 repo、部署生产环境等动作 block 或 review。这个策略形态比“一刀切禁用 shell/GitHub 工具”更符合长期使用:它保留 agent 的速度,同时把高风险动作留在可审计边界内。
机制 / 一阶原理
AegisFlow 的核心抽象是把不同协议和工具调用翻译成统一的 ActionEnvelope。策略引擎不直接理解“Claude Code 想干什么”,而是判断结构化字段:protocol、tool、target、capability、actor、task、session。这样 policy 可以跨 MCP、GitHub、shell、SQL、HTTP 复用,并能对同一业务动作实施一致治理。
第二个机制是 review-resume。PR writer proof 中,github.create_pull_request 先返回 review,进入 approval queue;审批通过后,客户端用相同语义动作重试,gateway 判断 actor、task、protocol、tool、target、arguments、requested capability 匹配后才 allow。也就是说,审批不是泛化为“接下来 5 分钟随便执行”,而是绑定到具体动作。
第三个机制是 signed evidence chain。每次 allow / block / review / approval 都进入 session evidence,最后可以验证签名和链。对 Agent-Benchmarks 来说,这是一种 claim-level receipt:agent 最终报告“我没有删除 repo / 我创建了 PR”不足够,harness 应能回放 gateway decision 和 upstream forwarding 证据。
和已有 wiki 概念的关系
| - 相比 [[agentflow-flow-centric-agent-security-policy | AgentFlow]],AegisFlow 更偏工程运行时 proof:AgentFlow 强调信息流/taint/path policy,AegisFlow 强调 coding-agent 动作边界、审批队列、scoped credentials 和 signed evidence。 |
| - 相比 [[aipermission-local-permission-gateway | AIPermission]],AegisFlow 覆盖更广的 protocol/tool 面,并给出 PR writer starter-kit;AIPermission 更集中于本地 connector credential boundary。 |
| - 相比 [[onecli-team-agent-harness | OneCLI]],AegisFlow 更像可插入现有 coding agent 的 policy gateway;OneCLI 更像团队 sandbox/harness 一体化入口。 |
- 相比 MCP-Gateway-Runtime 下的聚合型 gateway,AegisFlow 提醒我们:gateway 的价值不只是合并 endpoints,也包括把“是否执行”变成可审批、可审计、可验证的 runtime decision。
对 Hermes / llm-wiki 的可执行启发
- Hermes 工具面应维护 risk-tier policy pack。 例如 radar job 只读 web/GitHub/arXiv;wiki ingest job 可写 vault 但不能发布/删除;publishing job 可写 CVM 但需要 explicit artifact path;代码任务可运行 tests 但不能 merge/deploy。
- 审批应绑定 exact action,而不是泛化 token。 若未来 Hermes 支持人类审批,approval receipt 应记录 actor、job id、tool、target、arguments hash、capability、expiry、reviewer。
- 每个无人 cron 都应有 evidence chain。 今日的 raw sha、source page、index/log 更新、reindex 输出就是 llm-wiki 版本的 receipts;更成熟时可结构化成 candidate tape。
- block/review/allow 应进入 benchmark 维度。 一个 coding agent benchmark 不只评估任务是否完成,还要评估它遇到 blocked destructive action 时是否澄清、改用安全路径、停止或绕过边界。
失败模式 / 边界条件
- README 明确说明 built-in editor file 或 shell tools 只有在经 MCP 或配置边界路由时才被覆盖;agent 直接调用本地 shell/编辑器能力时,gateway 不会神奇拦截。
- 策略默认值如果太宽会失去边界,太窄则诱导 agent 绕路,例如把应走 GitHub API 的动作改成 shell 命令;policy pack 需要贴近日常 workflow。
- Review-resume 依赖“同一动作”的匹配质量;如果参数 canonicalization 或 target 提取不稳定,可能误拒绝或误放行。
- Signed evidence 证明 gateway 看到和决定了什么,不等于证明真实外部系统状态已达到预期;仍需要 upstream receipt 或独立 verifier。
- 项目证据主要来自 README/docs/starter-kit,尚未运行本地 demo,因此本页
confidence: medium。
候选评分
| 维度 | 分数 | 理由 |
| relevance | 5/5 | 直接命中 MCP Gateway、harness-runtime、sandbox-security、benchmark-evaluation。 |
| novelty | 4/5 | 与已有 gateway 页面重叠,但 ActionEnvelope + review-resume + signed evidence chain 组合有新增机制价值。 |
| durability | 4/5 | coding-agent policy gateway 和证据链会长期影响 agent runtime 设计。 |
| actionability | 5/5 | 可直接迁移为 Hermes job/tool risk-tier、approval receipt、evidence chain 字段。 |
| source-quality | 3/5 | GitHub README/docs/starter-kit 可访问,但未实际运行,独立采用证据不足。 |
| depth-potential | 5/5 | 能深化 MCP control plane、harness policy、security-adjusted benchmark 三个主题簇。 |
写入记录
- 2026-09-04 09:00 CST:基于 AegisFlow README、architecture、PR writer proof、quickstart 和 PR writer policy pack 新建 source 页,提炼 ActionEnvelope、review-resume、scoped credentials 与 signed evidence chain 对 Hermes/tool governance 的启发。