What are NodeSets?

A NodeSet lets you group parts of your AI memory at the dataset level. You create them as a simple list of tags when adding data to Cognee: await cognee.add(…, node_set=[“projectA”,“finance”]) These tags travel with your data into the knowledge graph, where they become first-class nodes connected with belongs_to_set edges — and you can later filter searches to only those subsets.

How they flow through Cognee

  • Add:
    • NodeSets are attached as simple tags to datasets or documents
    • This happens when you first ingest data
  • Cognify:
    • carried into Documents and Chunks
    • materialized as real NodeSet nodes in the graph
    • connected with belongs_to_set edges
  • Search:
    • NodeSets act as entry points into the graph
    • Queries can be scoped to only nodes linked to specific NodeSets
    • This lets you search within a tagged subset of your data

Why they matter

  • Provide a lightweight way to organize and tag your data
  • Enable graph-based filtering, traversal, and reporting
  • Ideal for creating project-, domain-, or user-defined subsets of your knowledge graph