> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Semantic Memory (Hindsight)

> Give Smithers long-term semantic memory by connecting Hindsight: sign up for Hindsight Cloud or self-host it, then set HINDSIGHT_URL. This is the one memory step your agent can't do for you.

Smithers memory works out of the box: facts and notes persist across runs in
local SQLite with keyword recall, no setup at all. Connecting
[Hindsight](https://hindsight.vectorize.io) upgrades that to *semantic*
memory: recall by meaning instead of keywords, mental-model primers, and
retention policies.

Getting a Hindsight endpoint means creating an account or deploying a
service, and that is a human task: your agent cannot sign up for you. This
page is where `HINDSIGHT_URL` comes from.

## Option A: Hindsight Cloud

1. Sign up at [ui.hindsight.vectorize.io/signup](https://ui.hindsight.vectorize.io/signup).
2. Copy your workspace's API base URL and API key from the Hindsight console.

## Option B: Self-host

Run Hindsight yourself with Docker (it bundles its own Postgres; bring an LLM
provider key for its extraction models):

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker run -it --pull always --name hindsight --restart unless-stopped \
  -p 8888:8888 -p 9999:9999 \
  -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \
  -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \
  ghcr.io/vectorize-io/hindsight:latest
```

Your API base URL is `http://127.0.0.1:8888` (the web UI is on port 9999).
Helm and pip installs are covered in
[Hindsight's own docs](https://hindsight.vectorize.io/developer/installation).

## Point Smithers at it

Set the environment where Smithers runs (shell profile, `.env`, or your
deployment's config):

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
HINDSIGHT_URL=http://127.0.0.1:8888   # or your cloud workspace URL
HINDSIGHT_API_KEY=...                 # if your endpoint requires one
```

That's the whole switch: with `HINDSIGHT_URL` set, every workflow using
memory gets semantic recall; unset it and Smithers falls back to local SQLite
memory, losing nothing that was stored locally.

## Check it worked

Ask your agent:

> "Run a Smithers workflow that remembers something about this project, then
> ask memory what it knows."

Then, in a later session:

> "What has Smithers learned about this repo across runs?"

<Note>
  The agent-facing details (banks, tags, recall budgets, the `<Memory>`
  component, `createHindsightMemoryStore`) live in the Technical API at
  [Memory](/concepts/memory) and the [Memory API](/reference/memory). You don't
  need them; your agent does.
</Note>
