cURL
curl --request POST \ --url https://api.leedab.com/api/v1/memories/forget \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "query": "<string>", "user_id": "<string>", "limit": 123, "confirm_all": true } '
Intelligently forget/delete memories matching a query
Documentation IndexFetch the complete documentation index at: https://docs.agent-mind.com/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: https://docs.agent-mind.com/llms.txt
Use this file to discover all available pages before exploring further.
import requests url = "https://api.leedab.com/api/v1/memories/forget" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } data = { "query": "old error messages", "limit": 5 } response = requests.post(url, json=data, headers=headers) result = response.json()
data = { "query": "temporary preferences", "user_id": "user_123", "limit": 10 } response = requests.post(url, json=data, headers=headers)
data = { "query": "test data", "user_id": "test_user", "confirm_all": True } response = requests.post(url, json=data, headers=headers)
{ "deleted_count": 3, "deleted_memories": [ { "id": "mem_abc123", "content": "Error: Connection timeout", "deleted_at": "2024-03-20T14:30:00Z" }, { "id": "mem_def456", "content": "Error: Rate limit exceeded", "deleted_at": "2024-03-20T14:30:00Z" }, { "id": "mem_ghi789", "content": "Error: Invalid token", "deleted_at": "2024-03-20T14:30:00Z" } ], "status": "success" }
{ "error": "Query parameter is required" }
{ "error": "Invalid or missing API key" }
{ "error": "No memories found matching the query" }
{ "error": "Failed to forget memories" }