Skip to content

forget

The forget operation removes memories from HEBBS. It supports deletion by entity (all memories for a user), by specific memory IDs, or by criteria (e.g., time range, context filters). For GDPR and compliance, forgetting cascades to related data: edges, insights derived from forgotten episodes, and tombstones for audit.

ProtocolService/MethodEndpoint
gRPCMemoryService.Forget
RESTPOST/v1/forget
FieldTypeRequiredDescription
entity_idstringNo*Forget all memories for this entity. *At least one filter required.
memory_idsarrayNo*Forget specific memories by ID.
staleness_threshold_usintNoForget memories older than this (microseconds since epoch).
memory_kindstringNoFilter by kind: "episode", "insight", "revision".
tenant_idstringNoTenant scope for data isolation. Normally derived from the API key by the server. Override only when running without authentication or for cross-tenant administrative operations. Default: derived from API key or "default".

Note: For REST, tenant_id is derived from the Authorization header — not passed in the request body. For gRPC, it can be set explicitly in the request message but is overridden by the API key’s tenant when auth is enabled.

FieldTypeDescription
forgotten_countintNumber of memories directly forgotten.
Terminal window
curl -s -X POST http://localhost:6381/v1/forget \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HEBBS_API_KEY" \
-d '{"entity_id": "user_42"}' | jq .
Terminal window
curl -s -X POST http://localhost:6381/v1/forget \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HEBBS_API_KEY" \
-d '{"memory_ids": ["01KK3S0KXYE22EFF489YRTH559"]}' | jq .
Terminal window
grpcurl -plaintext \
-H "authorization: Bearer $HEBBS_API_KEY" \
-d '{"entity_id": "user_42"}' \
localhost:6380 hebbs.MemoryService/Forget
  • Right to erasure: Use entity_id to forget all data for a user.
  • Partial deletion: Use memory_ids for targeted removal (e.g., a single incorrect memory).
  • Audit trail: Tombstones record that a forget occurred; they do not retain content. Retention of tombstones is configurable.
  • Cascade: Insights derived from forgotten episodes are either forgotten or marked as orphaned, depending on policy.