cognee: Instructions file for Claude Code

CLAUDE.md

cognee CLAUDE.md is an instructions file for Claude Code from topoteretes/cognee. It costs 27,953 tokens per session, scanned A, original, Apache-2.0.

Development instructions for the Cognee project, an open-source AI memory platform that turns data into searchable knowledge using graphs, vectors, and language models.

In plain words
What is it for?
Use it to create a development environment, install Cognee and its extras, run project checks, configure integrations, or understand the repository before contributing.
Why use it?
It explains how to set up the project, install optional integrations, and follow its expected development workflow.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is topoteretes/cognee's own configuration. It tells Claude Code how to work on cognee itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cognee configures →

About the project

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.

topoteretes/cognee · 33,094 stars · on GitHub · cognee.ai

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/topoteretes/cognee/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/topoteretes/cognee

Made for: Claude Code.

Wrote 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.

agentmods badge for cognee CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/topoteretes/cognee/claude-md/github.svg)](https://agentmods.dev/instructions/topoteretes/cognee/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/topoteretes/cognee/claude-md"><img src="https://agentmods.dev/badge/instructions/topoteretes/cognee/claude-md/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.

agentmods 80×15 button for cognee CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/topoteretes/cognee/claude-md"><img src="https://agentmods.dev/badge/instructions/topoteretes/cognee/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27,953 This file is loaded in full into every session.
When invoked 27,953 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.27953 $0.27953
Opus 5.5 $0.11181 $0.11181
Sonnet 5.5 $0.05591 $0.05591
Haiku 4.5 $0.02795 $0.02795

Measured 7d ago against content hash 3784470bcf7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cognee CLAUDE.md 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 7d 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.

CLAUDE.md · 1,016 lines

How it starts

The opening of the file, as written. The whole thing — 1,016 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Cognee is an open-source AI memory platform that transforms raw data into persistent knowledge graphs for AI agents. It replaces traditional RAG (Retrieval-Augmented Generation) with an ECL (Extract, Cognify, Load) pipeline combining vector search, graph databases, and LLM-powered entity extraction.

Requirements: Python 3.10 - 3.14

Design Principles

  1. Don't overengineer: Simple beats complex.
  2. No fallbacks: One correct path, no alternatives.
  3. One way: One way to do things, not many.
  4. Throw errors: Fail fast when the operation's preconditions aren't met. Observability (telemetry, logging) is best-effort and never changes the outcome of the operation.
  5. No backups: Trust the primary mechanism.
  6. Separation of concerns: Each function has a single responsibility.
  7. Be concise but informative: No essays, but the docstrings and comments a reader needs.
  8. No invented limits: Never add a cutoff (max_n, [:k], "older than X") or an expiry (TTL, cooldown, eviction) the task did not ask for — both are silent data loss. If you believe one is unavoidable, stop and ask, stating what would be dropped and why; never add it first and justify it afterwards. Existing bounds (lock leases, recovery floors, batch caps) are deliberate: removing or changing one is the same question.

Methodology: surgical changes only; evidence-based debugging (minimal, targeted logging); fix root causes, not symptoms. Debug like a detective: form the theory of the crime, collect evidence, and change code only once the evidence proves it.

Development Commands

Setup

# Create virtual environment (recommended: uv)
uv venv && source .venv/bin/activate

# Install with pip or uv
uv pip install -e .

# Install with dev dependencies
uv pip install -e ".[dev]"

# Install with specific extras
uv pip install -e ".[postgres,neo4j,docs]"

# Set up pre-commit hooks
pre-commit install

Read the full file on GitHub · 1,016 lines

Changes

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.

  1. 7d ago Changed · +38 lines · +6,096 tokens per session 3784470bcf7a
  2. 21d ago Changed · -5 lines · +2,151 tokens per session a7f1d031343e
  3. 1mo ago Changed · +37 lines · +1,874 tokens per session e75557c2eafe
  4. 1mo ago Changed · +1 lines · +987 tokens per session 2051ff7f8f5d
  5. 1mo ago Changed · +595 tokens per session 84cafca3907f
  6. 1mo ago Changed · +78 lines · +4,013 tokens per session 637f308f37ab
  7. 2mo ago Changed · +90 lines · +2,854 tokens per session 600dc28b023a
  8. 2mo ago First seen · 777 lines · 9,383 tokens per session scan A 3a90523478a8

Subscribe to this mod's changes

cognee CLAUDE.md is an instructions file published in the GitHub repository topoteretes/cognee (33,094 stars, last pushed today), licensed Apache-2.0. It adds 27,953 tokens to every session, about $0.1118 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-08-30.

Related

cognee CLAUDE.md compared with instructions from other repositories

cognee CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cognee CLAUDE.mdtopoteretes/cogneeInstructions file33ktodayApache-2.0A27,953Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode