Guide · Agent skill
How to use the cognee-forget agent skill: remove data safely
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cognee-forget skill teaches an AI agent how to delete information from a cognee memory store. It is written for developers who maintain a cognee knowledge base and need to remove outdated or sensitive documents without the agent wiping more than was intended. After this guide you will know how to install the skill, how to ask for a deletion in plain language, and what the agent does before it deletes anything.
Quick start
- 1Download and unzip the skill. Download the ZIP from this page and unzip it so SKILL.md sits in ~/.claude/skills/ or your project's .claude/skills/ folder.
- 2Confirm cognee is set up. Make sure the cognee SDK, HTTP API or cognee-cli is installed and configured, and that your account has delete permission on the dataset.
- 3Ask for a deletion in plain language. Describe the content and the scope, for example one outdated document or a whole dataset.
- 4Review the candidates. The agent lists datasets and documents and reads their content. Check the names and previews it shows you.
- 5Confirm the exact items. Approve the specific documents or dataset before the agent runs any deletion.
- 6Verify the result. Ask the agent to list the dataset again and confirm the removed items are gone.
What an agent skill is and what this one does
An agent skill is a folder containing a SKILL.md file that gives an AI agent instructions for one kind of task. The agent reads these instructions when a request matches the skill's description.
The cognee-forget skill covers deletion with forget(), cognee's single deletion API. The agent finds the right dataset, lists its documents, reads the stored content to confirm the match, and then removes only the requested item: one document, a whole dataset, or just the derived graph and vector memory while keeping the raw files.
The skill tells the agent to confirm with you before any deletion, because deletion cannot be undone.
Install the cognee-forget skill
Download the ZIP for this skill from this page and unzip it. The skill's only file is SKILL.md.
For a personal install, unzip it into ~/.claude/skills/. To scope it to one project, unzip it into that project's .claude/skills/ folder.
In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/
- Project: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills
Set up what the skill needs
The skill assumes you already have cognee working. It needs one of the following installed and configured: the cognee Python SDK, the HTTP API, or cognee-cli.
The account or key the agent uses must have delete permission on the target dataset. For questions about access, the related skill cognee-permissions covers them.
- cognee Python SDK, HTTP API or cognee-cli installed and configured
- Delete permission on the target dataset
- cognee-permissions skill for access questions
Trigger the skill with natural requests
You do not need to name the skill. Ask for a deletion in plain language that describes the content, such as the topic of an outdated document or the name of a dataset. The agent will then list datasets and documents and read them before proposing what to delete.
Good requests name the content and the scope. Mention whether you want one document removed, a whole dataset emptied, or only the graph and vector memory cleared so it can be rebuilt later.
- Remove the document about our old 2023 pricing from the sales dataset.
- Forget everything in the onboarding dataset, the raw files can stay.
- Clear the graph memory for the support dataset so we can reprocess it, but keep the original documents.
Understand the deletion options
Choose the scope before the agent deletes. Deleting one document removes its graph nodes and edges that belong only to it, its vectors, and its data row; entities shared with another document remain until that document is also deleted. Deleting a whole dataset removes the dataset record, its data rows, and its graph and vector stores. Using memory_only keeps the raw files and data rows and resets the graph, vectors, sessions and pipeline status so the data can be re-processed.
To replace a document's content rather than delete it, the skill directs the agent to cognee.update() instead, since forget() is a delete.
- One document: forget(data_id=..., dataset_id=...)
- Whole dataset: forget(dataset="name") or forget(dataset_id=...)
- Rebuild graph later: forget(dataset="name", memory_only=True)
- Wipe all datasets you can delete: forget(everything=True), only on explicit request
forget(data_id=..., dataset_id=...)
forget(dataset="name")
forget(dataset="name", memory_only=True)
forget(everything=True)Safety notes: scripts, network and permanent deletes
This skill runs no scripts and uses no network access of its own. It is a set of instructions that guides the agent's use of cognee, so the deletion itself happens through the cognee SDK, HTTP API or CLI you have configured.
Deletion is permanent. The cognee-cli forget command does not ask for confirmation, so the agent must confirm with you first. Be careful on shared multi-user deployments: forget(everything=True) removes data across every dataset the user can delete in the current tenant, including shared ones, and clears session caches for every user, not only you.
- Runs scripts: no
- Uses network: no
- CLI does not ask for confirmation
- everything=True affects shared datasets and all users' session caches
Tips for safe deletions
Ask the agent to show you the candidate documents with their names and short previews before any deletion. Match by meaning, not only by file name, since names are often generic hashes.
If you need a specific document removed, give the agent its exact id, and check afterwards that it no longer appears in the dataset listing. An unknown id can report success without deleting anything, so verification matters.
- Review the candidate list before confirming.
- Prefer exact ids for precise removals and verify with a new listing afterwards.
- Use cognee.update() for changed content instead of deleting.
What people use it for
- Removing an outdated product document from a support knowledge base.
- Deleting sensitive personal content that was added to a dataset by mistake.
- Clearing a dataset's graph and vector memory with memory_only so it can be rebuilt from its raw files.
- Emptying a test dataset completely once a project is finished.
Frequently asked questions
How do I install the cognee-forget skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for a personal install, or into a project's .claude/skills/ folder. In the Claude apps you can upload the ZIP under Settings → Capabilities → Skills.
What do I need before using cognee-forget?
You need the cognee Python SDK, HTTP API or cognee-cli installed and configured, plus delete permission on the target dataset. The cognee-permissions skill covers access questions.
Is the cognee-forget skill free?
The source does not state pricing or licence terms beyond the listed licence, which is Apache-2.0. Check the cognee project for its licence terms.
Can I undo a deletion made with forget()?
No. The skill states that deletion cannot be undone, and the cognee-cli forget command does not ask for confirmation. Confirm the exact items before any deletion.
How is forget() different from updating a document?
forget() is a delete. To replace a document's content while keeping its id, the skill directs the agent to use cognee.update() instead.
Does the skill run scripts or use the network?
According to the listing, this skill runs no scripts and uses no network itself. The deletion runs through the cognee SDK, HTTP API or CLI you have configured.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you maintain a cognee knowledge base and want an agent to find, verify and remove specific documents or datasets with a confirmation step before deletion. Pick something else if you need to edit document content, which should use cognee.update() instead, or if you run a shared deployment and cannot risk forget(everything=True) reaching other users' data.
Download the skill