cognee-cli skill
Use when the user wants to drive cognee from the terminal with cognee-cli — remember/recall/forget/improve memory commands, managing datasets and config, or database migrations.
Is the cognee-cli skill safe?
Clean: nothing in its files matched our rules. We read 1 file in the folder on 2026-09-28.
No findings.
Install the cognee-cli skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/topoteretes/cognee.git /tmp/cognee mkdir -p ~/.claude/skills cp -r /tmp/cognee/.claude/skills/cognee-cli ~/.claude/skills/cognee-cli
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
Use the cognee CLI
cognee-cli ships with the package (entry point in cognee/cli/cognee.py; each command lives in cognee/cli/commands/). Every command has --help for its flags, but only a few (memify, eval, serve, push, migrate) include usage examples — for the memory commands use the examples in this file. Needs LLMAPI_KEY configured, same as the SDK.
Core flow
The memory commands are the primary surface as of cognee 1.x:
cognee-cli remember "Your text here" # also accepts file paths / URLs
cognee-cli remember ./docs --dataset-name my_project
cognee-cli recall "Your question" # query the graph
cognee-cli recall "keyword" --query-type CHUNKS
cognee-cli forget --all # wipe local stateremember is ingest + graph build in one step (add + cognify under the hood); --background/-b runs the cognify stage in the background, and --dry-run estimates LLM tokens/cost without ingesting. recall takes --datasets/-d, --top-k/-k (default 10), and --session-id/-s.
forget targets --dataset, --dataset-id, --data-id (needs a dataset), or --everything/--all — one unified command covering what delete, prune, and empty_dataset used to do separately.
forget --all does not ask for confirmation. It deletes every dataset
immediately, even on a non-interactive stdin. The legacy delete --all
prompts Delete ALL data from cognee? [y/N] first, so switching to forget
silently drops that safety net — script it with care.
--query-type accepts 10 of the SDK's 20 SearchType values — the list in cognee/cli/config.py:SEARCHTYPECHOICES: HYBRIDCOMPLETION, GRAPHCOMPLETION, RAGCOMPLETION, CHUNKS, CHUNKSLEXICAL, SUMMARIES, CODE, CYPHER, GRAPHREPORT, SKILLS. The rest (TEMPORAL, TRIPLETCOMPLETION, GRAPHCOMPLETIONCOT, AGENTICCOMPLETION, NATURALLANGUAGE, …) are SDK-only, e.g. cognee.recall(q, query_type=SearchType.TEMPORAL).
When --query-type is omitted the CLI uses HYBRIDCOMPLETION (DEFAULTSEARCH_TYPE), whereas the SDK's cognee.recall() auto-routes between search types. --top-k defaults to 10 on the CLI and 15 in the SDK.
Session memory and enrichment
Session entries are currently written from the SDK — cognee.remember(..., sessionid="chat1") — not the CLI (cognee-cli remember has no session flag). The CLI side of session memory is reading and bridging:
cognee-cli recall "question" -s chat_1 # session cache first: without -d/-t
# this searches the session directly
cognee-cli sessions get # retrieve session Q&A history
cognee-cli improve -d my_project -s chat_1 # bridge session content into the graph
cognee-cli improve -d my_project # enrich/index the graph (no session)
cognee-cli feedback ... # attach feedback to resultsimprove also takes --node-name, --feedback-alpha (learning rate in (0, 1]; default IMPROVEFEEDBACKALPHA, 0.1), --build-global-context-index, --build-truth-subspace (both opt-in stages; the truth subspace needs -s), and --background/-b. It prints one line per stage — name, status (completed / alreadycompleted / skipped / errored) and the skip reason (e.g. nosessionids, lockheld, tripletembeddingdisabled). remember/improve build their graphs through cognify(), so cognify-level settings (e.g. CONTRADICTION_DETECTION=true) apply to them too.
Legacy / lower-level commands
add, cognify, search, memify, and delete still ship and are what the memory commands call underneath. Use them only to drive a single stage in isolation; prefer remember/recall/forget/improve otherwise.
cognee-cli add "text" && cognee-cli cognify # what `remember` does in one step
cognee-cli search "question" # `recall` minus routing/scope/session sources
cognee-cli memify -d my_project # custom extraction/enrichment tasks
cognee-cli delete --all # superseded by `forget --all`Management
cognee-cli datasets list # dataset operations
cognee-cli config get [key] [--show-secrets] # view one/all settings (API keys masked by default)
cognee-cli config set <key> <value> # set + persist to ./.env in the cwd
cognee-cli config unset <key> # reset a key to its default (also persisted)
cognee-cli -ui # launch API server + UI (see cognee-server skill)
cognee-cli serve --url http://localhost:8000 # connect CLI/SDK to a running instanceRelational DB migrations (Alembic)
cognee-cli upgrade # apply migrations
cognee-cli downgrade
cognee-cli history
cognee-cli currentTypically needed after version upgrades when the server refuses to start on an old schema.
Gotchas
is slow (DB + model setup), later ones are fast.
- The CLI initializes cognee lazily; the first command in a fresh environment
main_dataset; recall/search operate across your accessible datasets unless a dataset is given.
- remember (and add) without --dataset-name targets the default dataset
(with a dataset), or --everything/--all.
- forget refuses to run bare — pass --dataset, --dataset-id, --data-id
CACHING=true (the default) — with it off, session reads return nothing and SDK session writes raise. To cut read latency and token cost while keeping session memory, cognee-cli config set AUTO_FEEDBACK false — by default cognee makes one structured-output LLM call per answered query to self-tune its memory.
- Session commands (recall -s, sessions get, improve -s) require
you run the command from (creating it if missing). config reset (reset all keys) is still not implemented.
- memify requires one of the arguments -d/--dataset-name --dataset-id
- config set/config unset write to the .env file in whatever directory
calls dotenv.loaddotenv(override=True), which resolves relative to the cognee package location, not your working directory. In a source/editable checkout (uv pip install -e .) a .env at the repo root therefore shadows the .env in the directory you ran from — and because override=True, it also beats variables you exported. Symptom: config set appears to do nothing, or the CLI connects to a backend you thought you had overridden. To test against different settings, move the repo .env aside, or set values programmatically after import (cognee.config.set). (Under python -c the cwd .env does win, because dotenv falls back to the cwd when main has no file — which is why the same command can behave differently as a script vs. -c.)
- Which .env actually wins is not always the cwd one. At import, cognee
More skills from topoteretes/cognee
- Acognee-communityUse when the user needs something that ships outside cognee core — community database adapters (Qdrant, Milvus, Weaviate, Redis, Pinecone, FalkorDB, Memgraph, DuckDB, NetworkX, …), data-source connectors (Slack, Gmail, Notion, Confluence, Google Drive), custom tasks/pipelines/retrievers (Exa, ScrapeGraph, codify), Keywords AI observability — or wants to contribute a package to the cognee-community repo.
- Acognee-dockerUse when the user wants to run cognee with Docker or docker compose — trying it out from the prebuilt image, starting the API server in a container, or bringing up the full stack (UI, MCP, Postgres, Neo4j) with compose profiles.
- Acognee-installUse when the user wants to install cognee and run their first remember → recall flow with the Python SDK — fresh setup, virtual env, extras selection, or a minimal working example.
- Acognee-integrationsUse when the user wants to connect cognee to external services — switching LLM or embedding providers (OpenAI, Azure, Gemini, Anthropic, Ollama, OpenRouter), changing databases (Postgres, PGVector, Neo4j, Neptune, Turso), S3 storage, or the MCP server for IDE integration.
- Acognee-permissionsUse when working with cognee's permission system — understanding or changing how users, roles, and tenants get access to datasets, how ACL grants work, where permissions are enforced in add/cognify/search/delete, and how the grant records surface in the memory-provenance view.
- Acognee-serverUse when the user wants to run the cognee API server (and optional UI) on their own machine — starting it, checking it's healthy, connecting the SDK or other clients to it, and choosing the right auth posture.
- Adiff-risk-explainerUse to briefly explain small code diffs.
- Apr-comment-evaluatorUse to judge whether a PR review comment sounds polite.
- Askill-feedback-writerUse to identify missing instructions in another skill based on its output.