Purge records older than N days (retention)
purge_expiredPermanently deletes records older than the specified retention window for a user and space; optional flags extend purges to tenant-wide decisions and receipts or deployment-wide audit logs.
Instructions
Retention / storage-limitation (GDPR Art. 5(1)(e)): permanently delete records written more
than older_than_days ago. Statements are scoped to the user/space. The optional flags extend
the same window to the append-only tables — NOTE these are not per-user: include_decisions and
include_receipts purge those tables for your whole tenant, and include_audit purges the audit
log from the head of the chain (a signed retention anchor keeps the remaining chain verifiable).
There is one chain per deployment, shared by every tenant, so include_audit is DEPLOYMENT-WIDE
and only the deployment operator may use it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"older_than_days": "<older_than_days>"
},
"name": "purge_expired"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | No | ||
| user_id | No | default | |
| agent_id | No | ||
| include_audit | No | ||
| older_than_days | Yes | ||
| include_receipts | No | ||
| include_decisions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |