# Case study: Cognee

How an open-source memory platform ships Enola and turns its graph into answers for agents.

> Web page: https://enola.tech/docs/cognee
> All pages: https://enola.tech/llms.txt

## A memory platform with Enola inside

[Cognee](https://github.com/topoteretes/cognee) is an open-source memory platform for AI agents. Text becomes entities and relationships; code becomes a graph of symbols and dependencies. Enola builds the code part.

| Question | Cognee's answer |
| --- | --- |
| How is Enola installed? | `enola-cli` is a core dependency, pinned to one release |
| How is it run? | As a subprocess, `enola --generate` |
| What is read? | The documented snapshot files |
| Where does the graph live? | In Cognee's own graph database |
| What answers questions? | `SearchType.CODE`, with no language model |

Cognee's own documentation is the source of truth for its behaviour.

## Arrive with the package, stay quiet

Installing Cognee installs the Enola binary, so nothing is downloaded at run time. Cognee looks for it in `ENOLA_PATH`, then in the Python environment's scripts directory, then on `PATH`. The middle step makes it work in containers and services that run the interpreter by path.

Index a repository:

```python
await cognee.remember("/path/to/repo", content_type="code")
```

The path can also be a GitHub or GitLab URL. Cognee runs Enola with `ENOLA_NO_UPDATE_CHECK=1` and `ENOLA_NO_PROMPTS=1`, with the repository as the working directory, so a config from elsewhere cannot change the run.

## Trust the receipt before the graph

| File | What Cognee does with it |
| --- | --- |
| `receipt.json` | Rejects an unknown `format_version`, reports parse errors and skipped files, and skips the load when `snapshot_id` is unchanged |
| `facts.jsonl` | Becomes nodes and edges. A node stands for a repository, kind and name, and keeps the id of the first fact that maps to it |
| `insights.json` | Becomes finding nodes, linked to their evidence |
| `flows.json` | Becomes flow nodes, only when the receipt vouches for the file |

When something changed, Cognee compares a hash of each fact and writes only the ones whose content differs.

## One dataset, one linked graph

Repositories in one Cognee dataset are indexed in a single Enola run, so a client call in one links to the route that serves it in another. Cognee renders the cluster config from the dataset and passes it on standard input, and gives each dataset its own output directory. Repositories in different datasets are never linked.

## Answer without a model

Cognee queries the stored graph itself: facts, traversal, paths, impact, flows, findings, and text search over names, docstrings and paths. An agent gets file and line citations from the graph. Docstrings can also be indexed as text and linked to their symbols, so a search in words reaches the code.

## What to copy

1. **Pin one release** and upgrade on purpose.
2. **Ship the binary with your package** instead of fetching it.
3. **Read only the contract files**, and fail loudly on a format you do not know.
4. **Use `snapshot_id`** to skip work.
5. **Show the quality block** to whoever relies on the graph.
6. **Index related repositories together.**

The same steps, for your own tool, are in [Consume a snapshot](https://enola.tech/docs/snapshot-files.md).

## You already have Enola

The binary Cognee installed is a complete Enola. Register it with your coding agent by its full path, so it works outside the activated environment:

Claude Code:

```shell
claude mcp add enola /path/to/project/.venv/bin/enola
```

Then ask structural questions, or [check a change](https://enola.tech/docs/change-control.md). Leave its version alone, because Cognee pins the one it has validated. Sharing a repository with Cognee is covered in [COGNEE.md](https://github.com/enola-labs/enola/blob/main/docs/COGNEE.md).
