# Cognee Memory

Builds persistent agent memory and knowledge graphs with graph-based retrieval.

- Repository: https://github.com/topoteretes/cognee (32985 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add topoteretes/cognee --skill cognee -g -a claude-code -y`
Codex: `npx skills add topoteretes/cognee --skill cognee -g -a codex -y`
Cursor: `npx skills add topoteretes/cognee --skill cognee -g -a cursor -y`
Gemini CLI: `npx skills add topoteretes/cognee --skill cognee -g -a gemini-cli -y`

## Description

Use this skill whenever the user asks about Cognee, AI memory, persistent agent memory, self-improving agents, agents learning from feedback, knowledge graphs, graph-based RAG, long-term memory for agents, short-term memory for agents, personalization, personas, temporal search, temporal knowledge graphs, ontology-based extraction, ontology grounding, feedback, Cypher search, natural-language graph search, chunk search, RAG search, cross-session memory, session feedback, feedback loops, session based memory, redis based memory, knowledge promotion. Also use when the user describes the workflow such as: "turn documents into a knowledge graph", "build memory from files", "search my graph", "extract entities and relations", "sync data into a graph", "update graph memory", "store memories for an agent", "help my agent learn over time", "visualize a knowledge graph built from documents", "let the agent learn", "adaptive agents", "personalized agents", "session based personalization", "find important ontologies", "find custom pydantic models", "isolate agentic behaviour", "add permission control to retrieval", "reduce context bloating".

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Cognee

Use this skill for **Cognee-specific Python API help** and for mapping user goals to the right
Cognee workflow.

## When to apply this skill

Apply this skill whenever the user wants to do any of the following with Cognee:

- ingest text, files, URLs, repos, or datasets
- build or rebuild a knowledge graph
- search documents, chunks, summaries, triplets, or graph context
- choose a `SearchType`
- enrich an existing graph with `improve`
- define custom graph extraction models or `DataPoint` types
- run custom task pipelines
- configure LLM, graph DB, vector DB, or storage settings
- tag and scope memory with `node_set` / NodeSets
- build persistent memory for agents across sessions
- create feedback loops or self-improving agent workflows
- work with temporal extraction, ontologies, Cypher, or natural-language graph queries
- manage datasets, sessions, feedback, deletion, updates, or visualization

If the user's intent is "store information in memory and query it later", prefer Cognee's
memory API: **remember -> recall** (plus **improve** to enrich and **forget** to delete).

## Core workflow

```python
import cognee

# Store: ingest + build the graph (+ improve, because self_improvement=True by default)
await cognee.remember(
    "Your text, file path, URL, or list of inputs",
    dataset_name="main",
)

# Query: recall picks a search strategy automatically (rule-based, no LLM call)
results = await cognee.recall("What are the key insights?", datasets=["main"])
for r in results:
    print(r.source, r)  # each result is tagged "graph" / "session" / ...
```

`remember()` runs `add()` + `cognify()` and then `improve()` underneath. `recall()` wraps
`search()` and adds routing, session memory as a source, and `source`-tagged results.

## Default guidance

When helping with Cognee:

The rest: https://github.com/topoteretes/cognee/blob/HEAD/cognee/SKILL.md
