Cognee is an AI memory platform that stores information in a self-hosted knowledge graph so agents can retain context across sessions. It ingests data, connects related information, and helps agents retrieve it for reasoning and actions. The catalogue includes skills and instructions that extend agent workflows around Cognee.
Borrowing it
Nothing to install: this file belongs to topoteretes/cognee. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/topoteretes/cognee/main/.agents/skills/cognee-custom-graph-models/SKILL.mdgit clone --depth 1 https://github.com/topoteretes/cogneeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/topoteretes/cognee/cognee-custom-graph-models)<a href="https://agentmods.dev/skills/topoteretes/cognee/cognee-custom-graph-models"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-custom-graph-models/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/topoteretes/cognee/cognee-custom-graph-models"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-custom-graph-models.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.02404 |
| Opus 5.5 | $0.00030 | $0.00962 |
| Sonnet 5.5 | $0.00015 | $0.00481 |
| Haiku 4.5 | $0.00007 | $0.00240 |
Grade A, and why
cognee-custom-graph-models scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Custom graph models
By default cognee extracts a generic KnowledgeGraph of entities and
relationships. Pass your own model with graph_model= and the LLM fills
your node and edge types instead.
from typing import Annotated, Literal
import cognee
from cognee.low_level import DataPoint, Edge, FromIdentity
class Role(DataPoint):
name: str
metadata: dict = {"index_fields": ["name"], "identity_fields": ["name"]}
class Person(DataPoint):
name: str
is_a: Annotated[Role, FromIdentity()] | None = None # reference by name
reports_to: list[Edge["Person", "Person"]] = [] # edge owned by Person
metadata: dict = {"index_fields": ["name"], "identity_fields": ["name"]}
class PeopleGraph(DataPoint): # the root the LLM fills
people: list[Person]
friends_with: list[Edge[Person, Person]] = []
family: list[Edge[Person, Person, Literal["married_to", "sibling_of"]]] = []
metadata: dict = {"index_fields": [], "transparent": True}
await cognee.remember(text, graph_model=PeopleGraph, custom_prompt="Extract every person...")
Full example: examples/guides/custom_graph_model.py.
Use it
Nodes: DataPoint classes
Every node type subclasses DataPoint (from cognee.low_level import DataPoint). Its fields become:
- Node properties: scalars, strings, dicts, and anything that is not a DataPoint.
- Edges named after the field: a field holding a DataPoint or a list of
DataPoints.
members: list[Person]becomesmembersedges.
dict[str, Person], sets and plain tuples are stored as properties, not
edges.
Identity and search: metadata
| Key | What it does |
|---|---|
identity_fields |
The node id is derived from these field values (normalized: lowercased, spaces to _, apostrophes removed). The same entity from two chunks or two runs becomes one node. |
index_fields |
Each field gets a vector collection named <ClassName>_<field>, so recall can find the node. |
transparent |
The node is not stored; its children take its place. Use it for a root container like PeopleGraph. |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 21d ago Changed d0c7267f20d9
- 1mo ago First seen · 202 lines · 74 tokens per session scan A 42aa7c99300a
cognee-custom-graph-models is a skill published in the GitHub repository topoteretes/cognee (33,094 stars, last pushed today), licensed Apache-2.0. It adds 74 tokens to every session and 2,404 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-30.
cognee-custom-graph-models compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cognee-custom-graph-modelstopoteretes/cognee | Skill | 33k | today | Apache-2.0 | A | 74 | Claude Code, Codex |
| openmemoryCaviraOSS/OpenMemory | Skill | 4.6k | 19d ago | Apache-2.0 | A | 96 | Claude Code, Codex |
| yesmem-configcarsteneu/yesmem | Skill | 46 | 3d ago | Apache-2.0 | A | 82 | Claude Code, Codex |
| goodmem:helpPAIR-Systems-Inc/goodmem-claude-code-plugin | Skill | 9 | 2d ago | MIT | A | 46 | Claude Code |
| memseek-remembermemseekai/memseek | Skill | 11 | yesterday | Apache-2.0 | A | 24 | Claude Code |
| memseek-explainmemseekai/memseek | Skill | 11 | yesterday | Apache-2.0 | A | 25 | Claude Code |
| memseek-searchmemseekai/memseek | Skill | 11 | yesterday | Apache-2.0 | A | 22 | Claude Code |