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.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/instructions/topoteretes/cognee/agents-md)<a href="https://agentmods.dev/instructions/topoteretes/cognee/agents-md"><img src="https://agentmods.dev/badge/instructions/topoteretes/cognee/agents-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.
<a href="https://agentmods.dev/instructions/topoteretes/cognee/agents-md"><img src="https://agentmods.dev/badge/instructions/topoteretes/cognee/agents-md.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.02857 | $0.02857 |
| Opus 5.5 | $0.01143 | $0.01143 |
| Sonnet 5.5 | $0.00571 | $0.00571 |
| Haiku 4.5 | $0.00286 | $0.00286 |
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 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.
How it starts
The opening of the file, as written. The whole thing — 196 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.
Design Principles
- Don't overengineer: Simple beats complex.
- No fallbacks: One correct path, no alternatives.
- One way: One way to do things, not many.
- 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.
- No backups: Trust the primary mechanism.
- Separation of concerns: Each function has a single responsibility.
- Be concise but informative: No essays, but the docstrings and comments a reader needs.
- 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.
Project Structure & Module Organization
cognee/: Core Python library and API.api/: FastAPI application and versioned routers underapi/v1/— memory API (remember,recall,improve,forget), low-level operations (add,cognify,search,delete,update), and supporting routers (datasets,users,permissions,settings,sync,visualize,health,skills,sessions, …). Each router package has arouters/folder;api/client.pyregisters them.cli/: CLI entry points and subcommands invoked viacognee/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..agents/skills/: Task-specific agent skills. This is the only copy; add and edit skills here (Codex reads this folder directly)..claude/skills/: Symlink to../.agents/skillsso Claude Code finds the same skills. On Windows clones without symlink support, the SessionStart hook in.claude/settings.json(.claude/hooks/link-skills.sh) replaces it with a directory junction automatically; no manual step is needed. That hook marks the path skip-worktree, so on those clones only, a later change to the.claude/skillsentry itself makes git refuse to update it — rungit update-index --no-skip-worktree .claude/skills && git checkout -- .claude/skills, then start a new session.cognee/alembic/: Relational (Alembic) schema migrations;alembic.iniis incognee/. Graph/vector data migrations live incognee/modules/migrations/.
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.
- 7d ago Changed · +13 lines · +288 tokens per session 10637b64b1c6
- 21d ago Changed · -4 tokens per session acd3d1b57110
- 1mo ago Changed · +3 lines · +56 tokens per session 64296788a22f
- 1mo ago Changed · +11 lines · +356 tokens per session d79f2550ee0a
- 1mo ago Changed · +4 lines · +252 tokens per session 7987bd55f8e3
- 2mo ago First seen · 165 lines · 1,909 tokens per session scan A f944240f7850
cognee AGENTS.md is an instructions file published in the GitHub repository topoteretes/cognee (33,094 stars, last pushed today), licensed Apache-2.0. It adds 2,857 tokens to every session, about $0.0114 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.
cognee AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cognee AGENTS.mdtopoteretes/cognee | Instructions file | 33k | today | Apache-2.0 | A | 2,857 | Claude Code, Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |