Skip to main content
You have an agent in production and no idea what a policy would cost. Put the policy in front of it in observe mode: every action executes as before, every receipt says what enforce mode would have done, and after a week ctrlrun stats gives you the refusals and approval requests you would have fielded. Then change the one line.

The policy

runnable

The code

runnable file=main.py

What the agent sees

Seven actions, seven executions. The mail to gmail.com went out; so did the €9,000 refund. Observe mode asks no human and stops nothing. It only writes down what it would have done.

The receipt

runnable
The numbers are counted from would_have.blocked_reason on the receipts in the local store, nothing else. Change mode: observe to mode: enforce and the same receipts become BLOCKED receipts and approval requests.

When an AMBIGUOUS appears

Observe mode changes nothing about outcomes: a lost reply is AMBIGUOUS in observe mode too, and the record is written. What differs is that observe mode records that a retry would have been refused and lets it run, so resolve the effect before switching to enforce, or the first enforced retry is refused.

Next