.agentpolicy/
— Apache 2.0, agent-agnostic
Every runtime enforcement layer, every permission system, every audit mechanism needs a shared contract to reference. .agentpolicy/ is that contract. An open-source, schema-validated protocol that scales from personal projects to regulated enterprise.
Policy at the root. Enforcement at runtime. Accountability on every action.
Because the agents don't have a contract with you. They have markdown files. Markdown files are just system prompts, which are completely not enforceable. Every current workaround is written for human readers, and agents try their best to cope. But now Aegis is here, to be the translator that turns your vision for the project into a binding contract, written in the agents' language, that the agents cannot break.
Run aegis init and Aegis scans your codebase, asks sharp questions about your priorities and boundaries, and compiles your answers into schema-validated JSON that any agent can parse deterministically.
Four stages. One governance framework. Every action validated before execution.
The only system that governs AI agents from policy definition through runtime enforcement. Use the full stack, or adopt any layer independently.
The open governance standard. Schema-validated JSON that defines roles, permissions, autonomy levels, sensitivity tiers, and coordination protocols. The shared contract every tool can implement.
View spec →The reference implementation. Run aegis init, have a conversation in plain English, and generate a complete .agentpolicy/ directory. Scans your codebase first — it already knows your stack before asking the first question.
Runtime enforcement. Loads policy into server memory, validates every agent action before execution. Blocked actions get a specific reason and an override protocol. Zero token overhead — agents never load governance files.
View MCP →Real terminal output from the ClearDefense stress test. A defense logistics platform — CMMC Level 2, ITAR, DFARS — built from a Word document in an empty repo.
| Role | Purpose |
|---|---|
| construction | Initial build / major restructuring — full repo access, governance files as blueprint |
| backend | FastAPI routes, DB schemas, migrations, API logic |
| compliance | ITAR checks, CUI marking, audit logging, report generation (C3PAO assessment unit) |
| frontend | React/TypeScript SPA for program managers, logistics, compliance officers, auditors |
| infra | Terraform for Azure Gov GCC High, networking, compute, storage, Key Vault |
| supply_chain | Vendor CMMC readiness, ITAR registration verification, risk scoring |
Two features no other governance framework has solved cleanly. Real data from the ClearHealth stress test.
The ledger is how agents coordinate without colliding — each one logs what it built, what paths it touched, and who needs to act next. The override log is how governance stays accountable — every blocked action, every escalation, every exception is recorded with the specific policy violated. Append-only. Immutable.
Same spec. Different industries. Different architectures. Aegis adapts to the scope of any project.
A 5-agent AI swarm built a HIPAA-compliant healthcare platform from the ground up. Multi-tenant appointment management, encrypted patient records, role-based access control, full audit trails.
The DevOps agent flagged its own infrastructure changes as requiring human approval — not because a human told it to, but because the governance policy set infrastructure to advisory. The agent internalized the rules and self-governed. PII pattern scan passed on GitHub Actions.
A non-technical CEO described compliance requirements in plain English. Aegis translated that into 11 governance files across 8 roles and 3 sensitivity tiers — covering PCI-DSS, SOX, and AML simultaneously.
A single agent one-shotted the entire build in 11 minutes. The governance was so precise that the agent didn't need to explore, backtrack, or coordinate — it just executed. Massively reduced computation and token cost compared to multi-agent approaches. 109 tests passing, all quality gates green.
View ClearFinTech repo →A VP of Programs at a defense contractor handed Aegis a Word document describing what she needed built and what compliance boundaries it lived inside. She had a conversation in her own language — DFARS clauses, NIST control families. She never touched JSON, never learned a schema, never made a technical decision outside her expertise.
Aegis generated a custom handoff prompt that told the agent exactly which role to select, what order to build in, and what compliance foundations to lay first. The agent read the blueprint, bootstrapped the build plan in under 3 minutes, and executed. CUI marking engine, ITAR classification, immutable audit trails — all from a charter.docx in an empty repo.
View ClearDefense repo →Three industries. Three compliance surfaces. Each one harder than the last. ClearDefense is the most complex — CMMC Level 2, ITAR, DFARS, CUI handling across three categories — and a single agent with precise governance built it in 23 minutes with 412 passing tests. The governance is the performance.
The spec is Apache 2.0. The tooling is MIT. Any platform, agent, or orchestration layer can read .agentpolicy/ and benefit from a standardized governance format.
Ship your agent with Aegis awareness built in. Read .agentpolicy/ at session start and your agent automatically respects project boundaries, permissions, and conventions.
Surface governance rules inline. Show developers which files are writable, read-only, or forbidden per role. Flag violations before the agent even acts.
Define sensitivity tiers and autonomy domains that map to your regulatory requirements. HIPAA, PCI-DSS, SOX, AML — or any framework your industry demands. The spec accepts any domain string.
Validate .agentpolicy/ files as part of your build. Run schema checks, enforce quality gates, scan for PII patterns. The JSON format means zero parsing ambiguity.
One conversation with Aegis replaces hours of re-explaining context, days of debugging rogue behavior, and weeks of compliance remediation.
Install the CLI, run it in any project root, and see what Aegis generates in under 10 minutes.
npm install -g aegis-cli
cd your-project
aegis init
Review the schema definitions and build .agentpolicy/ awareness into your agent platform, IDE extension, or orchestration layer.
Browse the stress test repos. Two regulated industries, zero governance violations. Then bring it to your engineering team.
View ClearFinTech →