agentleFS
MicrosoftKnown publishermicrosoft/agent-governance-toolkit/agent-governance-python/agent-os/AGENTS.md

agent-governance-toolkit / agent-os

AGENTS.md6.4k starsChanged 2 months agoMITView on GitHub

Agent-OS is a governance-first kernel for AI agents — a Python framework providing policy enforcement, semantic intent classification, identity management, and execution control for autonomous AI agents. Architecture: 4-layer modular kernel Framework adapters route intervention points through HostSession and receive PolicyEvaluation. Raise the canonical PolicyViolationError.from_evaluation_result(result) for denied or escalated results. Hosts should surface str(error) and use error.evaluation_result.reason_code for structured handling. Use conventional commits: feat:, fix:, docs:, test:, refactor:, chore:

  • Installs packages

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 7 mentionsMay 2026: 19 mentionsJun 2026: 4 mentionsJul 2026: 5 mentionsAug 2026: 14 mentionsSep 2026: 0 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/agent-governance-toolkit repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/agent-governance-toolkit

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

38 more on GitHub

On Bluesky · 8

3 more on Bluesky

On Hacker News · 2

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    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
  1. Very specific:

    All public APIs must have type hints (mypy --strict)

    line 58
  2. Very specific:

    Use dataclass or Pydantic BaseModel for data structures

    line 59
  3. Very specific:

    Keep per-session counters in HostSession, not AgentControl.

    line 61
  4. Distinctive:

    Keep host lifecycle controls separate from native policy evaluation

    line 86
  5. Distinctive:

    All new features must include tests

    line 90
  6. Very specific:

    Run pytest tests/ -v --tb=short before committing

    line 91
  7. Very specific:

    Use pytest-asyncio for async tests (asyncio_mode = "auto")

    line 93
  8. Very specific:

    Use conventional commits: feat:, fix:, docs:, test:, refactor:, chore:

    line 97

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent-OS — Coding Agent Instructions

Project Overview

Agent-OS is a governance-first kernel for AI agents — a Python framework providing policy enforcement, semantic intent classification, identity management, and execution control for autonomous AI agents.

Architecture: 4-layer modular kernel

  • Layer 1 (Primitives): Core identity (CMVK), credentials (CaaS), execution memory (EMK)
  • Layer 2 (Infrastructure): Inter-agent trust protocol (IATP), agent message bus (AMB), agent trust registry (ATR)
  • Layer 3 (Framework): Control plane, observability, nexus orchestration
  • Layer 4 (Intelligence): MCP kernel server

Build & Test Commands

# Install dependencies (development mode)
pip install -e "../../agent-governance-python/agent-primitives[dev]"
pip install -e ".[dev]"

# Run all tests
pytest tests/ modules/*/tests -v --tb=short

# Run tests with coverage
pytest tests/ --cov=src/agent_os --cov-report=html --cov-branch

# Type checking
mypy src/

# Lint
ruff check .

# Format
ruff format .

Code Style

  • Formatter/Linter: Ruff (line-length: 100, target: Python 3.9+)
  • Rules: E, W, F, I (isort), B (bugbear), C4, UP (pyupgrade)
  • Type checker: MyPy strict mode with Pydantic plugin
  • Docstrings: Google-style
  • Imports: Sorted by isort via Ruff

Key Files

FilePurpose
src/agent_os/integrations/base.pyCore governance — AgentControl, BaseIntegration, NativeAdapterRuntime, event hooks
src/agent_os/integrations/profiling.py@profile_governance decorator
src/agent_os/base_agent.pyBase agent class with audit logging
src/agent_os/stateless.pyStateless agent with optional Redis
tests/test_integrations.pyMain governance test suite
modules/14+ modular kernel components

Coding Conventions

  • All public APIs must have type hints (mypy --strict)
  • Use dataclass or Pydantic BaseModel for data structures
  • Construct AgentControl from an ACS manifest path with AgentControl.from_path.
  • Keep per-session counters in HostSession, not AgentControl.
  • Event types: GovernanceEventType.POLICY_CHECK, .POLICY_VIOLATION, .TOOL_CALL_BLOCKED, .CHECKPOINT_CREATED
  • Tests go in tests/ (unit) or modules/*/tests/ (module-specific)

Native policy evaluation

Framework adapters route intervention points through HostSession and receive PolicyEvaluation. Raise the canonical PolicyViolationError.from_evaluation_result(result) for denied or escalated results. Hosts should surface str(error) and use error.evaluation_result.reason_code for structured handling.

from agent_os.exceptions import PolicyViolationError

result = session.input(input_data)
if not result.verdict.decision.permits:
    raise PolicyViolationError.from_evaluation_result(result)

Boundaries

  • Never modify tests/test_mcp_server.py (known pre-existing failure, excluded from CI)
  • Never commit secrets, API keys, or credentials
  • Never bypass native ACS intervention points or weaken fail-closed behavior
  • Keep host lifecycle controls separate from native policy evaluation

Testing Requirements

  • All new features must include tests
  • Run pytest tests/ -v --tb=short before committing
  • Minimum: test happy path + at least one edge case per feature
  • Use pytest-asyncio for async tests (asyncio_mode = "auto")

Commit Style

Use conventional commits: feat:, fix:, docs:, test:, refactor:, chore:

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.