5 min read

Cognee: Open-Source Long-Term Memory for AI Agents (GitHub, Scanned)

Give AI agents long-term memory by turning documents, code and chats into a knowledge graph.

Cognee logo
✅
Scan: safe. Nothing malicious. Know that product telemetry is on by default and tags events with a stable machine ID and a hash of your LLM API key; one environment variable turns it off. Scanned Oct 26, 2026; the full report is below.

Cognee is a memory layer for AI agents. You give it text, documents, code or conversations with remember, and it extracts entities and relationships into a knowledge graph alongside vector embeddings; recall retrieves the connected context for a question, and improve and forget refine or remove what it knows. Agents get facts that persist across sessions, and an application can see which evidence an answer came from.

It runs locally with no API key: a small GLiNER model extracts the graph and a local embedding model handles search, both on the CPU, while an LLM key adds generated answers and richer extraction. There are plugins that give Claude Code and Codex persistent memory, an MCP server for Cursor, Cline and other clients, a CLI (cognee-cli), a web UI, and storage backends from local files up to Neo4j.

It is Apache-2.0, with about 32,800 stars and 328 contributors, and the team has published a research paper on connecting knowledge graphs and LLMs. The project calls the local GLiNER extractor a demo of its small-model pipeline; for serious graphs you will want an LLM.

  • Repository: github.com/topoteretes/cognee
  • Licence: Apache-2.0 (Apache License 2.0)
  • Language: Python. Stars: 32.8K. Forks: 3,418. Last push: Oct 26, 2026.
  • Scan: safe, Oct 26, 2026, commit 37f788b

Who it is for

Developers building agents or chat apps that need to remember users and projects over time, and people who want their coding agent to keep context between sessions.

Getting started

1. Install with the local extraction model (Python 3.10 to 3.14)

uv pip install "cognee[gliner]"

2. Store something in memory

cognee-cli remember "Marie Curie was born in Warsaw." -d local_quickstart

3. Ask it back

cognee-cli recall "Where was Marie Curie born?" -d local_quickstart

Set LLM_API_KEY (OpenAI by default, other providers through its .env template) to get generated answers. Set TELEMETRY_DISABLED=1 if you do not want usage events sent; see the safety notes.

Safety scan

We cloned topoteretes/cognee at commit 37f788b on Oct 26, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.

  • No secrets and no committed binaries. The two very long lines in cognee/shared/utils.py are a base64-encoded PNG of the Cognee logo, used as a watermark on graph visualizations. The two bare-IP URLs are SSRF-protection tests.
  • Telemetry: cognee/shared/utils.py sends usage events to test.prometh.ai unless TELEMETRY_DISABLED is set. Each carries an anonymous ID, a persistent ID stored in ~/.cognee, and a salted hash of LLM_API_KEY that is the same on any machine using that key; dataset names are masked. The raw key and your content are not sent, but the switch is documented in the .env template rather than the README.
  • The pattern hits are the web UI showing users the official uv install command, not running it. deployment/setup_ubuntu_instance.sh is an optional cloud setup script that installs Docker with sudo.
  • 165 advisories, 16 critical. Most are in cognee-mcp/uv.lock (123, 11 critical, including Pillow, certifi and anyio) and the Next.js front end's package-lock.json (42, 5 critical). The core library's own uv.lock lists 8, none critical.
  • 63 workflows; the one on pull_request_target applies a core-team label and does not check out the pull request. 80 of 82 third-party actions are pinned; Dependabot, CodeQL, a security policy and a code of conduct are present; OpenSSF Scorecard 7.1 of 10.

What the scanner counted

CheckResult
SecretsNone found.
Suspicious code5 pattern hits found and read; every one is listed under the raw findings.
Install-time code1 installer script (one can call sudo)
Committed binariesNone.
CI workflows63 workflows. 1 uses pull_request_target, none check out the pull request head. 2 of 82 third-party actions pinned to a tag rather than a commit.
Network hosts40 distinct hosts referenced from source; most often github.com, hooks.slack.com, docs.cognee.ai, example.test. 2 URLs to a bare IP address, listed under the raw findings.
Known vulnerabilities165 advisories across 1,261 pinned packages: 16 critical, 80 high, 61 moderate, 8 low. cognee-frontend/package-lock.json: 994 packages, 42 advisories; cognee-mcp/uv.lock: 318 packages, 123 advisories; evals/old/hotpot_qa_24_2025/requirements.txt: 4 packages, 0 advisories; uv.lock: 5 packages, 8 advisories.
Project hygieneHas security policy, automated dependency updates, CodeQL, licence file, contributing guide.
OpenSSF Scorecard7.1 out of 10, as of Oct 20, 2026.

The raw findings

Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.

Pattern hits (5)
WhereRuleMatch
cognee-frontend/src/modules/integrations/connectorHelpers.tsx:37download-piped-to-shell{ label: "Install script", code: "curl -LsSf https://astral.sh/uv/install.sh | sh" },
cognee-frontend/src/utils/__tests__/osCommands.test.ts:22download-piped-to-shell (test/example)expect(installUv("mac")).toBe("curl -LsSf https://astral.sh/uv/install.sh | sh");
cognee-frontend/src/utils/osCommands.ts:28download-piped-to-shellreturn os === "windows" ? "irm https://astral.sh/uv/install.ps1 | iex" : "curl -LsSf https://astral.sh/uv/install.sh | sh";
cognee/shared/utils.py:673very-long-line4424 chars
cognee/shared/utils.py:681very-long-line45751 chars
URLs to bare IP addresses (2)
WhereRuleMatch
cognee/tests/unit/tasks/web_scraper/test_ssrf_protection.py:39ip-literal-urlawait validate_outbound_url("http://8.8.8.8/")
cognee/tests/unit/tasks/web_scraper/test_ssrf_protection.py:69ip-literal-urlawait validate_outbound_url("http://8.8.8.8/")
Installer scripts (1)
Worst known vulnerabilities (24 of 165)
AdvisorySeverityPackageSummary
GHSA-8r5x-fm3f-whwjcriticalhandlebars@4.7.9Handlebars: JavaScript Injection via AST Type Confusion in compile (bypass of CVE-2026-33937)
GHSA-p8wg-vrv2-v86fcriticalhandlebars@4.7.9Handlebars: JavaScript Injection via Own Property Check Bypass
GHSA-2464-fhr4-w9xwcriticalnext@16.3.4Next.js: Unauthenticated Remote Code Execution in Image Optimization API when SVG files are used
GHSA-673q-mjm6-r5xrcriticalnext@16.3.4Next.js: Unauthenticated Remote Code Execution in `use cache` functions returning typed arrays
GHSA-vcvr-r3jv-pc5jcriticalnext@16.3.4Next.js: Remote Code Execution in next/og ImageResponse
GHSA-82r6-8w77-94w6criticalanyio@4.14.1AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
GHSA-6q48-6c7w-9gw2criticalcertifi@2026.6.17certifi bundles emSign root CAs with compromised intermediate CA keys
GHSA-332p-7hrc-92wfcriticalpillow@12.3.0Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
GHSA-5x8w-8jj5-q52hcriticalpillow@12.3.0Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
GHSA-8g5g-8vmr-9782criticalpillow@12.3.0Pillow: Heap buffer overflow in ImagingJpegDecode
GHSA-v9pv-5gc8-w2m6criticalpillow@12.3.0Pillow multi-frame loaders can reuse stale native image storage after mode transitions
GHSA-w889-685w-c8fhcriticalpillow@12.3.0Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
GHSA-ffc3-869f-jxw9criticalpyjwt@2.13.0PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guar…
GHSA-4mvj-m6j5-pmf7criticalunstructured@0.18.32unstructured: Server-Side Request Forgery in the URL-based partitioning
GHSA-4mvj-m6j5-pmf7criticalunstructured@0.22.23unstructured: Server-Side Request Forgery in the URL-based partitioning
GHSA-hq85-5cpj-mr62criticaluv@0.11.28uv's bundled CA store trusts an emSign root whose intermediate CA keys are compromised
GHSA-2883-xcg3-v3hhhighjs-yaml@3.14.2js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
GHSA-52cp-r559-cp3mhighjs-yaml@3.14.2js-yaml: YAML merge-key chains can force quadratic CPU consumption
GHSA-5p4m-2wfm-xmqjhighjs-yaml@3.14.2JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) - CVE-2026-59870 fix not backported
GHSA-6j4f-fj2g-mc7phighbrace-expansion@2.1.4brace-expansion: DoS via uncontrolled recursion in parseCommaParts causing stack exhaustion
GHSA-qhr7-859c-m2p7highbrace-expansion@2.1.4brace-expansion: DoS via uncontrolled recursion on nested brace groups causing stack exhaustion
GHSA-23c5-xmqv-rm74highminimatch@9.0.5minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regular expressions
GHSA-3ppc-4f35-3m26highminimatch@9.0.5minimatch has a ReDoS via repeated wildcards with non-matching literal in pattern
GHSA-7r86-cg39-jmmjhighminimatch@9.0.5minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adjacent GLOBSTAR segments
Workflows worth a look

By the numbers

Stars32.8K
Forks3,418
Contributors328
Commits11.6K
Open issues744
Open pull requests312
Releases157
Latest releasev1.6.6rc1
LicenceApache-2.0
Main languagePython
Project age3 years
Last pushOct 26, 2026
Tracked files4,216
Lines of code683.9K
Checkout size105 MB

Lines by language: Python 512.7K, JSON 61.8K, TypeScript 50.8K, SQL 16K, YAML 15.5K, Markdown 13.7K.

Questions

Is Cognee free?

Yes. Cognee is free and open source under Apache-2.0, and runs locally with no API key. Cognee Cloud is a separate managed service for teams that would rather not host it.

Does Cognee need an OpenAI key?

No. Without a key it builds the graph with the local GLiNER model and a local embedding model, and returns matching passages rather than written answers. Adding an LLM key, OpenAI or another provider, gives generated answers and better extraction.

How do I give Claude Code memory with Cognee?

Add the integrations marketplace and install the plugin: claude plugin marketplace add topoteretes/cognee-integrations, then claude plugin install cognee-memory@cognee. The plugin's setup guide covers pointing it at local or remote memory.


This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.