Freshness Guard
Stop an AI agent from acting on stale data. Freshness Guard denies a write tool when the last matching read is older than the limit you set.
Real-Time(Preventive)Checked before the call runs, so it can stop it
A support agent reads get_refund_policy, then calls issue_refund. If the policy it read is old, the refund may follow rules that no longer apply. Freshness Guard checks how old the read was and denies the write when it is too old.
Runs On
The SDK only
You Set
The read tool, the write tool, and a maximum age in minutes, for example 30.
Your Agent Sends
A timestamp from the read tool, as as_of or updated_at
What Happens
| Last matching read | With Block on |
|---|---|
| At or under the maximum age | The write runs. |
| Older than the maximum age | The write is denied. |
| No timestamp on the read | The rule is skipped and the write still runs. The match is recorded as a warning. |
When a write is denied, the agent can call the read again and retry. Traccia does not refresh the source, store the document, or retry the write for you.
Set It Up
- In the app, open Policies and click Create Policy.
- Choose Freshness Guard.
- Enter the Read Tool and the Write Tool, then set Max Age (Minutes).
- Pick the Timestamp Field your read tool returns:
as_oforupdated_at. - Set the mode to Block, then click Activate Policy.
What Your Agent Sends
Have the read tool return as_of or updated_at. The write is checked against it. The timestamp has to come from the same process, so a read made in another service does not count. See the code.
Good To Know
- This policy does not apply on the Gateway.
Next Steps
© 2026 Traccia.