Guide · Agent skill
How to use the Cognee Memory Skill agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cognee agent skill is a set of instructions that teaches an AI agent how to use the Cognee Python library as a long-term memory layer. Once it is installed, the agent knows how to store text, files, URLs and repositories, build a knowledge graph from them, and answer questions later. This guide explains what the skill does, how to install it, how to trigger it, and what you need before it is useful.
Quick start
- 1Install the Cognee package. Install the cognee Python package in the environment your agent uses, and confirm Python can import it.
- 2Configure keys and databases. Add your LLM API key and configure the graph and vector databases as described in the Cognee configuration.
- 3Add the skill folder. Unzip the downloaded ZIP into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills.
- 4Ask for what you need. Describe the goal in plain words, such as turning a folder of documents into a searchable knowledge graph.
- 5Review the code the agent writes. Read the Python code before running it, especially any remember() calls that send files or URLs to external services.
- 6Query and refine. Ask questions with recall(), then use improve() or feedback to enrich the graph over time.
What the cognee skill makes the agent do
An agent skill is a folder with a skill.md playbook that an agent reads when a task matches the skill's description. The cognee skill is a playbook of Cognee API guidance. It does not store memory itself.
According to the skill, the agent can ingest text, files, URLs or repositories with remember(), build a knowledge graph from them, and answer questions later with recall(), which chooses a search strategy automatically. The skill also covers feedback loops, session memory, tagging with node_set, custom extraction models, and deleting data with forget().
- Store: remember() runs add() and cognify(), then improve() by default.
- Query: recall() routes the question to a search strategy and tags each result by source.
- Enrich: improve() extends an existing graph without re-ingesting.
- Delete: forget() removes stored data.
Install the cognee skill (ZIP or Claude app upload)
Download the ZIP from this page and unzip it. For a personal setup, place the folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.
You can also upload the skill in the Claude apps. Go to Settings, then Capabilities, then Skills, and upload the skill there.
- Personal: ~/.claude/skills/cognee/
- Project: .claude/skills/cognee/ inside your project folder
- Claude apps: Settings → Capabilities → Skills
Install the Cognee library the skill depends on
The skill only guides an agent that writes Cognee Python code. The memory work is done by the cognee package, which you must install and configure yourself. The skill requires Python with the cognee package installed.
You also need an LLM API key and configured graph and vector databases, as described in the Cognee configuration. A relational database is used for users and the dataset registry. The skill's alembic folder contains the migrations for it.
- Python with the cognee package installed
- An LLM API key
- Configured graph and vector databases
- A relational database for users and the dataset registry
- Optional: cognee[gliner] for LLM-free extraction
Trigger the skill with natural requests
You do not need to name the skill. The skill's description covers requests about Cognee, persistent agent memory, knowledge graphs, graph-based RAG, long-term or short-term memory for agents, and feedback loops. It also matches workflows such as turning documents into a knowledge graph or building memory from files.
Describe the goal in plain words. If you want a specific behaviour, such as a particular search type, say so.
- "Turn the documents in ./docs into a knowledge graph I can search."
- "Store this customer note so the agent remembers it next week."
- "Find what my notes say about the Q1 2024 changes."
- "Delete the data I stored for the research dataset."
Core pattern the agent follows
The skill tells the agent to start with the simplest working path: remember() to store and recall() to query. The agent writes async Python code, and it should keep work organised with dataset names.
The skill notes that recall() picks a search strategy automatically and does not call an LLM for that routing. Pin a strategy only when you need one.
- Use dataset_name and datasets to separate sources.
- Use node_set to tag data into memory buckets.
- Use session_id for short-term memory and conversation continuity.
- Use only_context=True to get retrieval context without an LLM completion.
import cognee
await cognee.remember("Your text, file path, URL, or list of inputs", dataset_name="main")
results = await cognee.recall("What are the key insights?", datasets=["main"])
for r in results:
print(r.source, r)Safety notes: scripts and network access
The skill is listed as running scripts and using the network. Ingested content is sent to the LLM and database services you configure, and remember() may send files and URLs onward. Review what you ingest, especially sensitive data, before running it.
Forget() deletes data, but according to the skill it does not touch the relational database that holds users and the dataset registry. Prune is a separate operation that also drops that database and should only be used for full test teardown.
- Do not ingest sensitive data without review.
- Check which LLM and database services your configuration points to.
- Treat prune_system(metadata=True) as a full reset for test environments only.
What people use it for
- Give a Python agent memory that persists across sessions.
- Turn internal documents and repositories into a searchable knowledge graph.
- Tag customer or project data with node_set and search only that subset.
- Explore graph-based RAG with Cognee as a data engineer.
- Remove stored data for a dataset with forget().
Frequently asked questions
What is the cognee agent skill?
It is an agent skill, a folder with a skill.md playbook, that teaches an agent how to write Python code using the Cognee library for long-term memory. The skill itself contains guidance only. The memory work is done by the Cognee library you install.
What do I need before the cognee skill is useful?
You need Python with the cognee package installed, an LLM API key, and configured graph and vector databases. A relational database is also needed for users and the dataset registry. The cognee[gliner] extra is optional for LLM-free extraction.
Where do I install the cognee skill?
Unzip the downloaded ZIP into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings, then Capabilities, then Skills.
Is the cognee skill free?
The skill is listed under the Apache-2.0 licence. Check the licence terms for the Cognee library and any LLM or database services you connect, since those are configured separately by you.
Does the skill send my data anywhere?
The skill runs scripts and uses the network. Ingested content is sent to the LLM and database services you configure, and remember() may send files and URLs onward. Avoid ingesting sensitive data without review.
Is this the same as a ready-made memory app?
No. The skill is for Python developers who want an agent to write Cognee code. Non-developers who want a finished app should look for a different tool.
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
Use the cognee skill if you are a Python developer or data engineer who wants an agent to build and query a Cognee knowledge graph for persistent memory. Pick something else if you want a ready-made app, do not use Cognee, or need to keep sensitive data out of external LLM and database services.
Download the skill