---
title: Hindsight
description: Recall relevant context before every turn and retain each exchange automatically.
url: "https://eve.dev/integrations/hindsight"
docs_index: /llms.txt
type: memory
keywords:
  - memory
  - long-term memory
  - automatic recall
  - retention
  - user profile
  - context
  - Hindsight Cloud
  - self-hosted
  - Vectorize
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Memory provider integration for eve. Recall relevant context before every turn and retain each exchange automatically.

## Install

Install Hindsight memory for eve:

```bash
eve add memory/hindsight
```

This installs `@vectorize-io/hindsight-eve` and writes a memory slot. The provider requires Node.js 24 or later and eve 0.45.1 or later.

## Quick start

Create a Hindsight Cloud API key and add it to the agent's environment. The API URL defaults to Hindsight Cloud:

```bash title=".env.local"
HINDSIGHT_API_KEY=...
```

The registry creates this memory slot:

```ts title="agent/memory/hindsight.ts"
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
import { defineMemory } from "eve/memory";
import { byPrincipal } from "eve/memory/scope";

export default defineMemory({
  description: "Long-term memory about the current user.",
  provider: hindsightMemory(),
  scope: byPrincipal,
});
```

Before each turn, the provider recalls memories relevant to the user's message. After the turn, it retains the user message and assistant reply. Neither path depends on the model choosing to call a tool. The slot also exposes `hindsight__reflect`, so the model can ask long-term memory a question mid-turn.

## Configure

Each eve memory scope gets its own Hindsight bank, so `byPrincipal` keeps every caller's memory separate. Tune recall in the memory slot when needed:

```ts title="agent/memory/hindsight.ts"
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
import { defineMemory } from "eve/memory";
import { byPrincipal } from "eve/memory/scope";

export default defineMemory({
  description: "Long-term memory about the current user.",
  provider: hindsightMemory({
    budget: "high",
    maxTokens: 2048,
  }),
  scope: byPrincipal,
});
```

For a self-hosted server, set `HINDSIGHT_API_URL`, and pass `apiKey: null` when the server has no authentication. Other options include `recallQuery`, `context`, `includeAssistantReply`, `capture`, `tools`, `timeoutMs`, and `onError`.

A string `bankId` or `HINDSIGHT_BANK_ID` pins every scope to one shared bank, which removes that isolation. Use it only for single-user agents. See the [Hindsight eve integration guide](https://hindsight.vectorize.io/sdks/integrations/eve) for Cloud, self-hosted, and bank configuration.

[Read the full memory provider documentation](https://hindsight.vectorize.io/sdks/integrations/eve)

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)