资源 · 03
AI 代理治理:生产就绪指南
在将业务流程委托给代理之前,需对代理的权限、数据、测试、监督和关闭进行框架性审查。
已更新 · 5 min
本指南有助于实现的目标
- 将代理的权限限制在其所需范围内。
- 在生产环境部署之前测试代价高昂的故障。
- 保留有用的跟踪信息,避免过度收集。
- 保持有效的人工问责制。
快速检查
- 代理是否会触发不可逆的操作?
- 提交的数据是否已获得授权?
- 阈值是否需要人工审批?
- 工具是否具有最低权限?
- 系统能否快速停止并回滚?
分步指南
- 1
描述实际系统
记录系统用途、用户、输入、模型、工具、输出、依赖关系和受影响人员。
交付成果:版本化的系统卡。
- 2
对操作和数据进行分类
区分阅读、推荐、起草和执行操作。 识别禁止数据、敏感数据、个人数据和保留数据。
交付成果:数据×操作矩阵。
- 3
减少权限
使用专用帐户、工具白名单、隔离环境,并在执行高影响操作前获得批准。
交付成果:授权策略。
- 4
构建评估
测试正常情况、歧义、注入、缺失数据、超出范围的请求和不可逆错误。 在试点之前设置阈值。
交付成果:测试集和结果。
- 5
监控生产环境
记录系统版本、必要上下文、工具调用、审批和结果,同时最大限度地减少数据保留。
交付成果:监控仪表盘和警报。
- 6
做好故障应对准备
定义停机、手动接管、通知、事件分析和恢复服务标准。
交付成果:AI 事件运行手册。
从提议到执行:应在哪里检查权限?
智能体可以准备请求,却未必有权执行。执行服务必须检查实际身份、资源和参数;模型声称“已批准”并不能证明批准有效。
虚构练习:内部政策要求向客户发送回复前获得批准。案例用于说明这项政策,不会检查或认证您的系统。
- 收到的数据
文档提供上下文,不授予新权限。
- 拟议操作
智能体准备工具、目标和参数供审查。
- 独立检查
执行服务核验权限及绑定到该具体操作的批准。
- 观察到的结果
记录将唯一请求与实际结果关联,包括失败。
四个演练案例
收件人已变更
已批准的预览使用内部地址,最终调用却使用外部地址。
预期决定
暂停发送并审查新目标。
需要查找的证据
比较预览与最终调用的收件人、内容和附件。
错误的客户空间
账户可读取案件A,智能体却请求案件B的文件。
预期决定
即使模型声称需要,也应拒绝访问B。
需要查找的证据
使用用户身份检查具体资源的访问权限。
批准已过期
操作与预览一致,但批准在执行前已过期。
预期决定
获取新的批准并重新检查当前权限。
需要查找的证据
保留到期时间、批准人身份和已批准参数。
请求超时
发送请求没有响应,无法确定是否完成。
预期决定
重试前检查操作状态。
需要查找的证据
将幂等键绑定到相同内容,并核对服务回执。
参考资料 : OWASP · LLM06:2025 Excessive Agency · OWASP · AI Agent Security Cheat Sheet
虚构示例
示例情境
代理程序可以读取客户请求并起草回复,但未经批准不得发送消息或更改帐户。 测试包含一个尝试重定向其指令的源文档。
决策及预期证据
注册表定义了允许使用的工具、可见数据、升级阈值、必要的日志以及人工接管的时机。
管理指标
| 指标 | 衡量内容 | 首要行动 |
|---|---|---|
| 有效成功率 | 任务根据业务标准正确执行,而不仅仅是看似合理的答案 | 按案例类型审查失败案例 |
| 人工升级 | 案例正确移交给人工处理 | 当代理过于自信时调整阈值 |
| 已取消的操作 | 操作在影响发生前被阻止或恢复 | 查找过多的权限和未经测试的场景 |
| 漂移 | 不同版本、数据或人群的性能差异 | 每次更改时都与稳定数据集进行比较 |
常见错误
- 仅衡量写作质量
- 赋予代理最终用户的完整权限
- 默认保留所有对话
- 更改模型或提示而无需重新运行评估
常见问题解答
AI 代理与聊天机器人有何不同?
代理程序可以计划或串联操作,并可能调用工具。 这种权限需要更严格的权限控制、审批、跟踪和关闭控制。
是否始终需要人工审批?
当操作不可逆、敏感、受监管、涉及财务或事后难以检测时,这一点尤为重要。 权限级别应与风险相匹配。
应该记录哪些内容?
系统版本、绝对必要的上下文信息、工具调用、审批、结果和错误,并设定合理的保留期限。
参考资料:数据、用途与局限
文档核查日期 .
此语言版本的详细参考说明以英语提供。
| 来源与目的 | 已核实的数据或指标 | 使用方法 | 需要保留的局限 |
|---|---|---|---|
| MITRE ATLAS Examine documented tactics, techniques and cases involving AI systems. |
The official repository publishes ATLAS tactics, techniques and case-study data. They support analysis of the actual deployed system. | Select scenarios matching your application’s data, interfaces and tools. Test permissions and consequences, not only model responses. | A technique catalogue is neither an exhaustive coverage guarantee nor a test result for your system. |
| NIST · AI Risk Management Framework Organise management of AI-related risks. |
The AI RMF Core is organised around Govern, Map, Measure and Manage. It is a voluntary risk-management framework. | Define intended use, affected people and error consequences. Connect each risk to an evaluation, owner and stop or recovery mechanism. | The framework certifies neither a model nor an application. Using it does not remove the need to examine applicable requirements. |
| OWASP · LLM Top 10 Prepare tests for language-model application risks. |
The 2025 edition includes Prompt Injection, Sensitive Information Disclosure and Excessive Agency. | Turn a risk into an observable scenario: hostile document, restricted data or out-of-scope tool. Record expected behaviour and evidence of refusal. | A risk list is not a complete assessment. Input filtering alone does not establish authorisation for every action. |
RAG:访问权限、引用与缓存
此语言版本的详细参考说明以英语提供。
Describe the authority of every agent tool
A tool’s authority depends on identity, objects and permitted operations. A document source, including an internal one, cannot expand that scope. The agent should accomplish the legitimate task with limited rights.
- Build an identity, object and operation matrix.
- Verify connector denials and absence of effects.
- Replay positive controls after each restriction.
Explore the RAG access matrix and replay cases →
References consulted on · OWASP · LLM06:2025 Excessive Agency OWASP · API1:2023 Broken Object Level Authorization NIST AI 100-2 E2025 · Adversarial Machine Learning
OAuth/OIDC:受众与权限
此语言版本的详细参考说明以英语提供。
An AI agent retains each tool’s authorisation boundaries
A model instruction does not create a grant. For every tool, identify the calling client, resource server, audience and object policy.
- Restrict permissions to the operation and recipient needed for the use case.
- Do not forward one tool’s token to another API merely for convenience.
- Test that an agent cannot read another tenant’s objects despite having a read scope.
See token recipients and the ten OAuth/OIDC cases →
Sources reviewed on · IETF · RFC 9700 · OAuth 2.0 Security BCP · IETF · RFC 9068 · JWT access token profile · OpenID Foundation · OpenID Connect Core 1.0 · IETF · RFC 8725 · JWT Best Current Practices · IETF · RFC 6749 · OAuth 2.0 framework
SSRF:URL与连接
此语言版本的详细参考说明以英语提供。
An AI agent tool keeps bounded network access
Text produced by a model, retrieved document or search result must not expand an allowed tool destination. Defining the connector by operation and service makes the agent’s actual network reach controllable.
- Reconstruct requests from business identifiers when the service is known.
- Enforce resolution, connection, proxy and each redirect at the egress component.
- Keep a traceable decision and response limits, including after retry or fallback.
Read the 12 cases and connection controls →
Sources reviewed on · OWASP · SSRF Prevention Cheat Sheet · WHATWG · URL Living Standard · AWS EC2 · Instance metadata options · IETF · RFC 3849
官方参考文献
参考文献支持该方法。 请根据您的实际情况调整检查;它们并非认证。 原始参考文献标题和源文档可能使用其他语言。
参考资料查阅日期 .
- NIST — AI Risk Management Framework
- NIST — Generative AI Profile
- OWASP · LLM06:2025 Excessive Agency
- OWASP · AI Agent Security Cheat Sheet
- MITRE ATLAS
- OWASP · LLM Top 10
- OWASP · API1:2023 Broken Object Level Authorization
- NIST AI 100-2 E2025 · Adversarial Machine Learning
- IETF · RFC 9700 · OAuth 2.0 Security BCP
- IETF · RFC 9068 · JWT access token profile
- OpenID Foundation · OpenID Connect Core 1.0
- IETF · RFC 8725 · JWT Best Current Practices
- IETF · RFC 6749 · OAuth 2.0 framework
- OWASP · SSRF Prevention Cheat Sheet
- WHATWG · URL Living Standard
- AWS EC2 · Instance metadata options
- IETF · RFC 3849
