agent-governance-toolkit
ライブラリmicrosoft/agent-governance-toolkit
自律型AIエージェントのためのポリシー適用とセキュリティのツールキット。
概要
AIエージェントに決定論的なポリシー実行、ゼロトラストアイデンティティ、実行サンドボックスを提供し、OWASP Agentic Top 10のすべてのリスクをカバーします。あらゆるフレームワークと統合可能で、監査ログも備えています。
README プレビュー
🌍 [English](/README.md) | [日本語](./docs/i18n/README.ja.md) | [简体中文](./docs/i18n/README.zh-CN.md) | [한국어](./docs/i18n/README.ko.md)\n\n\n\n# Agent Governance Toolkit\n\n### Ship agents to production without losing sleep\n\n\n \n \n \n\n\n\n \n 🚀 Quick Start ·\n 📋 Specifications ·\n 📦 PyPI ·\n 📝 Changelog\n \n\n\n[](https://github.com/microsoft/agent-governance-toolkit/actions/workflows/ci.yml)\n[](LICENSE)\n[](https://pypi.org/project/agent-governance-toolkit/)\n[](https://www.npmjs.com/package/@microsoft/agent-governance-sdk)\n[](https://www.nuget.org/packages/Microsoft.AgentGovernance)\n[](https://scorecard.dev/viewer/?uri=github.com/microsoft/agent-governance-toolkit)\n[](https://www.bestpractices.dev/projects/12085)\n[](docs/compliance/owasp-agentic-top10-architecture.md)\n\n> [!IMPORTANT]\n> **Public Preview** -- production-quality, Microsoft-signed releases. May have breaking changes before GA.\n\nPolicy enforcement, identity, sandboxing, and SRE for autonomous AI agents. One `pip install`, any framework.\n\n---\n\n## The Problem\n\nYour AI agents call tools, browse the web, query databases, and delegate to other agents. Once deployed, they make decisions autonomously. You need answers to three questions:\n\n**1. Is this action allowed?** An agent with access to `send_email` and `query_database` should not be able to `drop_table`. OAuth scopes and IAM roles control which services an agent can reach, not what it does once connected.\n\n**2. Which agent did this?** In a multi-agent system, five agents might share a single API key. When something goes wrong, "an agent did it" is not an incident response.\n\n**3. Can you prove what happened?** Auditors and regulators need tamper-evident records of every decision: what policy was active, what the agent requested, and why it was allowed or denied.\n\nPrompt-level safety ("please follow the rules") is not a control surface. It is a polite request to a stochastic system. [OWASP LLM01:2025](https:FAQ (3)
トラブル対応CIにおいて、agent-osのgovernance parityとadapter contract testsがsoft-failによって隠蔽されるのではなく、hard-failするようにするにはどうすればよいか?
GitHub Actionsワークフロー(.github/workflows/ci.yml)において、agent-osマトリックスパッケージ用の専用の適合性検証ステップを追加してください。既存のソフトフェイルテストステップ(pytest tests/ ... || true)の前に配置し、if: matrix.package == 'agent-os'でガードしてください。|| trueなしでpytest tests/test_governance_parity.py tests/test_spec_adapter_contract_conformance.pyのみを実行します。これにより、他の広範なテストスイートは変更せずに、これらの特定のチェックを強制します。ブランチ保護でこのステップを必須にしてください。
トラブル対応なぜ agent-hypervisor の RingEnforcer の check_command は、変数代入や env、nohup、exec のようなラッパーが前置された拒否対象コマンド(例: FOO=x curl)を許可してしまうのですか?
根本原因: RingEnforcer.check_command はコマンド文字列の最初の単語のみを DENIED_COMMANDS と照合するため、先頭の NAME=value 代入やラッパー(env, exec, nohup, nice, timeout, stdbuf, time, command, builtin)が実行ファイルと誤認され、実際の拒否対象コマンド(例: curl)が allowed=True として報告されます。修正: issue #4331 のフォローアップパッチを含むビルドへ agent-hypervisor を更新してください。このパッチは、(1) 先頭の NAME=value 代入をクォートを考慮してスキップし、(2) ラッパーコマンドのオプションを解析してアンラップし、(3) ラッパーのオプションを解析できない場合(不明なオプション、オプション引数の欠落、または env -S)にフェイルクローズ(コマンドを拒否)します。パッチ適用までは、呼び出し元は check_command 単独に依存すべきではありません。呼び出す前に、代入プレフィックスやラッパーを含むコマンドを正規化または拒否してください。注意: 行継続による難読化(cu\<newline>rl)は、既知の別個の問題として依然残っています。
トラブル対応なぜ私のエージェントは、example policy manifests を使用していると、最初のツール呼び出しで 'runtime_error:intervention_point_unknown' というエラーで失敗するのですか?
マニフェストの intervention_points ブロックが pre_tool_call をバインドしていません。これは19個の組み込みアダプターのうち16個(a2a、guardrails、llamaindex を除くすべて)が評価するものです。エンジンはバインドされていない介入ポイントを runtime_error:intervention_point_unknown で意図的に拒否するため、エージェントは最初のツール呼び出しでブロックされます。これらは input/output のみをバインドしているため、examples/policies/african-regulatory/*(15ファイル)、examples/policies/india-regulatory/*(5ファイル)、examples/policies/production/*(5ファイル)、examples/policies/lotl_prevention_policy.yaml、および examples/policy-templates/* のほとんどのマニフェストが影響を受けます。回避策:アダプターが評価するすべての介入ポイントを明示的にバインドしてください。ポリシーパックの意図に合致する deny/allow セマンティクスで、マニフェストの intervention_points に pre_tool_call(および post_tool_call)のエントリーを追加します(ツール呼び出しポイントで規制パターンルールを適用することは、より安全な方向性でもあります)。PR #3528 で修正されたマニフェスト(crewai、maf、openai-agents、smolagents の例)からバインディングパターンをコピーできます。