Gate every AI agent command through MLS policy enforcement. Classify, log, and block shell commands before they run — fail-closed by design.
Agence Guard is the command-gating layer of the Agence AI governance framework. It enforces a 4-tier trust model on every shell command an AI agent proposes to execute — before execution.
| Tier | Gate | Typical Commands |
|---|---|---|
| T0 | Auto-execute | git status, ls, cat, git log |
| T1 | Flag & log | git add, unknown read-like commands |
| T2 | Require human approval | git push, git merge, terraform plan |
| T3 | Block | rm -rf, git push --force, terraform destroy |
Unknown commands default to T2 (fail-closed). The guard never auto-approves unfamiliar input.
On top of tier classification, Agence Guard enforces a POSIX-inspired capability model (Bell-LaPadula + Biba). Each agent identity carries a capability set. A command is denied if the agent lacks the required capability — regardless of tier.
Built-in capabilities include:
CAP_EXEC_SHELL — execute shell commandsCAP_MUTATE_GIT — git write operationsCAP_EXEC_INFRA — terraform / docker / k8sCAP_RED_TEAM — security probingCAP_PUBLISH — npm publish, gh release- name: Gate AI command
id: guard
uses: l-agence/agence@v1
with:
command: 'git push origin main'
agent: ci
fail_on_block: 'true'
- name: Use result
run: echo "Tier: $"
The Marketplace rollout starts with the reusable GitHub Action first for fast per-repo adoption. The separate GitHub App listing and webhook server can ship afterward for org-level rollout, where one installation can cover many repositories.
For larger organizations, the next onboarding step after the GitHub App is shard bootstrap: giving teams a clean way to initialize separate shards, policies, and knowledge boundaries without manual repo-by-repo setup.
| Output | Description |
|---|---|
tier |
T0 / T1 / T2 / T3 |
action |
allow / flag / escalate / deny |
reason |
Human-readable decision reason |
rule |
Matched policy rule (e.g. blacklist.linux_shell) |
Bring your own AIPOLICY.yaml:
- uses: l-agence/agence@v1
with:
command: 'terraform apply'
policy: 'codex/AIPOLICY.yaml' # relative to your repo root
fail_on_escalate: 'true'
@modelcontextprotocol/sdk, bun, zodContinuous Integration · Security · Code Quality
ai-governance, policy-enforcement, security, mls, command-gating, ai-agents, guardrails