curl -X POST "https://api.memanto.ai/agents/my-agent/policy/purge" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'
{
"agent_id": "my-agent",
"dry_run": true,
"enabled": true,
"matched": 3,
"purged": 0,
"memories": [],
"errors": [],
"evaluated_at": "2026-11-19T15:04:05.000Z"
}
Expiry Policy
Purge Expired
Permanently delete memories expired longer than the purge window.
POST
/
agents
/
{agent_id}
/
policy
/
purge
curl -X POST "https://api.memanto.ai/agents/my-agent/policy/purge" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'
{
"agent_id": "my-agent",
"dry_run": true,
"enabled": true,
"matched": 3,
"purged": 0,
"memories": [],
"errors": [],
"evaluated_at": "2026-11-19T15:04:05.000Z"
}
Overview
Permanently deletes memories that have been expired for longer than the policy’spurge_expired_after. With dry_run: true it reports what would be deleted.
Authentication
Your Memanto Cloud API key (
mk_...). See Authentication.Path Parameters
Body
curl -X POST "https://api.memanto.ai/agents/my-agent/policy/purge" \
-H "x-api-key: $MEMANTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true
}'
{
"agent_id": "my-agent",
"dry_run": true,
"enabled": true,
"matched": 3,
"purged": 0,
"memories": [],
"errors": [],
"evaluated_at": "2026-11-19T15:04:05.000Z"
}