Skip to content

Guide · Agent skill

How to use the cognee CLI memory commands agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains the cognee-cli agent skill, a documentation file that teaches an AI agent how to run the cognee command-line tool. cognee stores text, files and URLs in a searchable knowledge graph and answers questions from it. After reading, you will know how to install the skill, how to phrase requests so the agent picks it up, and which commands are risky before you let an agent run them.

cognee CLI Memory Commandstopoteretes/cognee · Apache-2.0

Quick start

  1. 1Install cognee with the CLI. Make sure the cognee Python package with the cognee-cli entry point is installed in your environment.
  2. 2Configure LLM_API_KEY. Set LLM_API_KEY with a key from your LLM provider account, since the commands call the LLM.
  3. 3Install the skill. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
  4. 4Ask in plain language. Describe the memory task, such as remembering a folder or asking a question, and the agent will pick the skill up.
  5. 5Review destructive commands. Before any forget or downgrade command runs, check the target and whether it prompts; forget --all does not prompt.
  6. 6Verify the result. Use recall or datasets list to confirm the data is where you expect.

What the cognee-cli skill makes the agent do

Agent skills are folders of instructions that an AI agent loads when a task matches them. This skill covers the cognee command line: adding memories with remember, asking questions with recall, deleting data with forget, improving the graph, managing datasets and config, and running database migrations.

The skill is documentation only. It does not add new code to your machine, but the commands it teaches do run against your cognee installation and use your LLM provider.

  • Remember: ingest text, file paths or URLs into a dataset and build the graph.
  • Recall: query the graph, optionally choosing a search type and result count.
  • Forget: delete data, including the dangerous forget --all.
  • Improve, datasets, config and migrations for maintenance.

Requirements before you install

The skill needs the cognee Python package with the cognee-cli entry point installed, and LLM_API_KEY configured with an account and key from an LLM provider. Without these, the commands will not work.

The skill does not run scripts, but it does use the network, because cognee calls an LLM.

  • cognee Python package with the cognee-cli entry point installed.
  • LLM_API_KEY configured (an LLM provider account and key).

Install the skill: ZIP download or Claude apps upload

Download the ZIP from this directory page and unzip it. For a personal install, place the skill folder in ~/.claude/skills/. For a single project, place it in the project's .claude/skills/ folder.

In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Per project: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

The skill loads when your request matches its description: wanting to drive cognee from the terminal, remember, recall, forget or improve memory, manage datasets and config, or run database migrations. You do not need to name the skill; describe the task in plain language.

  • Remember the notes in ./docs into a dataset called my_project.
  • Ask cognee what it knows about the onboarding process, using chunk-level search.
  • Show me the current migration revision for each database.
  • Set AUTO_FEEDBACK to false in cognee's config.

Core memory commands

remember ingests and builds the graph in one step. recall queries it. Without a dataset name, remember writes to the default dataset main_dataset.

  • remember accepts text, file paths or URLs; --background (-b) runs the graph build in the background and --dry-run estimates LLM tokens and cost without ingesting.
  • recall accepts --datasets (-d), --top-k (-k, default 10) and --session-id (-s). Without --query-type it uses HYBRID_COMPLETION.
cognee-cli remember "Your text here" cognee-cli remember ./docs --dataset-name my_project cognee-cli recall "Your question" cognee-cli recall "keyword" --query-type CHUNKS

Forget data safely and improve the graph

forget needs a target: --dataset, --dataset-id, --data-id (with a dataset), or --everything/--all. With --memory-only and a dataset, it drops the graph and vectors but keeps the raw files, so the data can be rebuilt.

Warning: forget --all does not ask for confirmation. It deletes every dataset immediately, even in a non-interactive shell. The older delete --all asked Delete ALL data from cognee? [y/N] first, so the safety prompt is gone when you switch to forget.

improve enriches the graph, and with -s it bridges session content into it. Session entries are written from the SDK, not the CLI, and session reads need CACHING=true, which is the default.

cognee-cli forget --dataset my_project --memory-only cognee-cli improve -d my_project -s chat_1

Manage config, datasets and migrations

config set writes to the .env file in the directory where you run the command. config get masks API keys unless you pass --show-secrets. Migrations run automatically at API server startup and on the first write, unless ENABLE_AUTO_MIGRATIONS=false. Use the migration commands to inspect state or roll back. There is no migrate command.

downgrade rewrites stored data, and it prompts unless you pass --force. The positional revision is a data-chain slug; use --alembic for the relational target. stamp sets the stored revision without running anything.

  • Inspect: current and history.
  • Apply: upgrade, optionally to a slug or --alembic <rev>.
  • Roll back: downgrade <slug|base>, which rewrites data.
  • Mark only: stamp <head|base|slug>, which runs nothing.
cognee-cli datasets list cognee-cli config get [key] [--show-secrets] cognee-cli current cognee-cli history cognee-cli upgrade

What people use it for

  • Ingesting a project's docs folder into a named dataset for later questions.
  • Asking chunk-level questions to find a specific passage in stored files.
  • Rebuilding a knowledge graph by forgetting with --memory-only and re-running remember.
  • Checking which migration revision each database is on before an upgrade.
  • Scripting ingestion jobs that run remember with --background.

Frequently asked questions

How do I install the cognee-cli agent skill?

Download the ZIP from the directory page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps you can also upload it under Settings → Capabilities → Skills.

What do I need before the cognee skill works?

You need the cognee Python package with the cognee-cli entry point installed, and LLM_API_KEY configured with a key from an LLM provider. The commands will not work without both.

Is the cognee-cli skill free?

The skill is listed under the Apache-2.0 licence. The source does not give pricing for LLM provider usage, which depends on your own provider account.

Does the skill run scripts on my machine?

No. The skill is documentation and does not run scripts, but it uses the network because cognee calls an LLM provider.

Is forget --all safe to run?

Not casually. forget --all deletes every dataset immediately with no confirmation prompt, so only use it when you intend to wipe everything.

How is the cognee CLI different from the SDK?

The CLI defaults to HYBRID_COMPLETION and a top-k of 10, while the SDK's recall() auto-routes search types and uses 15. Some search types, such as TEMPORAL, are only available in the SDK.

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

This skill suits developers who already use cognee and want an agent to run its CLI for ingestion, recall and maintenance. It is not a good fit for anyone without cognee installed and LLM_API_KEY set, or anyone who wants to run forget --all or downgrade casually.

Download the skill