cognee-cli

A command-line guide for Cognee, a tool that turns text and files into searchable AI memory.

In plain words
What is it for?
Remembering text, files, or URLs; asking questions; removing datasets or stored data; estimating token costs; and running database migrations.
Why use it?
It provides the terminal commands and options needed to manage Cognee without writing a Python program or guessing command flags.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/topoteretes/cognee/cognee-cli
Any agent
npx skills add topoteretes/cognee --skill cognee-cli
Clone the repo
git clone --depth 1 https://github.com/topoteretes/cognee

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,714 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.01714
Opus 5 $0.00021 $0.00857
Sonnet 5 $0.00008 $0.00343
Haiku 4.5 $0.00004 $0.00171

Measured yesterday against content hash 225931b0e5e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cognee-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/cognee-cli/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section 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 with examples — prefer that over guessing flags. Needs LLM_API_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 state

remember 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.

Search types match exactly 7 of the SDK's SearchType enum (cognee/modules/search/types/SearchType.py), those 7 being chosen in (cognee/cli/config.py:SEARCH_TYPE_CHOICES): GRAPH_COMPLETION, RAG_COMPLETION, CHUNKS, SUMMARIES, CODE, CYPHER, GRAPH_REPORT Others must be reached from the SDK, not CLI; e.g. call cognee.recall with query_type=SearchType.TEMPORAL

Note the CLI defaults --query-type to GRAPH_COMPLETION, whereas the SDK's cognee.recall() auto-routes when query_type is omitted.

Session memory and enrichment

Session entries are currently written from the SDK — cognee.remember(..., session_id="chat_1") — not the CLI (cognee-cli remember has no session flag). The CLI side of session memory is reading and bridging:

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 133 lines · 42 tokens per session scan A 225931b0e5e0

Subscribe to this mod's changes

cognee-cli is a skill published in the GitHub repository topoteretes/cognee (30,350 stars, last pushed 2d ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,714 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

openmemory

Manage persistent memory via OpenMemory MCP. TRIGGER when: user says "remember this", "save to memory", "store this", "recall", "what do you remember about", "check memory", "forget this", "delete memory", "clean up memory", or when agent forms a stable conclusion worth persisting. DO NOT TRIGGER when: user refers to…

CaviraOSS/OpenMemory · 96 tokens

reflex-create

Use when the user notices a recurring pattern they want the system to learn ("I keep doing X", "every time Y happens", "make this automatic", "remember to always"), or when explicit phrases like "/reflex-create", "create reflex", "teach yourself" are used. Generates a new SKILL.md file from observed patterns.

terrizoaguimor/celiums-memory · 72 tokens

surface-learnings

Use when the user asks "what have you learned", "what do you remember about me", "show me memory stats", "memory state", "/reflexes", or any variant. Surfaces what the limbic engine has accumulated as patterns, not as a memory dump.

terrizoaguimor/celiums-memory · 60 tokens

context-recovery

Use at the start of every session, and especially after context compaction or a cold restart. Fires as the first action, before engaging with the user's opening message.

terrizoaguimor/celiums-memory · 37 tokens

emotional-calibration

Use when the user's message carries emotional valence — frustration, excitement, exhaustion, urgency, or confusion. Fires whenever tone matters more than information.

terrizoaguimor/celiums-memory · 34 tokens

habituation-check

Use when tempted to repeat the same praise, the same status report, the same explanation, or the same reassurance. Fires as a suppression gate — not all repetition is useful.

terrizoaguimor/celiums-memory · 39 tokens