agent-governance-toolkit / agent-compliance
AGENTS.md6.4k starsChanged 2 months agoMITView on GitHub
Agent Compliance (agent-governance-toolkit) provides runtime policy enforcement and security scanning for AI agent systems. This package ensures agents operate within organizational compliance boundaries and security policies. Core Capabilities: Security exemptions use .security-exemptions.json: Security scanner integrates with: - detect-secrets: Secret detection - pip-audit: Python CVE scanning - npm audit: Node.js CVE scanning - bandit: Python SAST All tool integ
- Deletes or force-pushes
- Installs packages
Trending
Less talk lately.about the whole repository
Who's talking about microsoft/agent-governance-toolkit
- @pythonhub.dev“microsoft / agent-governance-toolkit AI Agent Governance Toolkit — Policy enforcement, zero-trust identity, …”Bluesky · May 6, 2026 · 9 likes
- aaif/project-proposals“[Project Proposal] Agent Governance Toolkit”GitHub · Apr 26, 2026 · 6 reactions
- A Hacker News story“Agent Governance Toolkit”Hacker News · May 27, 2026 · 5 points
- @qdrddr.bsky.social“#OPA #Rego policies for #agents Integrates with most frameworks. #Python · #TypeScript · .NET · Rust · Go …”Bluesky · May 24, 2026 · 5 likes
- @alexmg.dev“Today's random GitHub ⭐! microsoft/agent-governance-toolkit Posted using Starrysky”Bluesky · Oct 1, 2026 · 2 likes
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on GitHub, Bluesky and Hacker News (53 times).
On GitHub · 43
- Apr 26, 2026[Project Proposal] Agent Governance Toolkit — aaif/project-proposals6 reactions · 33 comments
- Apr 20, 2026[Feature] Governance hooks for AI SDK — policy enforcement before tool execution — vercel/ai2 reactions · 17 comments
- Jul 22, 2026[Feature]: Integrate Microsoft Agent Governance Toolkit (AGT) as optional governance plugin — consolidate 53+ governance-related issues — NousResearch/hermes-agent1 reaction · 3 comments
- Jul 2, 2026🔄 Refresh `foundry-agt` — aiappsgbb/awesome-gbb1 reaction · 1 comment
- Jun 1, 2026🔄 Refresh `foundry-agt` — aiappsgbb/awesome-gbb1 reaction · 2 comments
38 more on GitHub
- May 29, 2026🔄 Refresh `foundry-agt` — aiappsgbb/awesome-gbb1 reaction · 1 comment
- May 26, 2026[Feature Request] GOVERNANCE_PROXY: native AGT sidecar integration for deterministic tool-call governance — openclaw/openclaw1 reaction · 1 comment
- May 26, 2026🔄 Refresh `foundry-agt` — 7 signal(s), impact: high — aiappsgbb/awesome-gbb1 reaction
- May 16, 2026feat(governance): phase 0 — agentmesh build spike — wildcard/caro1 reaction · 5 comments
- Apr 26, 2026Propose Agent Governance Toolkit for Sandbox stage — ossf/tac1 reaction · 22 comments
- Apr 20, 2026Proposal: Agent Governance Toolkit — Runtime Governance for Agentic AI (Sandbox) — lfai/proposing-projects1 reaction · 3 comments
- Mar 25, 2026Collaboration: Governance middleware for Mastra agents — mastra-ai/mastra1 reaction · 5 comments
- Oct 4, 2026agent-plugins.github.microsoft.agent-governance-toolkit: init at 5.0.0 — sudosubin/agents.nix0 reactions
- Oct 2, 2026External institutional authority binding for sandbox policy activation — anthropics/sandbox-runtime0 reactions
- Aug 13, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-antigravity-cli — baoqger/agt-fork0 reactions
- Aug 13, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-claude-code — baoqger/agt-fork0 reactions
- Aug 12, 2026Opportunity: optional external policy verdict input at the guard seam — ucsandman/DashClaw0 reactions · 10 comments
- Aug 12, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-copilot-cli — VLPraneeth/praneeth-agent-governance-toolkit0 reactions · 2 comments
- Aug 12, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-antigravity-cli — VLPraneeth/praneeth-agent-governance-toolkit0 reactions · 2 comments
- Aug 12, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-claude-code — VLPraneeth/praneeth-agent-governance-toolkit0 reactions · 2 comments
- Aug 11, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-antigravity-cli — guden/agent-governance-toolkit0 reactions · 3 comments
- Aug 11, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-claude-code — guden/agent-governance-toolkit0 reactions · 3 comments
- Aug 11, 2026chore(deps): bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-copilot-cli — guden/agent-governance-toolkit0 reactions · 3 comments
- Aug 11, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-claude-code — dzungttfci/ms_agent-governance-toolkit0 reactions · 1 comment
- Aug 11, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-copilot-cli — dzungttfci/ms_agent-governance-toolkit0 reactions · 1 comment
- Aug 11, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-antigravity-cli — dzungttfci/ms_agent-governance-toolkit0 reactions · 1 comment
- Aug 10, 2026[Discussion] Asago — asago-ai/asago-policy-mapper0 reactions · 1 comment
- Aug 6, 2026chore(deps): Bump @microsoft/agent-governance-sdk from 4.0.0 to 5.0.0 in /agent-governance-copilot-cli — baoqger/agt-fork0 reactions
- Jul 20, 2026[LinkedIn Post] 2026-07-20 - Daily Post — rajshevde-01/Linkedin-Daily-Post0 reactions
- Jul 5, 2026[arXiv] Verifiable agent-memory provenance gate — ContextNest: Verifiable Context Governance for Autonomous AI Agent — mnemonik-dev/nightly-research0 reactions · 2 comments
- Jun 30, 2026Update agent-sre requirement from <2.0,>=1.0.0 to >=1.0.0,<4.0 in /packages/agent-compliance — igordjuric404/ophanix-platform0 reactions
- Jun 16, 2026Update agent-governance-toolkit requirement from >=3.7.0 to >=4.1.0 in /packages/agent-compliance — igordjuric404/ophanix-platform0 reactions
- Jun 8, 2026Limit agent execution by tokens consumed — microsoft/agent-framework0 reactions · 1 comment
- May 25, 2026Explore optional Microsoft Agent Governance Toolkit integration — sure-scale/hey-jude0 reactions
- May 19, 2026build(deps): Update agent-hypervisor requirement from >=3.5.0 to >=3.7.0 in /packages/agent-hypervisor — igordjuric404/ophanix-platform0 reactions
- May 15, 2026<h1>Dependency Review</h1> — nexoracontrol-ops/upgraded-guide0 reactions
- May 14, 2026[Project Proposal] Agent Governance Toolkit — guildaidev/aaif-project-proposals-demo0 reactions · 1 comment
- May 14, 2026[Project Proposal] Agent Governance Toolkit — guildaidev/aaif-project-proposals-demo0 reactions · 2 comments
- May 8, 2026[Project Proposal] Agent Governance Toolkit — guildaidev/aaif-project-proposals-demo0 reactions
- May 8, 2026Microsoft Agent Framework: Agent Governance Toolkit — phongnguyend/Practical.AI0 reactions
- May 8, 2026<!-- ai-pr-summary --> — selutions/Github0 reactions
- May 8, 2026<!-- ai-pr-summary --> — selutions/Github0 reactions
- May 6, 2026<!-- ai-agent:docs-sync-checker --> — selutions/Github0 reactions
On Bluesky · 8
- May 6, 2026microsoft / agent-governance-toolkit AI Agent Governance Toolkit — Policy enforcement, zero-trust identity, execution sandboxing, and… — @pythonhub.dev9 likes and reposts · 2 replies
- May 24, 2026#OPA #Rego policies for #agents Integrates with most frameworks. #Python · #TypeScript · .NET · Rust · Go #OpenSource MIT lic… — @qdrddr.bsky.social5 likes and reposts
- Oct 1, 2026Today's random GitHub ⭐! microsoft/agent-governance-toolkit Posted using Starrysky — @alexmg.dev2 likes and reposts
- Apr 4, 2026github.com/microsoft/ag... — @tommis.fi2 likes and reposts
- Jul 28, 2026📦 microsoft / agent-governance-toolkit ⭐ 4,981 (+17) 🗒 Python AI Agent Governance Toolkit — Policy enforcement, zero-trust identity,… — @github-trending.bsky.social1 likes and repost
3 more on Bluesky
- May 16, 2026On that - @h.olysh.it I was wondering if you’d seen AGT and had opinions - I love the ambition and scope. At the moment it’s fairly… — @ahrkrak.bsky.social1 likes and repost · 1 reply
- Apr 9, 2026microsoft/agent-governance-toolkit: AI Agent Governance Toolkit — Policy enforcement, zero-trust identity, execution sandboxing, and… — @fluid.sublimer.me1 likes and repost
- Apr 8, 2026Together, these tell you Microsoft is betting that governance and evaluation infrastructure will matter more than model capability for… — @nik-kale.bsky.social0 likes and reposts · 1 reply
On Hacker News · 2
- May 27, 2026Agent Governance Toolkit5 points
- May 26, 2026AI Agent Governance Toolkit2 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- agent-governance-claude-code/AGENTS.mdAGENTS.md
- agent-governance-dotnet/AGENTS.mdAGENTS.md
- agent-governance-opencode/AGENTS.mdAGENTS.md
- agent-governance-python/agent-mesh/AGENTS.mdAGENTS.md
- agent-governance-python/agent-mesh/sdks/AGENTS.mdAGENTS.md
- agent-governance-python/agent-os/AGENTS.mdAGENTS.md
- agent-governance-python/AGENTS.mdAGENTS.md
- agent-governance-python/agent-sre/AGENTS.mdAGENTS.md
- agent-governance-rust/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- examples/demos/AGENTS.mdAGENTS.md
- .github/pipelines/AGENTS.mdAGENTS.md
- policy-engine/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agt-policy-authoringSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 49
All public APIs must have type hints
- Very specific: line 50
Use dataclasses for simple data structures, Pydantic for validation-heavy ones
- Very specific: line 67
Test fixtures (/tests/fixtures/, /test_data/)
- Distinctive: line 85
All new features must include corresponding tests
- Very specific: line 87
Run tests before committing: pytest tests/ -v
- Very specific: line 114
Temporary exemptions: Must have expires field (ISO 8601 date)
- Distinctive: line 120
Never skip: test coverage for new features
- Distinctive: line 121
Keep backward compatibility in public APIs
- Distinctive: line 131
All tool integrations gracefully handle missing tools (skip scan if not available).
- Very specific: line 135
Use conventional commits: feat:, fix:, docs:, test:, refactor:, chore:
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Compliance - Coding Agent Instructions
Project Overview
Agent Compliance (agent-governance-toolkit) provides runtime policy enforcement and security scanning for AI agent systems. This package ensures agents operate within organizational compliance boundaries and security policies.
Core Capabilities:
- Security Scanning: Automated detection of secrets, CVEs, dangerous code patterns, and unsafe operations
- Runtime Policy Enforcement: OWASP ASI 2026 controls and integrity verification
Build & Test Commands
# Install dependencies (development mode)
pip install -e ".[dev]"
# Run all tests
pytest tests/ -v
# Run tests with coverage
pytest tests/ --cov=src/agent_compliance --cov-report=html --cov-branch
# Type checking
pyright src/
# Lint and format
ruff check . --fix
ruff format .Code Style
- Formatter/Linter: Ruff (line-length: 100, target: Python 3.10+)
- Type checker: Pyright basic mode with ignore for missing stubs
- Docstrings: Google-style for public APIs
- Imports: Sorted alphabetically, grouped (stdlib → third-party → first-party → local)
Key Files
| File | Purpose |
src/agent_compliance/security/scanner.py | Security scanning engine (secrets, CVEs, code patterns) |
src/agent_compliance/security/schemas/ | JSON schemas for security exemptions |
tests/test_security_scanner.py | Security scanner test suite (25 tests) |
Coding Conventions
- All public APIs must have type hints
- Use
dataclassesfor simple data structures, Pydantic for validation-heavy ones - SecurityFinding fields:
severity,category,title,file,line,code,description,recommendation,cwe,cve - Severity levels:
critical,high,medium,low(critical/high block PRs)
Security Scanning
What Gets Scanned
- Python files (
*.py) - JavaScript/TypeScript (
*.js,*.ts) - Shell scripts (
*.sh,*.bash) - PowerShell (
*.ps1) - Dependency files (
requirements.txt,package.json,pyproject.toml) - Code blocks in markdown files (skills and agents)
What's Excluded
- Test fixtures (
**/tests/fixtures/**,**/test_data/**) - Example files (
**/examples/**,**/*.example.*) - Build artifacts (
**/dist/**,**/node_modules/**,**/__pycache__/**) - Documentation (most
README.md,docs/**/*.md)
Severity Configuration
SEVERITY_CONFIG = {
"critical": {"blocks": True}, # Hardcoded secrets, RCE, CVSS ≥ 9.0
"high": {"blocks": True}, # Command injection, SQL injection, CVSS 7.0-8.9
"medium": {"blocks": False}, # Weak crypto, CVSS 4.0-6.9
"low": {"blocks": False}, # Best practices, CVSS < 4.0
}Testing Requirements
- All new features must include corresponding tests
- Security tests: Cover finding creation, exemption matching, pattern detection, formatting
- Run tests before committing:
pytest tests/ -v - Aim for >90% code coverage on new code
Exemption System
Security exemptions use .security-exemptions.json:
{
"version": "1.0",
"exemptions": [
{
"tool": "detect-secrets",
"file": "tests/fixtures/mock.py",
"line": 10,
"reason": "Test fixture with intentionally fake credentials",
"approved_by": "security-team"
}
]
}Exemption Matching
- File + line: Exact match
- Category + file: Any line in file
- CVE identifier: Matches across all files
- Temporary exemptions: Must have
expiresfield (ISO 8601 date)
Boundaries
- Never commit secrets, credentials, or API keys
- Never loosen severity blocking thresholds without approval
- Never skip test coverage for new features
- Keep backward compatibility in public APIs
Integration with External Tools
Security scanner integrates with:
- detect-secrets: Secret detection
- pip-audit: Python CVE scanning
- npm audit: Node.js CVE scanning
- bandit: Python SAST
All tool integrations gracefully handle missing tools (skip scan if not available).
Commit Style
Use conventional commits: feat:, fix:, docs:, test:, refactor:, chore:
Example:
feat(security): add support for shell script scanning
- Add _check_shell_code_block method
- Detect dangerous rm -rf patterns
- Add tests for shell code validationDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

