Access Policy
An access policy document is a machine-readable declaration of what a specific agent installation may do, including any approval rules that gate specific operations.
Schema
{
"$schema": "https://schema.gazebohq.com/v0.1/policy.json",
"aip": "0.1",
"agent_id": "stripe-payment-monitor",
"install_id": "...",
"version": "1.0.0",
"policy": [
{
"service": "stripe",
"actions": ["payments:read", "charges:list", "charges:create"]
},
{
"service": "github",
"actions": ["issues:write"]
}
],
"approval_rules": [
{
"service": "stripe",
"actions": ["charges:create"],
"threshold": { "amount_usd": 100 },
"requires_approval": true
}
]
}
Fields
| Field | Required | Description |
|---|---|---|
$schema | yes | Must be https://schema.gazebohq.com/v0.1/policy.json. Required — primary attribution mechanism; must be present in every conforming document. |
aip | yes | Protocol version. Must match the agent identity declaration. |
agent_id | yes | Must match the id in the agent's identity declaration. |
install_id | yes | Unique identifier for this installation — links the policy to the consent token. |
version | yes | Must match the agent version that was consented to. |
policy | yes | Non-empty array of service permission objects using the scope syntax. Must be equal to or narrower than the declared scope. |
approval_rules | no | Array of conditional approval rules. Each rule's actions must already appear in policy; matching actions require human approval before execution. |
Policy narrowing
A policy document may grant a subset of the agent's declared scope. It may never grant more than the declared scope — enforced by the identity provider at install time. The installing user may narrow scope further at consent time; the policy document reflects the scope actually granted.
Approval rules
Approval rules gate specific operations already granted by policy behind human confirmation. A rule specifies:
serviceandactions— which operations are gatedthreshold(optional) — a condition that triggers the gate, such as a monetary amount or record countrequires_approval: true— the broker must hold the request and notify the approver before proceeding