Documentation Index
Fetch the complete documentation index at: https://amd-gaia.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Source Code:
src/gaia/governance/Quick start
wipe_disk, governance short-circuits the call,
issues a signed receipt to receipts.jsonl, and returns a denied result.
Decision outcomes
| Decision | Effect |
|---|---|
ALLOW | Tool runs as usual. |
BLOCK | Tool is refused. A receipt is written with the full evidence envelope. |
REVIEW | A checkpoint is opened. Governance calls your governance_reviewer callback, or Agent UI’s blocking confirmation modal when that is the active console. APPROVE -> tool runs; REJECT -> tool is refused. Either way a receipt is written. |
REVIEW fires and neither a reviewer nor a blocking console is available,
the mixin fails closed — the tool is denied without executing.
Tagging tools
Decorator style (colocates policy with the tool):"review" from a decorator and
"blocked" from the dict will carry both tags.
Configuration
Reviewers
governance_reviewer takes precedence. If none is configured,
governance delegates to console.confirm_tool_execution only when the console
advertises blocking_confirmation = True; Agent UI’s SSEOutputHandler does
this and emits the existing permission_request modal. GAIA’s default console is
not consulted because its confirmation method auto-approves.
When a policy returns BLOCK, the governed tool body is not executed and the
adapter writes a BLOCK receipt. If the active console supports
print_policy_alert, GAIA also emits a user-visible policy alert. Agent UI’s
SSEOutputHandler sends this as a policy_alert SSE event with the blocked
tool, decision, reason, rule IDs, policy version, and receipt ID.
Observability callbacks
Security properties
- Canonical name resolution — governance resolves registered tool names before
checking risk tags, so an LLM cannot bypass a tag on
mcp_time_get_current_timeby calling the aliasget_current_time. - Envelope-bound receipts — each receipt’s
payload_hashis a SHA-256 of the full evidence envelope (action, decision, policy version, constitution hash, actor, timestamp) in strict canonical JSON. Any tampered field changes the hash. - Workflow-bound checkpoints — the adapter refuses to resolve a checkpoint under
a
workflow_idthat differs from the one recorded when the checkpoint was opened. - Fail-closed REVIEW — no reviewer registered means deny.
Extension points
| Interface | Shipped reference | Swap with |
|---|---|---|
PolicyEngine | RuleBasedPolicyEngine | ACGS-lite, LLM judge, OPA |
CheckpointRuntime | InMemoryCheckpointBridge | constitutional-swarm checkpoint service |
ReceiptServiceProtocol | InMemoryReceiptService / JsonlReceiptService | DB, log forwarder, chain anchor |
PolicyBindingProtocol | StaticPolicyBindingService | constitutional-swarm policy control plane |
@runtime_checkable Protocols — no inheritance required.
Audit log
JsonlReceiptService writes one JSON object per line to a path you choose
(receipts.jsonl by default). The log survives process exit and is trivially
grep-able:
JsonlReceiptService with a dedicated log
forwarder or database-backed receipt service.