SkillAgentSearch skills...

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 cognee

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

99/100

Supported Platforms

Universal

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.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
19/20
Freshness
15/15

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 found

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.

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.

SkillScoreStarsUpdatedFormat
cognee (this skill)by topoteretes9931.0k53d agoSKILL.md
x402by browser-use100121.0k3d agoSKILL.md
algorithmic-artby anthropics100177.9k55d agoSKILL.md
pptxby anthropics100177.9k55d agoSKILL.md
designby nextlevelbuilder100149.0k6d agoSKILL.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.

name: 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 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

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:

  1. Start with the simplest working path unless the user explicitly asks for advanced configuration.
  2. Prefer the memory API:
    • remember(...) to store (ingest + graph build)
    • recall(...) to query
    • improve(...) to enrich or index an existing graph, and to bridge sessions into it
    • forget(...) to delete
  3. Treat Cognee APIs as async.
  4. Use dataset_name / datasets to keep work organized when the user has multiple sources.
  5. Use node_set when the user wants lightweight tagging, project scoping, per-user memory buckets, or subgraph filtering.
  6. Pass query_type=SearchType.X to recall() only when the user needs a specific strategy; otherwise let it route.
  7. Recommend advanced features only when they match the task:
    • session_id for fast short-term memory and conversation continuity
    • graph_model= for schema-shaped extraction, DataPoint types for direct insertion
    • extractor="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"]) or datasets=None processes 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 new graph_model / ontology) is cognify() only; remember() always runs add() first.
  • search() takes the agentic extras as first-class parameters (skills, tools, max_iter, code_query, node_type) and returns raw SearchResult objects instead of tagged dicts.
  • add() is a staging area: use it to ingest now and cognify() 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 DataPoint is 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

View on GitHub
GitHub Stars31.0k
CategoryData
Updated1mo ago
Forks3.1k

Languages

Python

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions
cognee — Universal Skill: Install & Safety Check | SkillAgent