Guide · Agent skill
How to install and run the cognee agent skill (cognee-install)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cognee-install skill teaches an AI agent how to set up cognee, an open-source memory library for Python, and run a first working example. After following this guide you will know how to install the skill, ask your agent for a fresh cognee setup, and run a short script that stores text as memory and then queries it.
Quick start
- 1Download and place the skill. Download the ZIP from this page, unzip it, and place the cognee-install folder in ~/.claude/skills/ or in your project's .claude/skills/ folder. In the Claude apps you can upload it under Settings, Capabilities, Skills.
- 2Create a virtual environment. Use uv to create a .venv and activate it. Python 3.10 to 3.14 is required.
- 3Install cognee. Run uv pip install cognee, or uv pip install -e . inside the cognee repository. Add extras such as postgres or neo4j only if you need them.
- 4Set your LLM API key. Create a .env file in your working directory with LLM_API_KEY set to your key. The default provider is OpenAI.
- 5Run the minimal script. Save the remember and recall example in a Python file and run it. It stores one sentence as memory and then queries it.
- 6Check from the shell. Run cognee-cli remember and cognee-cli recall with the same text to confirm the flow works from the command line.
What is an agent skill and what does cognee-install do?
An agent skill is a folder containing a SKILL.md file with instructions that an AI agent loads when your request matches the skill's description. This one is named cognee-install and its description says it applies when you want to install cognee and run your first remember to recall flow with the Python SDK.
Once loaded, the agent can guide a fresh setup in a virtual environment, choose optional extras, configure an LLM API key, run a minimal script, and help troubleshoot common errors. It also explains the difference between permanent memory, session memory, and the lower-level search functions.
How do you install the cognee-install skill?
Download the ZIP for this skill 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. In the Claude apps you can instead upload the skill under Settings, then Capabilities, then Skills.
- Personal: ~/.claude/skills/cognee-install/
- Project only: .claude/skills/cognee-install/ inside your project
- Claude apps: Settings, Capabilities, Skills, then upload
~/.claude/skills/cognee-install/SKILL.mdHow do you trigger the skill with a natural request?
You do not need to type a command. Describe what you want in plain language and the agent will match it to the skill. Requests that mention installing cognee, a virtual environment, extras, or a first remember and recall example fit well.
Examples of requests that should trigger it: 'Set up cognee in a fresh virtual env for my project', 'Which cognee extras do I need for Postgres?', or 'Give me a minimal cognee example that stores a note and queries it.'
How do you install cognee, configure it and run the first example?
The skill recommends uv. Requires Python 3.10 to 3.14. Create a virtual environment and install cognee from PyPI. If you are working inside the cognee repository, install it in editable mode instead.
The only required setting is an LLM API key. Put it in a .env file in your working directory or export it as an environment variable. The default LLM and embedding provider is OpenAI. Defaults use SQLite, LanceDB and Ladybug, all stored locally, so no database servers are needed.
The memory API has four main functions: remember, recall, forget and improve. All SDK functions are async. Remember stores text, file paths, URLs or binary streams, and recall queries them.
- Extras are optional and added only when needed, for example cognee[postgres], cognee[neo4j], cognee[docling], cognee[anthropic], cognee[ollama] or cognee[aws].
- The full list of extras is in pyproject.toml under [project.optional-dependencies].
uv venv && source .venv/bin/activate
uv pip install cognee
# or, inside the cognee repo:
uv pip install -e .
# .env
LLM_API_KEY="your_openai_api_key"
# minimal script
import asyncio
import cognee
async def main():
await cognee.remember("Cognee turns documents into AI memory.")
results = await cognee.recall("What does cognee do?")
print(results)
asyncio.run(main())How do you check the install and clean up test data?
To run the same remember and recall flow from the shell, use the cognee-cli command. During experiments you can wipe local state with the forget command.
If reads are slow or each query costs tokens, the skill suggests setting AUTO_FEEDBACK=false while keeping CACHING=true. By default cognee makes one structured-output LLM call per answered query to tune its memory. If you see structured LLM output errors, the skill suggests setting LLM_INSTRUCTOR_MODE to json_schema_mode.
- Shell check: cognee-cli remember "hello" && cognee-cli recall "hello"
- Wipe local state: cognee-cli forget --all
- Slow queries: AUTO_FEEDBACK=false with CACHING=true
- Structured output errors: LLM_INSTRUCTOR_MODE="json_schema_mode"
cognee-cli remember "hello" && cognee-cli recall "hello"
cognee-cli forget --allWhat should you be careful about with this skill?
The skill runs scripts and uses the network. The example calls your LLM provider using the API key you configure, so review the code before running it and keep the key in a .env file rather than in shared code. The skill only covers a local first run and does not address security hardening or scaling, so treat it as a starting point for development, not a production setup.
Session memory uses a cache that is on by default. Setting CACHING=false disables it, and remember with a session_id will then raise an error.
- Scripts run and network calls go to your LLM provider.
- Keep LLM_API_KEY out of source control.
- Not covered: production security, scaling, or non-OpenAI providers, which the separate cognee-integrations skill handles.
What people use it for
- Starting a new Python project that needs AI memory built from documents or text
- Setting up cognee locally for the first time with the default SQLite, LanceDB and Ladybug storage
- Getting a quick working remember and recall example before connecting external databases like Postgres or Neo4j
- Learning when to use permanent memory, session memory, or the lower-level search function
Frequently asked questions
How do I install cognee for Python?
Create a virtual environment with uv, activate it, and run uv pip install cognee. Python 3.10 to 3.14 is required. The agent skill walks you through these steps for a fresh setup.
Is cognee free to use?
cognee is published under the Apache-2.0 licence. The default setup still requires an LLM API key, such as OpenAI, and each answered query makes an LLM call by default, which uses that key.
What do I need to run cognee-install?
You need Python 3.10 to 3.14, uv as the recommended installer, and an LLM API key set as LLM_API_KEY. Optional extras such as postgres, neo4j or ollama are added only if your setup needs them.
Does cognee work without an OpenAI key?
The skill's default configuration uses OpenAI for the LLM and embeddings. For other providers the skill points you to the separate cognee-integrations skill, so check that for non-OpenAI setups.
Why does my cognee structured output fail with an error?
The skill says structured LLM output errors usually mean the model or provider needs an explicit instructor mode. Set LLM_INSTRUCTOR_MODE to json_schema_mode and try again.
How is cognee different from a plain vector database?
The skill describes cognee as a memory library that turns documents into memory and builds a graph as well as searchable data. It offers remember, recall, forget and improve functions, plus session memory, so it is more than a simple store of vectors.
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 Python developers who are starting a project that needs AI memory from text or documents and want a local, working example quickly. It is not a fit if you do not write Python, do not have an LLM API key, need non-Python or non-OpenAI integrations, or are preparing a production deployment.
Download the skill