microsoft安全与隐私

Agent Governance Toolkit

agent-governance-toolkit

为 AI Agent 工具调用加入策略检查、身份、审计、沙箱与 SRE 控制的治理工具包,可接入多种 Agent 框架。

  • 安全
  • 后端
  • DevOps / 运维
  • 自动化
  • 监控 / 可观测
  • CLI
  • 库/框架
  • IDE 插件
  • 支持自托管
  • 支持本地运行
  • 支持 Docker
agent-governance-toolkit 截图
社区热度
6.2k Stars
GitHub 收藏
最近活跃
2026/9/10
近 30 天还在更新
授权协议
MIT
宽松协议

为什么值得关注

不是看 Star 排名,而是看它解决了什么问题、实际有没有用,以及方法为什么值得关注。

近 90 天

解决的问题

AI 代理在生产环境中直接调用工具、操作数据库和访问外部服务时,缺乏有效的确定性控制。传统的 OAuth 或提示词安全无法阻止破坏性操作或满足合规审计需求。

实际价值

提供基于应用层代码拦截的治理内核,在模型意图执行前通过 YAML 策略进行结构化拦截与审计,支持 Python、TypeScript、.NET、Rust 和 Go 多语言。

创新 / 差异化

放弃单纯依赖提示词层面的安全防御,转而在确定性代码中拦截并实施基于规则的拒绝策略,从结构上确保违规操作无法发生。

扩展潜力

只需在工具函数外包装或接入策略引擎,即可为现有代理框架快速增加合规检查、身份标识与沙箱控制,集成路径短。

为什么是现在

当前大模型代理正快速向生产环境迁移,针对提示词注入和越权操作的安全监管与合规审计需求处于爆发期。

社区活跃度

近 90 天新增 141 个 Issue、749 个 PR;窗口内抽取的 Issue/PR 样本中有 30 位 Issue 发起者、19 位 PR 贡献者,并发布 0 个版本。

维护者响应

窗口内 99 个 Issue 样本关闭率 36%,94 个 PR 样本合并率 81%。维护者评论样本仅覆盖该 Issue 样本的 16%,不足以可靠判断首次响应率与响应速度。

PR 样本 19 位贡献者0 次 ReleasePR 合并率 81% · 94 条窗口样本

核心亮点

  • 在工具调用、消息和委派执行前应用 YAML/策略引擎判定
  • 支持允许、拒绝、审批以及可审计的决策记录
  • 提供身份、信任、运行时沙箱、SRE、合规与 MCP 安全组件

快速开始

安装方式、上手难度、开始步骤。

装在哪

本地运行

难不难

中等,需要一点配置

支持 Docker支持自托管支持本地运行
  1. 01准备 Python 3.11+,执行 pip install "agent-governance-toolkit[full]" 安装完整 Python 工具包。
  2. 02先运行 agt doctor 检查安装,再为需要治理的操作编写 YAML 策略。
  3. 03govern() 包装工具函数,验证允许、拒绝和审批路径是否符合预期。
  4. 04进入生产前再按风险需要增加审计、身份、容器隔离、SRE 或 MCP 安全组件。

更适合谁

  • 希望数据放在自己服务器上的团队
  • 想在本机直接跑起来试用的开发者
  • 习惯用 Docker 部署的人

需留意

  • 2 项根据材料推断,可在下方「信息来源」中核对

更多介绍

Microsoft Agent Governance Toolkit(AGT)把 Agent 的工具调用、消息发送和委派操作放在确定性的应用层策略检查之后执行。最简单的 Python 用法可以用 govern() 包装一个工具函数,再通过 YAML 策略决定允许、拒绝或要求审批,并记录策略判定。

项目进一步提供身份与信任、执行沙箱、审计与合规、SRE/kill switch、MCP Security Gateway 等组件,并有 Python、TypeScript、.NET、Rust 和 Go SDK,以及 Claude Code 等开发工具的接入方式。它也提供 agt CLI 用于安装检查、策略校验、合规验证和安全测试。

当前 README 明确标注为 Public Preview,并提醒 GA 前可能有 breaking changes;同时文档说明治理发生在应用中间件层,并不等同于操作系统级隔离。生产环境仍建议将不同 Agent 放入独立容器。

信息来源

每条信息都标注了状态与出处,可展开查看。

14 条 · 展开
  • capability tags

    已核验

    security、automation、monitoring

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • editor note

    已核验

    {"en":"AGT addresses the layer after a model decides to use a tool: deterministic enforcement and audit before the action reaches the target, rather than another safety prompt. It is relevant once agents touch real data or write-capable tools, but the Public Preview status means integrations should allow for API change.","zh":"AGT 解决的是“模型已经决定要调用工具以后,谁来做确定性拦截和审计”这一层问题,而不是再加一段安全 Prompt。它适合开始把 Agent 接入真实数据和写操作的团队,但当前仍是 Public Preview,接口稳定性要留余量。"}

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • how to use

    已核验

    {"steps":[{"en":"Prepare Python 3.11+ and install the full Python toolkit with `pip install \"agent-governance-toolkit[full]\"`.","zh":"准备 Python 3.11+,执行 `pip install \"agent-governance-toolkit[full]\"` 安装完整 Python 工具包。"},{"en":"Run `agt doctor` to check the installation, then write a YAML policy for the actions that need governance.","zh":"先运行 `agt doctor` 检查安装,再为需要治理的操作编写 YAML 策略。"},{"en":"Wrap tool functions with `govern()` and verify the allow, deny, and approval paths.","zh":"用 `govern()` 包装工具函数,验证允许、拒绝和审批路径是否符合预期。"},{"en":"Before production, add audit, identity, container isolation, SRE, or MCP security components according to the risk profile.","zh":"进入生产前再按风险需要增加审计、身份、容器隔离、SRE 或 MCP 安全组件。"}],"installAt":"local","difficulty":"medium"}

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • intro

    已核验

    {"en":"Microsoft Agent Governance Toolkit (AGT) places agent tool calls, message sends, and delegations behind deterministic application-level policy checks. In the simplest Python flow, `govern()` wraps a tool function and evaluates a YAML policy before execution, allowing the host to permit, deny, or require approval while recording the decision.\n\nThe project expands into identity and trust, execution sandboxing, audit and compliance, SRE and kill switches, an MCP Security Gateway, and related governance components. SDKs are available for Python, TypeScript, .NET, Rust, and Go, with integrations for agent frameworks and developer surfaces such as Claude Code. The `agt` CLI covers installation checks, policy linting, compliance verification, and security-oriented validation.\n\nThe README explicitly labels the current release as Public Preview and warns that breaking changes may occur before GA. It also states that governance runs at the application middleware layer rather than providing OS-level isolation; separate containers are still recommended for production agent isolation.","zh":"Microsoft Agent Governance Toolkit(AGT)把 Agent 的工具调用、消息发送和委派操作放在确定性的应用层策略检查之后执行。最简单的 Python 用法可以用 `govern()` 包装一个工具函数,再通过 YAML 策略决定允许、拒绝或要求审批,并记录策略判定。\n\n项目进一步提供身份与信任、执行沙箱、审计与合规、SRE/kill switch、MCP Security Gateway 等组件,并有 Python、TypeScript、.NET、Rust 和 Go SDK,以及 Claude Code 等开发工具的接入方式。它也提供 `agt` CLI 用于安装检查、策略校验、合规验证和安全测试。\n\n当前 README 明确标注为 Public Preview,并提醒 GA 前可能有 breaking changes;同时文档说明治理发生在应用中间件层,并不等同于操作系统级隔离。生产环境仍建议将不同 Agent 放入独立容器。"}

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • 最新版本

    已核验

    v4.1.0

    来源: GitHub 官方接口 · latest_release=v4.1.0 · 2026/9/12

  • 许可证

    已核验

    MIT

    来源: GitHub 官方接口 · license.spdx_id=MIT · 2026/9/12

  • needs api key

    已核验

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • 一句话用途

    已核验

    {"en":"A governance toolkit for AI agents that adds policy checks, identity, audit trails, sandboxing, and SRE controls across multiple agent frameworks.","zh":"为 AI Agent 工具调用加入策略检查、身份、审计、沙箱与 SRE 控制的治理工具包,可接入多种 Agent 框架。"}

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • 分类线索

    根据材料推断

    ai-apps

    来源: 项目说明文档 · hint=ai-apps · 2026/8/13

  • product forms

    已核验

    cli、library_framework、ide_plugin

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • role tags

    已核验

    security、backend、devops

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • supports docker

    已核验

    来源: 仓库文件 · dockerfile=true; compose=true · 2026/9/12

  • supports local

    已核验

    来源: manual_curated · Manually curated from the verified project README; no AI draft. · 2026/8/17

  • supports self host

    根据材料推断

    来源: 项目说明文档 · matched self-host keywords · 2026/8/13

根据分类、能力和适用角色匹配的其他已核验项目。