cognee-forget

Installation
SKILL.md

Cognee Forget

Delete documents from Cognee memory based on what the user asks to forget. You decide which documents match by reading their raw content — Cognee only deletes what you tell it to.

When to use

  • User says "forget ...", "delete ... from memory", "remove what you know about ...", "stop remembering ..."
  • NOT for clearing an entire dataset or all memory unless the user explicitly asks for that (see the warning at the bottom)

How it works

Forgetting is a four-step process against the running Cognee server: sync the live session, find the current dataset's id, inspect the raw data of candidate documents, then forget the documents whose content matches what the user wants deleted.

Deleting a document removes its raw data, its derived graph knowledge, and — best-effort — the session memory contaminated by it: Q&A turns whose answers actually cited the deleted graph elements, plus the feedback and distilled guidance that descend from those turns. This is targeted, not whole-session: a turn that merely discussed the topic without citing the deleted elements survives, and agent trace entries are not matched at all. So deleting the documents is what makes forgetting durable — say that plainly when confirming, and don't promise the session cache is now free of the topic.

All server access goes through the cognee-forget.sh helper. It resolves the base URL and API key the same way the other skills do (shell env → ~/.cognee/.env → the auto-minted local key in api_key.json) and always sends X-Api-Key — in cloud and local mode alike, since the server enforces auth even on localhost. Do not bypass it with raw curl: in local mode the key is never exported to your shell, so raw requests 401.

Every helper API command prints the JSON response followed by a final HTTP <status> line — always check it. The underlying endpoints are documented in the server's Swagger UI at $COGNEE_BASE_URL/docs (local: http://localhost:8011/docs) — consult it if a response shape doesn't match your server version.

Installs
2
GitHub Stars
89
First Seen
Sep 8, 2026