Skip to content

forget

Delete a memory by its key.

Parameters

ParameterTypeRequiredDescription
keystringYesThe exact key of the memory to delete.

Behaviour

  • Permanently deletes the memory with the given key.
  • Raises an error if no memory with that key exists.
  • Deletion is irreversible — there is no trash or undo.

Examples

Forget the memory about the old database URL — we've migrated.

→ agent calls forget("project/old-db-url")

Delete everything we stored about the cancelled feature.

→ agent may call forget for each relevant key, or use list_memories first to find them.

Hive — shared persistent memory for AI agents