How it works
1 · AUTHOR IN ENGLISH
Write the rules the agent must obey. AmberTrace compiles them into a verified
policy and reads back exactly what it admitted.
2 · GATE EVERY PROPOSAL
The model never executes anything. Each tool call it proposes is proved
permit-or-deny against the policy — fail-closed, with a machine-checked proof.
3 · EXECUTE ONLY ON PROOF
A permit without proof_checked=true is not a permit. A jailbroken
agent can propose anything; it cannot obtain a proof for an action outside policy.
# pip install ambertraceai
from ambertraceai import AmbertraceAPI
api = AmbertraceAPI(api_key="at_...")
# 1. The policy — plain English in, verified gate out
api.agent_policy.author(
"Only allow actions whose tool is refund or escalate. Permit a refund "
"only when the refund_amount is at most 100, the order_age_days is at "
"most 30, the order_status is delivered or returned, and the "
"prior_refund_issued flag is false. Always permit an escalate action.")
# 2. Gate what the agent proposes — the amount is the agent's ask;
# the order facts come from YOUR system of record, not the model
v = api.agent_policy.authorize_action(platform_id, tool="refund",
args={"refund_amount": 500,
"order_age_days": 12, "order_status": "delivered",
"prior_refund_issued": False})
v["decision"] # "deny" — the injected 500 never executes
v["proof_checked"] # True — machine-checked, not model-judged
That is the whole integration. SDK:
pip install ambertraceai ·
full example: 28_agent_policy_gate_cicd.py ·
platform: app.ambertrace.ai