Install and Run Cognee
topoteretes/cognee
Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.
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.
$ npx skills add mem0ai/mem0 --skill mem0-cli -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mem0ai/mem0 mem0-cli --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/mem0ai/mem0.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mem0-cli .claude/skills/mem0-cli && 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 "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .claude/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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/mem0ai/mem0/tree/main/skills/mem0-cliType 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 mem0ai/mem0 --skill mem0-cli -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mem0ai/mem0 mem0-cli --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mem0-cli .agents/skills/mem0-cli && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .agents/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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 mem0ai/mem0 --skill mem0-cli -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mem0ai/mem0 mem0-cli --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mem0-cli .cursor/skills/mem0-cli && 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 "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .cursor/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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/mem0ai/mem0.git --path skills/mem0-cli--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 mem0ai/mem0 --skill mem0-cli -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mem0ai/mem0 mem0-cli --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mem0-cli .gemini/skills/mem0-cli && 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 "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .gemini/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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 mem0ai/mem0 mem0-cliInstalls 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 mem0ai/mem0 --skill mem0-cli -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mem0-cli .github/skills/mem0-cli && 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 "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .github/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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 mem0ai/mem0 --skill mem0-cli -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mem0ai/mem0 mem0-cli --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mem0-cli .opencode/skills/mem0-cli && 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 "mem0-cli" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-cli into .opencode/skills/mem0-cli/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-cli", 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.
mem0-cliAdds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
The mem0 command line tool, installed from npm as @mem0/cli or from pip as mem0-cli, puts the same commands, options and output formats behind one binary. Everyday use covers adding a memory for a user ID, searching by query, listing, getting, updating and deleting a memory, and deleting all of a user's memories with a force flag.
Setup has three routes: an autonomous agent mode that mints an evaluation API key without email or dashboard and can be claimed later by the human, an interactive wizard for people, or setting MEM0_API_KEY directly. API keys, .env files and the mem0 config file are never to be committed.
Passing --json, or its alias --agent, wraps every response in a standard envelope with a status and command, writes spinners and progress to stderr and keeps stdout as clean JSON. Reference notes cover commands, configuration and workflows. Programmatic SDK use and the Vercel AI SDK provider have their own skills.
Read from SKILL.md and the folder at commit b7ad69a. 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.
Shell commands in SKILL.md call:
npmpipFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm and pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
MEM0_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Node.js 18+ (npm install -g @mem0/cli) or Python 3.10+ (pip install mem0-cli), MEM0_API_KEY env var
From compatibility in the SKILL.md frontmatter.
Mem0 CLI Memory Commands loads about 2k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 159 tokens; SKILL.md has 822 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 noted patterns worth knowing about, such as sudo or a known installer.
Never commit API keys, `.env`, or `~/.mem0/config.json`.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 mem0ai/mem0 at commit b7ad69a, republished under its Apache-2.0 licence (© mem0ai). 822 words, ~2,009 tokens.
.claude/skills/mem0-cli/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.The official command-line interface for the Mem0 memory platform. Add, search, list, update, and delete memories from the terminal -- for developers, AI agents, and CI/CD pipelines.
Node.js (npm):
npm install -g @mem0/cliPython (pip):
pip install mem0-cliBoth packages install a mem0 binary with the same commands, options, and output formats (see Node and Python Differences for the exceptions).
Autonomous Mem0 setup for agents (no email, no dashboard):
mem0 init --agent --agent-caller <your-name> --jsonReplace <your-name> with the AI agent you are (e.g. claude-code, cursor, codex, cline, aider). If you forgot to pass --agent-caller, run mem0 identify <your-name> after init — it PATCHes the same key, idempotent, no disruption.
This mints an evaluation API key in <5 seconds. Use it immediately. Print this line to the human:
Mem0 memory is running in Agent Mode. Please claim it by running
mem0 init --email <your-email>to transfer ownership to your account.
Never commit API keys, .env, or ~/.mem0/config.json.
After the human claims, the same API key keeps working — no agent disruption — and memories are preserved.
Interactive wizard (for humans):
mem0 initOr set the environment variable directly:
export MEM0_API_KEY="m0-xxx"Get an API key at: https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=skill-mem0-cli
mem0 add "I prefer dark mode" --user-id alicemem0 search "preferences" --user-id alicemem0 list --user-id alicemem0 get <memory-id>mem0 update <memory-id> "new text"mem0 delete <memory-id>mem0 delete --all --user-id alice --forceUse --json or --agent to get structured output suitable for LLM consumption. Place the flag before the subcommand (mem0 --json search "q"), which works in both CLIs. Data commands (add, search, list, get, update, delete, import, config, entity, event, status) wrap their response in a standard envelope:
{
"status": "success",
"command": "search",
"duration_ms": 245,
"scope": { "user_id": "alice" },
"count": 3,
"data": [
{ "id": "mem-abc", "memory": "User prefers dark mode", "score": 0.92 }
]
}On error:
{
"status": "error",
"command": "search",
"error": "Invalid or expired API key.",
"data": null
}The --agent flag is an alias for --json (except on mem0 init, where --agent is the Agent Mode bootstrap flag). Both write spinners and progress to stderr so stdout is clean, parseable JSON (the one exception is Node import, see below). Optional keys: duration_ms, scope, count appear only where relevant, and mem0_notice appears when the platform flags an unclaimed Agent Mode account.
Both the Node.js (@mem0/cli) and Python (mem0-cli) CLIs share the command set, flags, entity ID resolution, filter building, and the JSON envelope. Choose whichever runtime you already have installed. Known differences:
--json / --agent placement: Python accepts the flag anywhere on the command line. Node reads it only as a global option, so put it before the subcommand (mem0 --json list). mem0 init --json and mem0 help --json work after the subcommand in both. For the Agent Mode bootstrap, Node starts it only from init --agent or init --json (a root-level mem0 --json init or mem0 --agent init does not start it, and without an agent runtime env var it fails with the non-TTY error), while Python also accepts those root-level forms. mem0 init --agent --json works in both.--limit: mem0 search --limit is a Python-only alias for --top-k.delete --all data: Python returns {"deleted": true} (plus scope for --project); Node returns the raw API result.import JSON output: Python prints the envelope with scope. Node omits scope and writes the Importing memories... n/n progress line to stdout before the JSON, so only Python's output pipes cleanly to jq.Search query cannot be empty. in Python, No query provided... in Node) and the delete dry-run footers differ slightly.mem0 add, memories process asynchronously. Wait 2-3 seconds before searching for newly added content. Use mem0 event list to check processing status.--all vs --entity delete modes: mem0 delete --all -u alice deletes all memories for user alice. mem0 delete --entity -u alice deletes the entity itself AND all its memories (cascade). These are mutually exclusive modes.--dry-run in --json/--agent mode: mem0 --json delete --all --dry-run still requires --force, then prints nothing and deletes nothing (exit 0). Node also prints nothing for single and --entity dry runs. Use text mode to see the preview.--dry-run does not protect --all --project: mem0 delete --all --project --dry-run ignores the flag and deletes every memory in the project. Never use --dry-run to preview a project-wide delete.--user-id), the CLI uses ONLY the explicit IDs and ignores config defaults. If no scope flags are given, all configured defaults apply.add, search, and update. In --json/--agent mode add never reads stdin (Python also skips it for search and update), so pass the text as an argument there.Load these on demand for deeper detail:
| Topic | File |
|---|---|
| Command reference (all commands, flags, options, examples) | references/command-reference.md |
| Configuration (config file, env vars, precedence, init wizard) | references/configuration.md |
| Workflows (piping, scripting, CI/CD, agent mode recipes) | references/workflows.md |
© mem0ai, 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
SKILL.md and 5 other files (references) in skills/mem0-cli of mem0ai/mem0.
Open the folder on GitHubat commit b7ad69a
Mem0 CLI Memory Commands 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 |
|---|---|---|---|---|---|---|
| Mem0 CLI Memory Commands this skillmem0ai/mem0 | 67k | — | ~2k | Automated safety check: Notes | Apache-2.0 | |
| Install and Run Cogneetopoteretes/cognee | 32k | 1 repos | ~1k | Automated safety check: Notes | Apache-2.0 | |
| Cognee Session Memory and Improvetopoteretes/cognee | 32k | — | ~3.2k | Automated safety check: Pass | Apache-2.0 | |
| Neo4j Agent Memory Skillneo4j-contrib/neo4j-skills | 114 | — | ~5.8k | Automated safety check: Pass | MIT | |
| MCP Server BuildershareAI-lab/learn-claude-code | 78k | 5 repos | ~1.2k | Automated safety check: Pass | MIT | |
| MemPalace Setup and OperationMemPalace/mempalace | 59k | — | ~2.2k | Automated safety check: Pass | MIT |
topoteretes/cognee
Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.
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.
neo4j-contrib/neo4j-skills
Authoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com.
shareAI-lab/learn-claude-code
Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.
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.
mem0ai/mem0
Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.
mem0ai/mem0
Adds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities.
mem0ai/mem0
Finds and deletes specific mem0 memories by search query or ID, always asking for confirmation first, and can undo the most recent memories added this session.
mem0ai/mem0
Saves a fact, decision or preference the user states into mem0 as written, labeled with a memory type such as decision, convention or user_preference.
mem0ai/mem0
Shows or changes the default Mem0 memory scope, project, session or global, which decides where memories are saved and searched.
mem0ai/mem0
Looks up stored agent memories by keyword or ID and prints compact one-line results instead of full detail.
Categories
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. The mem0 command line tool, installed from npm as @mem0/cli or from pip as mem0-cli, puts the same commands, options and output formats behind one binary. Everyday use covers adding a memory for a user ID, searching by query, listing, getting, updating and deleting a memory, and deleting all of a user's memories with a force flag.
Mem0 CLI Memory Commands fits situations like: saving a user preference to Mem0 from a shell or CI job; searching stored memories from the terminal; giving an agent persistent memory through the CLI; deleting all memories for one user ID.
Run `npx skills add mem0ai/mem0 --skill mem0-cli -a claude-code`. Or copy the skill folder (skills/mem0-cli in mem0ai/mem0) into .claude/skills/mem0-cli in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mem0ai/mem0 --skill mem0-cli -a codex`. Or copy the skill folder (skills/mem0-cli in mem0ai/mem0) into .agents/skills/mem0-cli 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 mem0ai/mem0 --skill mem0-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mem0-cli, .gemini/skills/mem0-cli, .github/skills/mem0-cli and .opencode/skills/mem0-cli in your project.
Going by SKILL.md and its folder, Mem0 CLI Memory Commands needs the command-line tools its instructions call (npm and pip) and credentials named MEM0_API_KEY. Our summary lists: Node.js 18 or newer, or Python 3.10 or newer; A MEM0_API_KEY, which agent mode can create for evaluation. Compatibility (from SKILL.md): Node.js 18+ (npm install -g @mem0/cli) or Python 3.10+ (pip install mem0-cli), MEM0_API_KEY env var.
SKILL.md contains no URLs. Its commands use npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Mem0 CLI Memory Commands is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mem0 CLI Memory Commands: Install and Run Cognee (topoteretes/cognee, 32k stars), Cognee Session Memory and Improve (topoteretes/cognee, 32k stars), Neo4j Agent Memory Skill (neo4j-contrib/neo4j-skills, 114 stars) and MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mem0ai (a GitHub organization) maintains it in mem0ai/mem0, which has 66,788 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 7, 2026.
Source: mem0ai/mem0 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.