Agent skill

Install and Run Cognee

by topoteretes in topoteretes/cognee

Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.

Apache-2.0Auto-check: notesAgent Workflows

Install Install and Run Cognee

skills CLI
$ npx skills add topoteretes/cognee --skill cognee-install -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install topoteretes/cognee cognee-install --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/cognee-install .claude/skills/cognee-install && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cognee-install
GitHub stars
32k
Token cost
~1k tokens
SKILL.md length
423 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK.

  • Installing cognee for the first time in a fresh virtual environment
  • SKILL.md covers Install, Configure, First run and Verify / troubleshoot
  • Calls uv; needs LLM_API_KEY
  • Choosing which cognee extras to install

What it does

This skill walks through setting up cognee, an open-source memory platform for agents, with its Python SDK. It needs Python 3.10 to 3.14 and prefers uv: create a virtual environment, then install cognee from PyPI, adding extras such as postgres, neo4j, docling, anthropic, ollama or aws only when they are needed.

The only required setting is an LLM API key in a .env file or the environment. Defaults need no services: SQLite for relational data, LanceDB for vectors and Ladybug for the graph, all stored locally, with OpenAI as the default LLM and embedding provider. Other providers and databases are left to the cognee-integrations skill.

The first-run script uses the async memory API of remember, recall, forget and improve. A single remember call ingests text, file paths, URLs or binary streams, recall picks a search strategy on its own, and passing a session_id switches to a fast session cache that the CACHING setting can turn off.

When your agent uses it

  • Installing cognee for the first time in a fresh virtual environment
  • Choosing which cognee extras to install
  • Getting a minimal remember and recall script working
  • Setting up session memory for a chat with a session_id

Example prompts

  • “Set up cognee in a new uv environment and run a minimal remember and recall example.”
  • “Which cognee extras do I need to use Neo4j and Ollama?”
  • “Store the notes in ./docs/decisions.md with cognee, then ask it what we chose for the database.”
  • “Why does remember with a session_id raise an error in my cognee script?”

Requirements

  • Python 3.10 to 3.14
  • An LLM API key set as LLM_API_KEY
  • uv, preferred for creating the virtual environment

What it can do on your machine

Read from SKILL.md and the folder at commit 0ec7a9f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LLM_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Install and Run Cognee loads about 1k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 423 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:26
    uired setting is an LLM API key. Create `.env` in the working

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from topoteretes/cognee at commit 0ec7a9f, republished under its Apache-2.0 licence (© topoteretes). 423 words, ~1,005 tokens.

Download SKILL.mdSave it as .claude/skills/cognee-install/SKILL.md (or your agent's skills folder).
name
cognee-install
description
Use 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.

Install and run cognee

Install

Requires Python 3.10–3.14. Prefer uv:

bash
uv venv && source .venv/bin/activate
uv pip install cognee            # from PyPI
# or, working inside this repo:
uv pip install -e .

Add extras only when needed — examples: cognee[postgres], cognee[neo4j], cognee[docling] (office/HTML document parsing, slim), cognee[docs] (unstructured), cognee[anthropic], cognee[ollama], cognee[aws]. The full list is in pyproject.toml under [project.optional-dependencies].

Configure

The only required setting is an LLM API key. Create .env in the working directory (or export the variable):

bash
LLM_API_KEY="your_openai_api_key"

Defaults need no services: SQLite (relational), LanceDB (vector), and Ladybug (graph), all stored locally. OpenAI is the default LLM and embedding provider — if you configure a different LLM but not embeddings (or vice versa), the other silently stays on OpenAI. For other providers and databases use the cognee-integrations skill.

First run

As of cognee 1.x the memory API — remember, recall, forget, improve — is the primary surface. All SDK functions are async. Minimal end-to-end script:

python
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())

remember() is the whole ingestion path in one call — it runs add() + cognify(), then improve() to index the graph (self_improvement=True by default). It accepts text, file paths, URLs, and binary streams, with an optional dataset_name="my_project"; pass datasets=["my_project"] to recall() to stay inside one dataset.

recall() auto-routes the query to a search strategy by default. Pass query_type=SearchType.CHUNKS (etc.) to pin one, or auto_route=False to fall back to GRAPH_COMPLETION.

Session memory is the other half of the API — remember(..., session_id="chat_1") writes to a fast session cache rather than running add+cognify inline, and recall(..., session_id="chat_1") reads it back (session hits short-circuit the graph search). With the default self_improvement=True it still bridges that data into the permanent graph in the background; improve(dataset=..., session_ids=[...]) does the same explicitly. Session memory runs on the session cache, which is on by default (CACHING=true); setting CACHING=false disables it entirely and makes remember(session_id=...) raise.

Show full SKILL.md (148 more words)Show less

Start with examples/advanced_guides/remember_recall_improve_example.py, which walks through permanent memory, session memory, and the sync between them.

The add() / cognify() / search() / memify() primitives still exist and are what remember/recall/improve call underneath — reach for them when you need to drive a stage in isolation (e.g. custom pipeline tasks), not for ordinary ingestion. cognee.delete is formally deprecated (since 0.3.9); forget() is the v1 replacement, unifying the old delete/empty_dataset paths behind one call. When to use recall() versus the low-level search() is covered in docs/recall-vs-search.md.

Verify / troubleshoot

  • cognee-cli remember "hello" && cognee-cli recall "hello" exercises the same flow from the shell.
  • To wipe local state during experiments: cognee-cli forget --all (or await cognee.forget(everything=True)).
  • Reads slow or spending tokens on every query → set AUTO_FEEDBACK=false (keep CACHING=true); by default cognee makes one structured-output LLM call per answered query to self-tune its memory.
  • Structured LLM output errors usually mean the model/provider needs an explicit instructor mode: LLM_INSTRUCTOR_MODE="json_schema_mode".

© topoteretes, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/cognee-install of topoteretes/cognee.

Open the folder on GitHubat commit 0ec7a9f

Compare with similar skills

Install and Run Cognee next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Install and Run Cognee compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Install and Run Cognee this skilltopoteretes/cognee32k—~1kAutomated safety check: NotesApache-2.0
Neo4j Genai Plugin Skillneo4j-contrib/neo4j-skills114—~3kAutomated safety check: NotesMIT
Neo4j Graphrag Skillneo4j-contrib/neo4j-skills114—~4.2kAutomated safety check: NotesMIT
Neo4j Agent Memory Skillneo4j-contrib/neo4j-skills114—~5.8kAutomated safety check: PassMIT
LanceDB Memory Configuration GuideCortexReach/memory-lancedb-pro-skill229—~14kAutomated safety check: PassNone
Cortexdb Memory Hermesliliang-cn/cortexdb274—~1.7kAutomated safety check: PassMIT

Similar skills

  • Neo4j Genai Plugin Skill

    neo4j-contrib/neo4j-skills

    Use Neo4j GenAI Plugin ai.text. An agent skill from neo4j-contrib/neo4j-skills.

    114 GitHub stars~3k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check: notes
  • Neo4j Graphrag Skill

    neo4j-contrib/neo4j-skills

    Build GraphRAG retrieval pipelines on Neo4j using the neo4j-graphrag Python package (v1.22.0+).

    114 GitHub stars~4.2k tokensUpdated 2 days ago
    Knowledge ManagementAuto-check: notes
  • Neo4j Agent Memory Skill

    neo4j-contrib/neo4j-skills

    Authoritative reference for the neo4j-agent-memory Python package — a graph-native memory system for AI agents built on Neo4j — and for the hosted service (NAMS) at memory.neo4jlabs.com.

    114 GitHub stars~5.8k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • LanceDB Memory Configuration Guide

    CortexReach/memory-lancedb-pro-skill

    Walks through installing and tuning memory-lancedb-pro, picking an embedding, reranker, and LLM combination from four preset configuration plans.

    229 GitHub stars~14k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Cortexdb Memory Hermes

    liliang-cn/cortexdb

    Give a Python agent (such as Hermes Agent by Nous Research) durable, local-first memory plus a queryable SPARQL knowledge graph, backed by CortexDB through its gRPC sidecar and the cortexdb-client…

    274 GitHub stars~1.7k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed
  • Ogham Maintain

    ogham-mcp/ogham-mcp

    Admin and maintenance workflows for Ogham shared memory. An agent skill from ogham-mcp/ogham-mcp.

    115 GitHub stars~1.1k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed

More from topoteretes/cognee

All 19 skills in this repo
  • Cognee CLI Memory Commands

    topoteretes/cognee

    Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.

    32k GitHub stars~2.2k tokensUpdated today
    Auto-check: notes
  • Cognee Community Packages

    topoteretes/cognee

    Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.

    32k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Cognee Custom Graph Models

    topoteretes/cognee

    Defines the shape of cognee's knowledge graph with graph_model: DataPoint node classes, identity and index fields, typed edges and fixes for duplicated nodes.

    32k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Cognee Custom Pipelines

    topoteretes/cognee

    Shows how to write custom cognee tasks, chain them into pipelines, store custom DataPoints and run enrichment over the existing graph.

    32k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Cognee Docker Setup

    topoteretes/cognee

    Runs the Cognee AI memory platform in Docker, from a one-file prebuilt image to a full compose stack with UI, MCP server, Postgres and Neo4j.

    32k GitHub stars~901 tokensUpdated today
    Auto-check: notes
  • Cognee Forget

    topoteretes/cognee

    Removes data from cognee memory with forget(), finding the right dataset and document first and choosing between one document, a dataset or only the graph and vector memory.

    32k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Install and Run Cognee

What does Install and Run Cognee do?

Installs the cognee AI memory library in a Python environment, sets the LLM key and gets a first remember and recall script running with the Python SDK. This skill walks through setting up cognee, an open-source memory platform for agents, with its Python SDK.14 and prefers uv: create a virtual environment, then install cognee from PyPI, adding extras such as postgres, neo4j, docling, anthropic, ollama or aws only when they are needed.

When should I use Install and Run Cognee?

Install and Run Cognee fits situations like: installing cognee for the first time in a fresh virtual environment; choosing which cognee extras to install; getting a minimal remember and recall script working; setting up session memory for a chat with a session_id.

How do I install Install and Run Cognee in Claude Code?

Run `npx skills add topoteretes/cognee --skill cognee-install -a claude-code`. Or copy the skill folder (.agents/skills/cognee-install in topoteretes/cognee) into .claude/skills/cognee-install in your project. Claude Code loads it when a task matches its description.

How do I install Install and Run Cognee in Codex?

Run `npx skills add topoteretes/cognee --skill cognee-install -a codex`. Or copy the skill folder (.agents/skills/cognee-install in topoteretes/cognee) into .agents/skills/cognee-install in your project. Codex loads it when a task matches its description.

Can I use Install and Run Cognee in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add topoteretes/cognee --skill cognee-install -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cognee-install, .gemini/skills/cognee-install, .github/skills/cognee-install and .opencode/skills/cognee-install in your project.

What does Install and Run Cognee need to run?

Going by SKILL.md and its folder, Install and Run Cognee needs the command-line tools its instructions call (uv) and credentials named LLM_API_KEY. Our summary lists: Python 3.10 to 3.14; An LLM API key set as LLM_API_KEY; uv, preferred for creating the virtual environment.

Does Install and Run Cognee access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Install and Run Cognee safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Install and Run Cognee use?

Install and Run Cognee is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Install and Run Cognee use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Install and Run Cognee?

Skills that share tags, products or a category with Install and Run Cognee: Neo4j Genai Plugin Skill (neo4j-contrib/neo4j-skills, 114 stars), Neo4j Graphrag Skill (neo4j-contrib/neo4j-skills, 114 stars), Neo4j Agent Memory Skill (neo4j-contrib/neo4j-skills, 114 stars) and LanceDB Memory Configuration Guide (CortexReach/memory-lancedb-pro-skill, 229 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Install and Run Cognee?

topoteretes (a GitHub organization) maintains it in topoteretes/cognee, which has 31,807 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.

Source: topoteretes/cognee on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.