cognee AGENTS.md

cognee AGENTS.md is an instructions file for Codex, OpenCode from topoteretes/cognee. It costs 1,909 tokens per session, scanned A, original, Apache-2.0.

Development instructions for the Cognee repository, including its folders, build and test commands, runtime settings, and backend support.

In plain words
What is it for?
Use it when navigating Cognee, running tests or checks, organizing new modules, or understanding its command-line tools, API, databases, and multi-user support.
Why use it?
It gives contributors one place to find the project's structure and working conventions before changing code.

Instructions file for CodexOpenCode

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/agents-md
Clone the repo
git clone --depth 1 https://github.com/topoteretes/cognee

Made for: Codex, OpenCode.

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 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/topoteretes/cognee/agents-md.svg)](https://agentmods.dev/instructions/topoteretes/cognee/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/topoteretes/cognee/agents-md"><img src="https://agentmods.dev/badge/instructions/topoteretes/cognee/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,909 This file is loaded in full into every session.
When invoked 1,909 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 $0.01909 $0.01909
Opus 5 $0.00955 $0.00955
Sonnet 5 $0.00382 $0.00382
Haiku 4.5 $0.00191 $0.00191

Measured 4d ago against content hash f944240f7850, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cognee AGENTS.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 4d 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.

AGENTS.md · 165 lines

How it starts

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

Repository Guidelines

This document summarizes how to work with the cognee repository: how it’s organized, how to build, test, lint, and contribute. It mirrors our actual tooling and CI while providing quick commands for local development.

Project Structure & Module Organization

  • cognee/: Core Python library and API.
    • api/: FastAPI application and versioned routers (add, cognify, memify, search, delete, users, datasets, responses, visualize, settings, sync, update, checks).
    • cli/: CLI entry points and subcommands invoked via cognee / cognee-cli.
    • infrastructure/: Databases, LLM providers, embeddings, loaders, and storage adapters.
    • modules/: Domain logic (graph, retrieval, ontology, users, processing, observability, etc.).
    • tasks/: Reusable tasks (e.g., code graph, web scraping, storage). Extend with new tasks here.
    • eval_framework/: Evaluation utilities and adapters.
    • shared/: Cross-cutting helpers (logging, settings, utils).
    • tests/: Unit, integration, CLI, and end-to-end tests organized by feature.
    • __main__.py: Entrypoint to route to CLI.
  • cognee-mcp/: Model Context Protocol server exposing cognee as MCP tools (SSE/HTTP/stdio). Contains its own README and Dockerfile.
  • cognee-frontend/: Next.js UI for local development and demos.
  • distributed/deploy/: One-click deployment templates (Modal, Fly.io, Railway, Render, Daytona).
  • examples/: Example scripts demonstrating the public APIs and features (graph, code graph, multimodal, permissions, etc.).
  • notebooks/: Jupyter notebooks for demos and tutorials.
  • alembic/: Database migrations for relational backends.

Notes:

  • Co-locate feature-specific helpers under their respective package (modules/, infrastructure/, or tasks/).
  • Extend the system by adding new tasks, loaders, or retrievers rather than modifying core pipeline mechanisms.

Build, Test, and Development Commands

Python (root) – requires Python >= 3.10 and < 3.14. We recommend uv for speed and reproducibility.

Read the full file on GitHub · 165 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. 4d ago First seen · 165 lines · 1,909 tokens per session scan A f944240f7850

Subscribe to this mod's changes

cognee AGENTS.md is an instructions file published in the GitHub repository topoteretes/cognee (30,435 stars, last pushed today), licensed Apache-2.0. It adds 1,909 tokens to every session, about $0.0095 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.