# AI use cases for Hindsight (vectorize-io/hindsight)

Repo: [vectorize-io/hindsight](https://github.com/vectorize-io/hindsight) | Use cases: 3 | Page: https://dedupedai.com/use-cases/vectorize-io-hindsight/

Hindsight is an open-source agent memory system focused on agents that learn, not just recall chat history. You store facts with retain, fetch them with recall, and get a reasoned answer over memory with reflect, organized in memory banks. It runs as a Docker container, with Docker Compose, from pip or on Kubernetes with Helm, has Python, Node.js and Go clients, and an LLM wrapper that adds memory to an existing OpenAI or Anthropic client in two lines.

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

- Add long-term memory to an existing chatbot in two lines: https://dedupedai.com/use-cases/vectorize-io-hindsight/add-long-term-memory-to-your-agent-in-two-lines/
- Store, search and reason over agent memory with retain, recall and reflect: https://dedupedai.com/use-cases/vectorize-io-hindsight/retain-recall-and-reflect-on-agent-memory/
- Self-host the Hindsight memory server: https://dedupedai.com/use-cases/vectorize-io-hindsight/self-host-hindsight-with-docker/

## How to add long-term memory to an existing chatbot in two lines with Hindsight

Repo: [vectorize-io/hindsight](https://github.com/vectorize-io/hindsight) | Difficulty: Beginner | Time: 20 minutes | Basis: From the README

Wrap your OpenAI client so memories are recalled before each call and stored after it.

**Who it is for:** A developer whose assistant forgets the user between sessions.

**The problem:** Hand-rolling memory means deciding what to store, when to search, and how to inject it.

**The outcome:** The same chat code, now recalling relevant memories per user bank and saving new ones automatically.

### Steps

1. Start a Hindsight server, for example with the Docker command from the README on ports 8888 and 9999
2. Install the wrapper: `pip install hindsight-litellm`
3. Import it with `from hindsight_litellm import wrap_openai` and wrap your OpenAI client, passing a bank_id per user and hindsight_api_url for a self-hosted server (http://localhost:8888)
4. Call `client.chat.completions.create` as before; use `wrap_anthropic()` for the Anthropic SDK

### Prompt to paste into your agent

```text
Add vectorize-io/hindsight memory to my chatbot in <file> using the LLM wrapper against a local server, one bank per user id, and show me a two-session test where the second session remembers a fact from the first.
```

### Caveat



Risk, credentials: The server holds your LLM key in its environment; do not expose it publicly without auth.

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/vectorize-io-hindsight/add-long-term-memory-to-your-agent-in-two-lines/

## How to store, search and reason over agent memory with retain, recall and reflect with Hindsight

Repo: [vectorize-io/hindsight](https://github.com/vectorize-io/hindsight) | Difficulty: Intermediate | Time: 20 minutes | Basis: From the README

Use the client SDK to control exactly what goes into memory and how it is used.

**Who it is for:** A developer who wants explicit control over memory instead of automatic wrapping.

**The problem:** Automatic memory can store noise or miss the facts that matter.

**The outcome:** A memory bank you write to on purpose and query for facts or for a reasoned summary.

### Steps

1. Install a client: `pip install hindsight-client -U` (or the Node.js or Go client)
2. Store a fact: `client.retain(bank_id="my-bank", content="Alice works at Google as a software engineer")`
3. Search it: `client.recall(bank_id="my-bank", query="What does Alice do?")`
4. Ask for a reasoned answer: `client.reflect(bank_id="my-bank", query="Tell me about Alice")`

### Prompt to paste into your agent

```text
Using vectorize-io/hindsight's Python client, write a script that retains <facts> into a bank, then compares recall and reflect answers for <question>, and prints both.
```

### Caveat



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/vectorize-io-hindsight/retain-recall-and-reflect-on-agent-memory/

## How to self-host the Hindsight memory server with Hindsight

Repo: [vectorize-io/hindsight](https://github.com/vectorize-io/hindsight) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Run the server and UI in one Docker container with a persistent volume.

**Who it is for:** A team that wants agent memory on its own infrastructure.

**The problem:** Hosted memory services keep user data on someone else's servers.

**The outcome:** A Hindsight API on port 8888 and UI on 9999, with data kept in a Docker volume.

### Steps

1. Set `export OPENAI_API_KEY=sk-xxx`
2. Run the README's `docker run` command for ghcr.io/vectorize-io/hindsight:latest with ports 8888 and 9999 and the hindsight-data volume
3. Or use Docker Compose from docker/docker-compose with a database password, or `pip install hindsight-api` and run `hindsight-api`
4. Point your clients at http://localhost:8888

### Prompt to paste into your agent

```text
Self-host vectorize-io/hindsight with Docker on this server with a named volume, confirm the API answers on 8888, and tell me how to back up and restore the data.
```

### Caveat



Risk, credentials: The LLM key is passed as an environment variable to the container; keep it out of shell history and scripts you share.

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/vectorize-io-hindsight/self-host-hindsight-with-docker/
