Mem0 CLI Memory Commands
mem0ai/mem0
Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
Removes data from cognee memory with forget(), finding the right dataset and document first and choosing between one document, a dataset or only the graph and vector memory.
$ npx skills add topoteretes/cognee --skill cognee-forget -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install topoteretes/cognee cognee-forget --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cognee-forget .claude/skills/cognee-forget && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .claude/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forgetType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add topoteretes/cognee --skill cognee-forget -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install topoteretes/cognee cognee-forget --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/cognee-forget .agents/skills/cognee-forget && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .agents/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add topoteretes/cognee --skill cognee-forget -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install topoteretes/cognee cognee-forget --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/cognee-forget .cursor/skills/cognee-forget && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .cursor/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/topoteretes/cognee.git --path .agents/skills/cognee-forget--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add topoteretes/cognee --skill cognee-forget -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install topoteretes/cognee cognee-forget --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/cognee-forget .gemini/skills/cognee-forget && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .gemini/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install topoteretes/cognee cognee-forgetInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add topoteretes/cognee --skill cognee-forget -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/cognee-forget .github/skills/cognee-forget && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .github/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add topoteretes/cognee --skill cognee-forget -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install topoteretes/cognee cognee-forget --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/cognee-forget .opencode/skills/cognee-forget && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cognee-forget" agent skill from https://github.com/topoteretes/cognee/tree/main/.agents/skills/cognee-forget into .opencode/skills/cognee-forget/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cognee-forget", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cognee-forgetRemoves data from cognee memory with forget(), finding the right dataset and document first and choosing between one document, a dataset or only the graph and vector memory.
forget() is cognee's single deletion API, and the skill treats deletion as final: find, read, confirm, then delete. The agent lists the datasets you can read, lists a dataset's documents, then reads the stored content, because names are often hashes, and shows candidates with a short preview. The same steps are given for the Python SDK, the HTTP API and the CLI.
Hard limits apply: delete only what you asked to forget, confirm the exact items first unless you gave exact ids, and use forget(everything=True) only when you explicitly ask to wipe all of your memory, never any other reset mechanism. A table maps goals to calls: one document, a whole dataset, or only the derived graph and vector memory while the raw files are kept, with shared entities staying while another document still references them.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0ec7a9f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cognee Forget loads about 1.9k tokens when it runs. Until then it costs about 82 tokens; SKILL.md has 859 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from topoteretes/cognee at commit 0ec7a9f, republished under its Apache-2.0 licence (© topoteretes). 859 words, ~1,920 tokens.
.claude/skills/cognee-forget/SKILL.md (or your agent's skills folder).forget() is cognee's one deletion API. It removes one document, a whole
dataset, or only the derived memory (graph + vectors) while keeping the raw
files. Deletion cannot be undone, so the workflow is always find, read,
confirm, then delete.
Hard limits for agents
- Delete only what the user asked to forget. Identify it by reading the content first; never guess from a file name alone.
- Confirm the exact items with the user before deleting, unless they already named exact ids.
- The widest deletion you may run is
forget(everything=True), and only when the user explicitly asks to wipe all of their memory. Never use any other reset or wipe mechanism to delete data.
import cognee
datasets = await cognee.datasets.list_datasets() # datasets the user can read
for ds in datasets:
print(ds.id, ds.name)HTTP: GET /api/v1/datasets. CLI: cognee-cli datasets list.
items = await cognee.datasets.list_data(dataset_id) # all Data rows, oldest first
for item in items:
print(item.id, item.name, item.extension, item.created_at)HTTP: GET /api/v1/datasets/{dataset_id}/data?limit=100&offset=0 (limit up
to 1000; GET .../data/count for the total; example:
examples/python/dataset_data_pagination.py). CLI:
cognee-cli datasets data <dataset_uuid>.
Each item has id, name, created_at, extension, mime_type,
raw_data_location, dataset_id, label, external_metadata (including
any node_set), and data_size.
Names are often text_<hash>.txt, so read the content to find what the user
means.
GET /api/v1/datasets/{dataset_id}/data/{data_id}/raw returns the
stored file (404 if it is gone).from cognee.infrastructure.files.utils.open_data_file import open_data_file
async with open_data_file(item.raw_data_location, mode="rb") as f:
preview = f.read(2000).decode("utf-8", errors="replace")Judge matches by meaning, not only by keywords, and show the user the candidates (name + a short preview) before deleting.
| Goal | Call | What remains |
|---|---|---|
| One document | forget(data_id=..., dataset_id=...) (or dataset="name") | Nothing of that document; shared entities stay while another document still references them |
| A whole dataset | forget(dataset="name") or forget(dataset_id=...) | The dataset is deleted outright: the record, its data rows, graph and vector stores, and attributed sessions |
| Rebuild a dataset's graph later | forget(dataset="name", memory_only=True) | Raw files and data rows; graph, vectors, sessions and pipeline status are reset, so the data can be re-processed |
| One document's memory only | forget(dataset="name", data_id=..., memory_only=True) | That document's raw file and row |
| Every dataset the user can delete | forget(everything=True) | Nothing, in any dataset the user has delete on in the current tenant (shared ones included). Only on explicit request (see the hard limits) |
Return values: {"data_id", "dataset_id", "status"} for a document,
{"dataset_id", "status"} for a dataset (plus data_records_reset with
memory_only), {"datasets_removed", "status"} for everything
(datasets_removed counts the datasets the user can read, not the delete
set).
HTTP: POST /api/v1/forget with a JSON body; camelCase and snake_case
keys both work: {"datasetId": "...", "dataId": "..."},
{"dataset": "name", "memoryOnly": true}, {"everything": true}. Invalid
combinations return 422.
CLI: cognee-cli forget --dataset NAME | --dataset-id UUID [--data-id UUID] [--memory-only], or --everything / --all. The CLI
does not ask for confirmation; confirm with the user first.
data_id that is not in the dataset returns success and deletes
nothing. The delete path treats an unknown id as a custom-graph-model
delete. Always take the id from list_data for that same dataset, and
check it is still listed afterwards if it matters.dataset or dataset_id, not both (ValueError).
data_id and memory_only both need a dataset.memory_only is ignored when everything=True in the SDK (the CLI
rejects the combination). everything=True always deletes everything.DatasetNotFoundError. Deleting
needs the delete permission on the dataset (see the cognee-permissions
skill). everything=True deletes every dataset the user has delete
permission on in the current tenant, including datasets shared to them
with delete rights, not only the ones they own.cognee.update(data_id=..., data=..., dataset_id=...), which keeps its
id and re-extracts only the changed parts.cognee.delete() is deprecated; use forget().forget() resolves the dataset with the delete permission, then:
datasets.delete_data(): takes the dataset lock,
deletes the graph nodes and edges the document owns, the matching vectors
and edge evidence, invalidates sessions that cited them, then deletes the
Data row. Ownership is tracked per document (source-refs on graph
elements), so an entity shared by two documents survives until both are
deleted. Raw files are reference-counted by storage location.datasets.empty_dataset().memory_only → drops the dataset's graph/vector memory and resets its
pipeline status, leaving raw data for a rebuild.everything → datasets.delete_all() over every dataset the user has
delete on in the current tenant, plus a full prune of the session cache
(when caching or usage logging is on). This wipes every user's
sessions (Redis FLUSHDB / the whole fs cache / all SQL cache tables), not
just this user's.Key files:
cognee/api/v1/forget/forget.py (SDK), routers/get_forget_router.py
(HTTP), cognee/cli/commands/forget_command.py (CLI)cognee/api/v1/datasets/datasets.py (list_datasets, list_data,
delete_data, empty_dataset, delete_all)cognee/api/v1/datasets/routers/get_datasets_router.py (list, count, raw)cognee/infrastructure/databases/provenance/source_refs.py (per-document
ownership of graph elements)cognee/infrastructure/files/utils/open_data_file.pyforget(data_id=...) cannot find and remove it.memory_only.forget() are in cognee/tests/unit/api/v1/forget/
(argument validation, the HTTP endpoint, memory_only); cover both the
document and the memory_only paths for new deletion behaviour.© topoteretes, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/cognee-forget of topoteretes/cognee.
Open the folder on GitHubat commit 0ec7a9f
Cognee Forget next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cognee Forget this skilltopoteretes/cognee | 32k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Mem0 CLI Memory Commandsmem0ai/mem0 | 67k | — | ~2k | Automated safety check: Notes | Apache-2.0 | |
| MemPalace Setup and OperationMemPalace/mempalace | 59k | — | ~2.2k | Automated safety check: Pass | MIT | |
| SkillOpt-Sleep Self-Improvement Cyclemicrosoft/SkillOpt | 18k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Agent Memorytigerless-labs/agent-memory | 3.4k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Mindmemos CLImindscale-noah/MindMemOS | 1k | — | ~3.4k | Automated safety check: Pass | None |
mem0ai/mem0
Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
MemPalace/mempalace
Installs and configures MemPalace as a private local palace, a shared-brain hub or a client of an existing hub, including MCP registration and version-correct initialization.
microsoft/SkillOpt
Runs a nightly or on-demand sleep cycle for a local Codex agent: review past sessions, replay recurring tasks and stage validated skill and memory edits for adoption.
tigerless-labs/agent-memory
Read and write the shared long-term memory store. An agent skill from tigerless-labs/agent-memory.
mindscale-noah/MindMemOS
Give an AI agent persistent, cross-session long-term memory through MindMemOS.
AgentToolkit/altk-evolve
Contrasts successful and failed agent runs of the same task and derives guidelines backed by evidence from transcripts, tool calls and outcome judgments.
topoteretes/cognee
Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.
topoteretes/cognee
Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.
topoteretes/cognee
Defines the shape of cognee's knowledge graph with graph_model: DataPoint node classes, identity and index fields, typed edges and fixes for duplicated nodes.
topoteretes/cognee
Shows how to write custom cognee tasks, chain them into pipelines, store custom DataPoints and run enrichment over the existing graph.
topoteretes/cognee
Runs the Cognee AI memory platform in Docker, from a one-file prebuilt image to a full compose stack with UI, MCP server, Postgres and Neo4j.
topoteretes/cognee
Explains how cognee stores session memory by session_id and bridges it into the permanent graph with improve(), including the stages, results and settings.
Works with
Categories
Removes data from cognee memory with forget(), finding the right dataset and document first and choosing between one document, a dataset or only the graph and vector memory. forget() is cognee's single deletion API, and the skill treats deletion as final: find, read, confirm, then delete. The agent lists the datasets you can read, lists a dataset's documents, then reads the stored content, because names are often hashes, and shows candidates with a short preview.
Cognee Forget fits situations like: deleting a specific document from cognee memory; removing a whole dataset or only its graph and vector memory; finding which dataset holds content you want forgotten.
Run `npx skills add topoteretes/cognee --skill cognee-forget -a claude-code`. Or copy the skill folder (.agents/skills/cognee-forget in topoteretes/cognee) into .claude/skills/cognee-forget in your project. Claude Code loads it when a task matches its description.
Run `npx skills add topoteretes/cognee --skill cognee-forget -a codex`. Or copy the skill folder (.agents/skills/cognee-forget in topoteretes/cognee) into .agents/skills/cognee-forget in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add topoteretes/cognee --skill cognee-forget -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cognee-forget, .gemini/skills/cognee-forget, .github/skills/cognee-forget and .opencode/skills/cognee-forget in your project.
SKILL.md names no scripts, command-line tools or credentials: Cognee Forget is instructions for the agent only. Our summary lists: A cognee installation, used through its Python SDK, HTTP API or CLI.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cognee Forget is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cognee Forget: Mem0 CLI Memory Commands (mem0ai/mem0, 67k stars), MemPalace Setup and Operation (MemPalace/mempalace, 59k stars), SkillOpt-Sleep Self-Improvement Cycle (microsoft/SkillOpt, 18k stars) and Agent Memory (tigerless-labs/agent-memory, 3.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
topoteretes (a GitHub organization) maintains it in topoteretes/cognee, which has 31,919 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.
Source: topoteretes/cognee on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.