Self-hosted service
topoteretes/cognee avatar
topoteretes/cognee

Cognee builds and queries its graph on local CPU models when no API key is set

Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.

33,296 stars3,512 forksPythonApache-2.0

At a glance

What is it?
Cognee is a Python memory platform for agents that turns documents, code, and conversations into a knowledge graph. Its distinguishing feature is a local path that builds and queries that graph with small CPU models and no LLM key at all, with the LLM-dependent stages skipping themselves.
Who is it for?
Cognee suits a team that wants agent memory they host themselves and can evaluate without paying for model calls, since the local path covers text ingestion, retrieval, and session storage before any LLM is involved. Verify the Python version first, because the declared range is narrow.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • topoteretes/cognee33,296 ★ · +3,787
Star history
Repository2026-07-282026-11-13
topoteretes/cognee29.5k33.3k

3,787 Stars in the last 108 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The no-LLM path exists, and it is the documented default entry point

The most useful thing to know about this project is that the headline capability works without a model provider. With no LLM key configured, Cognee extracts the graph using a local GLiNER model and embeds the text with a local embedding model, and both download on first use. The quickstart is a short script with two calls: one that remembers a piece of text under a named dataset, and one that recalls against it. The stated boundary is precise. Text ingestion, retrieval, and session storage all work without an LLM, and the LLM-dependent improvement stages skip automatically. What you do not get without a key is generated answers and media processing that needs a vision or transcription model. So retrieval returns source passages rather than a written reply.

Install is one command, and the gliner extra is what pulls the local model

The quickstart states a requirement of Python 3.10 to 3.14, and the packaging metadata gives the same range as a floor of 3.10 and a ceiling below 3.15. Installation is done with pip, uv, or another package manager, and the documented form is a single line that installs the package with an extra named gliner:

bash
uv pip install "cognee[gliner]"

That extra is not cosmetic: it brings the local extraction model used when no LLM key is configured. Installing the base package instead still works, but then the bundled demo is the only path that needs no models, and building a graph from your own text requires the extra. The base install is what the demo command expects, so the two routes have genuinely different requirements. The same workflow the quickstart shows in Python is also on the command line, through a remember command that takes a dataset flag and a recall command that queries by dataset.

A demo command loads prebuilt data so you can look before you download models

There is a way to see the shape of the output before committing to a model download. The command is cognee-cli demo, and the stated purpose is exploring a prebuilt graph without downloading extraction or embedding models. It works with the base pip install cognee package, loads bundled sample data, and runs keyword search without an API key. This is deliberately narrower than the quickstart: keyword search against a fixed dataset, rather than building a graph from text you supply. A table in the README routes readers to it explicitly, with the entry for exploring a prebuilt graph pointing here.

Setting a key switches generated answers on and provider calls with them

Adding an LLM is described as optional and changes what the system does rather than merely how well it does. The configuration is a single environment variable holding an API key, and the README states that once a key is set, Cognee uses OpenAI for language models and embeddings, and processing and generated answers make provider calls to that provider. That last clause is the cost implication: without a key there are no provider calls, and with one there are, at the stage that previously skipped itself. A .env file is the alternative to setting the variable in code, and the repository ships both a .env.template, which is called the canonical template, and a .env.example, which is marked deprecated and kept only for backwards compatibility with older setup instructions.

The container ships a permissive CORS default and blank database credentials

The docker-compose.yml documents its own defaults in comments, and two of them are the kind a reader should see before deploying rather than after. The CORS setting carries an explicit caution that the default of an asterisk allows all origins and should be overridden with specific domains in production. Database configuration defaults to embedded SQLite, with host, port, name, username, and password all set from environment variables whose defaults are a local host address, port 5432, and the name cognee_db, while username and password default to empty. The comment explains that the default user password is a well-known development value because the stack is local. Persistence is handled by named volumes rather than the bind mount, which the comment marks as being for development reload only.

Pinned and excluded dependency ranges carry their reasons in comments

The pyproject.toml is unusually candid about why its version constraints look the way they do. The pydantic-settings requirement excludes four version patterns (2.12.*, 2.13.*, 2.14.0 and 2.14.1) rather than capping below them, and the comment explains that this is done so the patched release is adopted automatically once it clears an exclude-newer window, since at the time of writing it was under two days old. The same file records that a feature first shipped in pydantic-settings 2.7.0 (NoDecode). A comment on the filelock dependency names its purpose as a cross-process migration lock for SQLite across Linux, macOS, and Windows. Two version ranges required by transformers 4.x are pinned in core, according to the comment, because gliner2 needs transformers below 5 and the GLiNER runtime is installed at first use.

What goes in is turned into entities, relationships, and chunks

The mechanism is described by source type. Text becomes entities, relationships, and searchable chunks. Code becomes a graph of symbols and dependencies, which is a different shape from the text path rather than the same pipeline applied to a different extension. Session distillation is the third piece, and it curates accepted lessons into permanent memory, which is how a session lesson becomes something a later session can retrieve. The intended uses follow from that structure. One is bringing documentation, conversations, tickets, code, and agent work into shared memory so a decision can be connected to the discussion and implementation behind it. Another is grounding agents in a domain with custom data models and ontologies. The README points to a research paper on optimizing the interface between knowledge graphs and large language models for complex reasoning as background.

Editorial conclusion

Cognee suits a team that wants agent memory they host themselves and can evaluate without paying for model calls, since the local path covers text ingestion, retrieval, and session storage before any LLM is involved. Verify the Python version first, because the declared range is narrow. If you deploy the container, read the compose defaults rather than accepting them, since the shipped CORS setting allows all origins and the database credentials are blank. And confirm whether the extraction quality you get from the bundled small model is enough, because the project calls it a demo and points production users elsewhere.

Frequently asked questions

What is cognee?

Cognee is a free open-source AI memory platform, Apache-2.0 licensed and written in Python, that gives agents persistent long-term memory across sessions by turning documents, code, and conversations into a self-hosted knowledge graph.

How do I install cognee?

Use uv pip install "cognee[gliner]", or pip or another package manager with the same extra. Python 3.10 to 3.14 is required, and the gliner extra brings the local extraction model used when no LLM key is set.

How do I use cognee without an API key?

With no key configured, Cognee extracts the graph with the local GLiNER model and embeds with a local embedding model, both downloading on first use. Ingestion, retrieval, and session storage work, and LLM-dependent stages skip automatically.

How much does Cognee cost per month?

Cognee is free and open source and runs locally without an API key, relying on free small models that use your CPU. Generated answers and vision or transcription processing require additional LLM configuration and make provider calls.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/topoteretes-cognee.svg)](https://hysenlabs.com/projects/topoteretes-cognee)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/topoteretes-cognee.svg)](https://hysenlabs.com/projects/topoteretes-cognee)

Was this useful?