cognee CLAUDE.md

cognee CLAUDE.md is an instructions file for Claude Code from topoteretes/cognee. It costs 12,237 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.

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 · 30,475 stars · on GitHub · cognee.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/topoteretes/cognee/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 12,237 This file is loaded in full into every session.
When invoked 12,237 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.12237 $0.12237
Opus 5 $0.06118 $0.06118
Sonnet 5 $0.02447 $0.02447
Haiku 4.5 $0.01224 $0.01224

Measured today against content hash 600dc28b023a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 today.

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 · 867 lines

How it starts

The opening of the file, as written. The whole thing — 867 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

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

Available Installation Extras

  • postgres / postgres-binary - PostgreSQL + PGVector support (also enables the Postgres session-cache backend, CACHE_BACKEND=postgres)
  • neo4j - Neo4j graph database support
  • neptune - AWS Neptune support
  • turso - Turso vector database support
  • docs - Document processing (unstructured library)
  • scraping - Web scraping (Tavily, BeautifulSoup, Playwright; Keenable needs no extra — it uses the built-in httpx)
  • langchain - LangChain integration
  • llama-index - LlamaIndex integration
  • anthropic - Anthropic Claude models
  • ollama - Ollama local models
  • mistral - Mistral AI models
  • groq - Groq API support
  • llama-cpp - Llama.cpp local inference
  • huggingface - HuggingFace transformers
  • aws - S3 storage backend
  • redis - Redis caching
  • graphiti - Graphiti-core integration
  • baml - BAML structured output
  • dlt - Data load tool (dlt) integration
  • docling - Docling document processing, slim profile without torch (office/HTML/email/markdown/LaTeX formats)
  • docling-full - Full docling install with torch-based ML models (adds PDF/image conversion through docling; conflicts with codegraph due to tree-sitter pins)
  • codegraph - Code graph extraction
  • evals - Evaluation tools
  • deepeval - DeepEval testing framework
  • posthog - PostHog analytics
  • tracing - OpenTelemetry tracing
  • dev - All development tools (pytest, ty, ruff, etc.)
  • debug - Debugpy for debugging

Read the full file on GitHub · 867 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. today Changed · +90 lines · +2,854 tokens per session 600dc28b023a
  2. 6d 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 (30,475 stars, last pushed yesterday), licensed Apache-2.0. It adds 12,237 tokens to every session, about $0.0612 per session on Opus 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.