cognee
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 g…
Install / Use
npx skills add topoteretes/cognee --skill cogneeInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of cognee
cognee scores 99/100 on our quality scale, 19th of 606 Data & Analytics skills we index (top 4%).
Its SKILL.md is 21 KB long, well organised into 48 sections with 20 code examples: a thorough specification that gives an agent plenty to work with.
With 30,958 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so cognee is actively maintained.
- Our last check on 2026-11-14 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-28. Automated pattern scan on 2026-09-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
cognee compared with similar skills
All 4 of these similar skills score higher than cognee; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cognee (this skill)by topoteretes | 99 | 31.0k | 53d ago | SKILL.md |
| x402by browser-use | 100 | 121.0k | 3d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 55d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 149.0k | 6d ago | SKILL.md |
Frequently asked questions
- How do I install cognee?
- Run
npx skills add topoteretes/cognee --skill cognee. The install tabs above show the steps for each supported agent. - Which AI agents does cognee work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is cognee safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is cognee still maintained?
- The repository was last updated about 2 months ago, so cognee is actively maintained.
Skill content
View source on GitHubname: cognee 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".
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
DataPointtypes - 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
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:
- Start with the simplest working path unless the user explicitly asks for advanced configuration.
- Prefer the memory API:
remember(...)to store (ingest + graph build)recall(...)to queryimprove(...)to enrich or index an existing graph, and to bridge sessions into itforget(...)to delete
- Treat Cognee APIs as async.
- Use
dataset_name/datasetsto keep work organized when the user has multiple sources. - Use
node_setwhen the user wants lightweight tagging, project scoping, per-user memory buckets, or subgraph filtering. - Pass
query_type=SearchType.Xtorecall()only when the user needs a specific strategy; otherwise let it route. - Recommend advanced features only when they match the task:
session_idfor fast short-term memory and conversation continuitygraph_model=for schema-shaped extraction,DataPointtypes for direct insertionextractor="gliner_demo"for LLM-free graph extraction- custom pipelines for non-default task orchestration
- feedback loops for retrieval improvement
- visualization tools for graph inspection
When to drop to the low-level operations
add(), cognify(), search() and memify() still ship; the memory API calls them. Reach for
them only when remember/recall cannot express the job:
cognify(datasets=["a", "b"])ordatasets=Noneprocesses several datasets at once;remember()always targets exactly one dataset.- Rebuilding a graph over data already in the DB (after
forget(memory_only=True), or with a newgraph_model/ ontology) iscognify()only;remember()always runsadd()first. search()takes the agentic extras as first-class parameters (skills,tools,max_iter,code_query,node_type) and returns rawSearchResultobjects instead of tagged dicts.add()is a staging area: use it to ingest now andcognify()later.prune.prune_system(metadata=True)also drops the relational DB (users, ACLs, dataset registry);forget()never touches those. Use prune only for full test teardown.
memify() and improve() are the same enrichment pipeline; recommend improve().
cognee.delete() is deprecated in favour of forget(). Full comparison of the two query
functions: docs/recall-vs-search.md.
Common tasks
Store data
remember() accepts text, file paths, URLs, directories, git repository URLs, binary streams,
or lists of these.
await cognee.remember("notes.md", dataset_name="research")
await cognee.remember("https://example.com", dataset_name="research")
await cognee.remember(["paper.pdf", "summary.txt"], dataset_name="research")
Use node_set when the user wants data grouped into logical memory buckets.
await cognee.remember(
"Customer prefers concise weekly summaries and Slack delivery.",
dataset_name="customer_success",
node_set=["preferences", "customer_123", "weekly_reports"],
)
Useful options:
await cognee.remember(
"...",
dataset_name="research",
self_improvement=False, # skip the improve() stage (faster, no triplet index)
run_in_background=True, # return immediately; poll the pipeline status
chunk_size=1024,
custom_prompt="Extract companies, products, and partnerships.",
extractor="gliner_demo", # LLM-free extraction; needs cognee[gliner]
dry_run=True, # estimate LLM tokens/cost without ingesting
)
await cognee.remember("./my_repo", dataset_name="code") # code graph, no LLM
await cognee.remember("./skills", dataset_name="ops", content_type="skills") # SKILL.md playbooks
Query memory
from cognee import SearchType
results = await cognee.recall("What changed in Q1 2024?", datasets=["research"], top_k=10)
# Pin a strategy when the user needs one
results = await cognee.recall(
"What changed in Q1 2024?",
query_type=SearchType.TEMPORAL,
datasets=["research"],
)
# Answers with evidence, or validated into a Pydantic model
results = await cognee.recall("...", include_references=True)
results = await cognee.recall("...", response_model=MyAnswerModel)
# Retrieval context only, no LLM completion (pin query_type here)
context = await cognee.recall("...", query_type=SearchType.GRAPH_COMPLETION, only_context=True)
Scope retrieval with NodeSets
Use NodeSets when the user wants to search only a subset of memory such as one project, one customer, one user, or one workflow.
results = await cognee.recall(
"What are this customer's reporting preferences?",
datasets=["customer_success"],
node_name=["preferences", "customer_123"],
)
Enrich an existing graph
Use improve() when the user wants to improve or extend an already-built graph without
re-ingesting. Without session_ids it extracts and indexes triplet embeddings; with them it
also applies feedback weights, persists session Q&A, and distills session lessons into the graph.
await cognee.improve(dataset="research")
await cognee.improve(dataset="research", session_ids=["chat_1"])
await cognee.improve(dataset="research", build_global_context_index=True)
Delete data
forget() is the single deletion entry point.
await cognee.forget(data_id=data_id, dataset_id=dataset_id) # one document
await cognee.forget(dataset="research") # a dataset: raw data + graph + vectors
await cognee.forget(dataset="research", memory_only=True) # graph + vectors only, keep raw files
await cognee.forget(everything=True) # everything the current user owns
Update a document in place
await cognee.update(data_id=data_id, data="Updated content", dataset_id=dataset_id)
The document keeps its data_id; only the chunks the edit touched are re-extracted.
Create domain-specific structures
Pass a DataPoint-derived Pydantic model as graph_model and the LLM fills it instead of the
generic knowledge graph:
from cognee.infrastructure.engine import DataPoint
class Person(DataPoint):
name: str
role: str
metadata: dict = {"index_fields": ["name"], "identity_fields": ["name"]}
class Company(DataPoint):
name: str
employs: list[Person] = [] # a DataPoint field becomes an edge named after the field
metadata: dict = {"index_fields": ["name"], "identity_fields": ["name"]}
await cognee.remember("...", dataset_name="org", graph_model=Company)
Insert structured Python objects directly, bypassing text extraction:
from cognee.tasks.storage import add_data_points
await add_data_points([Person(name="Ada", role="Engineer")])
See examples/guides/custom_graph_model.py and examples/guides/custom_data_models.py.
Run custom pipelines
Use run_custom_pipeline(...) when the user needs explicit sequential task control.
from cognee.modules.pipelines.tasks.task import Task
async def my_task(data):
return data
await cognee.run_custom_pipeline(
tasks=[Task(my_task)],
data="input",
dataset="research",
)
DataPoints
A DataPoint is the atomic unit of knowledge in Cognee.
Use this concept whenever the user asks how Cognee represents structured data internally or how to insert graph objects directly.
Key ideas:
- A
DataPointis a Pydantic model that represents one meaningful unit of information. - When inserted, DataPoints become graph nodes; fields holding other DataPoints become edges.
metadata = {"index_fields": [...]}controls which fields are embedded for semantic search.metadata = {"identity_fields": [...]}makes the node id deterministic so repeated inserts merge instead of duplicating.
Use DataPoint when the user wants:
- schema-shaped memory
- exact control over graph structure
- programmatic relationship creation
- custom domain entities such as papers, customers, incidents, policies, products, or workflows
Prefer plain remember(...) for unstructured documents. Prefer graph_model= when the text
should be extracted into a schema. Prefer DataPoint models plus add_data_points(...) when the
user already has structured Python objects.
NodeSets
Use NodeSets when the user wants a lightweight way to tag, group, and scope memory.
A NodeSet starts as a list of tags passed through node_set=[...] to remember(...); after the
graph is built those tags are first-class graph nodes, and recall(node_name=[...]) restricts
retrieval to them.
Good NodeSet patterns
- per customer:
["customer_123"] - per workflow:
["support_bot", "refund_flow"] - per topic:
["contracts", "vendor_risk"] - per environment:
["prod", "staging"] - per user memory:
["user_42", "preferences"]
Example
await cognee.remember(
[
"Alice prefers terse answers and email follow-ups.",
"Alice escalates billing issues to finance first.",
"Bob prefers detailed technical explanations.",
],
dataset_name="agent_memory"
Truncated for display — read the full file on GitHub.
Related Skills
x402
121.0kSet up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
149.0kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
