Skip to content
Gomind

forget

Delete one fact.

POST/v1/forget

Also an MCP tool named forget.

Find the fact with recall first, then pass its subject, predicate, and ref.

FieldTypeRequiredDescription
subjectstringyes

Subject, exactly as stored.

predicatestringyes

Predicate. WorksAt finds works_at.

refstringyes

Last 5 characters of the fact id, or the full id.

collectionstringno

Collection code. Omit for the connection default. "" forces the default bucket.

Request

{
  "subject": "user:maya",
  "predicate": "works_at",
  "ref": "X2C9A"
}

Response

deleted is the fact that was removed:

{
  "deleted": { "id": "01KJ8Z3W5Q2YB7N4R6T8VX2C9A", "ref": "X2C9A", "subject": "user:maya", "predicate": "works_at", "object": "company:acme" }
}

Errors

| Status | When | |:--|:--| | 400 | ref is not 5 or 26 id characters | | 404 | No fact matches; nothing was deleted | | 409 | Two facts share the ref; nothing was deleted. Pass the full id as ref |


forget_entity

Delete every fact where an entity is the subject or the object, then the entity itself when nothing else references it. REST POST /v1/forget_entity and MCP tool forget_entity.

POST/v1/forget_entity

{ "entity": "user:maya" }

The response includes facts_deleted and entity_deleted.