# AI use cases for Cognee (topoteretes/cognee)

Repo: [topoteretes/cognee](https://github.com/topoteretes/cognee) | Use cases: 3 | Page: https://dedupedai.com/use-cases/topoteretes-cognee/

Cognee is an open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph agents can search. Its remember, recall, improve and forget operations work from Python or the cognee-cli, it can run locally with small CPU models and no API key, and it ships plugins for Claude Code and Codex plus Docker images for an API, UI and MCP server.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Build agent memory locally with no API key: https://dedupedai.com/use-cases/topoteretes-cognee/build-local-agent-memory-without-an-llm-with-cognee/
- Give Claude Code or Codex memory across sessions: https://dedupedai.com/use-cases/topoteretes-cognee/give-claude-code-or-codex-memory-with-cognee/
- Self-host the Cognee API, UI and MCP server: https://dedupedai.com/use-cases/topoteretes-cognee/self-host-cognee-api-ui-and-mcp-server/

## How to build agent memory locally with no API key with Cognee

Repo: [topoteretes/cognee](https://github.com/topoteretes/cognee) | Difficulty: Beginner | Time: 20 minutes | Basis: From the README

Store facts and retrieve them with cognee-cli using the bundled small local models.

**Who it is for:** A developer who wants to try graph memory without paying for or sending data to an LLM.

**The problem:** Most memory layers need a hosted model and API key before anything works.

**The outcome:** A local dataset you can write to and query from the command line.

### Steps

1. Install with `uv pip install "cognee[gliner]"`
2. Store a fact with `cognee-cli remember "Marie Curie was born in Warsaw." -d local_quickstart`
3. Query it with `cognee-cli recall "Where was Marie Curie born?" -d local_quickstart`
4. Or save the README quickstart as quickstart.py and run `python quickstart.py`

### Prompt to paste into your agent

```text
Using topoteretes/cognee, install `cognee[gliner]`, remember three facts from <my notes> into a dataset with cognee-cli, recall one of them, and show me the retrieved text.
```

### Caveat

Without an LLM key you get retrieved passages, not generated answers; the local models download on first use.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/topoteretes-cognee/build-local-agent-memory-without-an-llm-with-cognee/

## How to give Claude Code or Codex memory across sessions with Cognee

Repo: [topoteretes/cognee](https://github.com/topoteretes/cognee) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the Cognee plugin so your coding agent keeps project context, past decisions and fixes between runs.

**Who it is for:** A developer whose coding agent re-learns the same project rules every session.

**The problem:** Coding agents lose context when a session ends.

**The outcome:** A memory plugin installed in Claude Code or Codex that captures and recalls project knowledge.

### Steps

1. For Claude Code run `claude plugin marketplace add topoteretes/cognee-integrations` then `claude plugin install cognee-memory@cognee`
2. For Codex enable hooks with `codex features enable hooks`
3. Then run `codex plugin marketplace add topoteretes/cognee-integrations --ref main` and `codex plugin add cognee@cognee`
4. Follow the setup guide for your agent to configure local or remote memory

### Prompt to paste into your agent

```text
Install the topoteretes/cognee memory plugin in <Claude Code or Codex> using the README commands, start a session in <my repo>, and confirm a decision from the first session is recalled in the second.
```

### Caveat

This card is written from the topoteretes/cognee README, not from a test run by Deduped. Before you start, make sure you have Python 3.10 to 3.14. Check the repo for newer instructions before you rely on these steps.

Risk, privacy: The plugin captures session content into memory; check what it stores before using it on private code.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/topoteretes-cognee/give-claude-code-or-codex-memory-with-cognee/

## How to self-host the Cognee API, UI and MCP server with Cognee

Repo: [topoteretes/cognee](https://github.com/topoteretes/cognee) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run the prebuilt Docker image or the compose profiles so other tools and MCP clients can use shared memory.

**Who it is for:** A team lead who wants one shared memory service for several agents.

**The problem:** Each agent keeping its own memory leads to duplicated and conflicting context.

**The outcome:** Cognee running with the API on 8000, the UI on 3000 and MCP on 8001.

### Steps

1. Try the bundled graph first with `cognee-cli demo`
2. Run the API image with `docker run --rm -it -p 8000:8000` and the LLM_API_KEY, ENABLE_BACKEND_ACCESS_CONTROL and volume flags shown in the README
3. From a source checkout, copy .env.template to .env and run `docker compose --profile ui --profile mcp up`
4. Open the local UI with `cognee-cli -ui` to inspect the graph

### Prompt to paste into your agent

```text
Using topoteretes/cognee, start the stack with `docker compose --profile ui --profile mcp up` from a checkout, load <my docs>, and confirm the API on port 8000 and MCP on port 8001 respond.
```

### Caveat

Running the whole memory layer on Postgres is a demo feature per the README.

Risk, security: ENABLE_BACKEND_ACCESS_CONTROL=false is the single-user local posture; configure authentication before going beyond a local demo.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/topoteretes-cognee/self-host-cognee-api-ui-and-mcp-server/
