Skip to main content
POST

Overview

Permanently deletes memories that have already been expired for longer than the policy’s purge_expired_after window.
This is the only destructive step in the memory lifecycle and it cannot be undone. Purged memories are removed from the backend — Restore Memory will not bring them back. Always preview with dry_run: true first.
Disabled unless the policy sets purge_expired_after; when disabled the endpoint returns enabled: false and deletes nothing.

Authentication

API clients do not send an API key or Authorization header.
string
required
Session token from Activate Agent. Must match agent_id.
string
required
Must be application/json

Path Parameters

string
required
The unique identifier of the agent.

Body

boolean
default:"false"
When true, report what would be deleted without deleting anything. The body may be omitted entirely to accept the default.

Response Fields

boolean
false when the policy leaves purge_expired_after at never. Everything else is zeroed in that case.
integer
Expired memories older than the purge window.
integer
Memories actually deleted. Always 0 on a dry run.

Notes

  • purge_expired_after is not a retention setting. retention decides what becomes expired; this decides when an already-expired memory is destroyed. The two act on different populations, so Apply Expiry Policy reporting matched: 0 says nothing about what is purgeable.
  • The window is measured from expired_at, not from when the memory was created.
  • An expired memory carrying no expired_at stamp has no defensible purge date and is never purged.

Next Steps