hindsight

hindsight

Docker app from PikkonMG's Repository

Overview

Shared memory for AI agents through MCP and HTTP. Includes the API, web UI, and embedded PostgreSQL for a first deployment.

Before first start:

  1. The container runs as user 1000 and cannot fix folder ownership itself. Before the first start, run this in the Unraid terminal: mkdir -p /mnt/user/appdata/hindsight && chown -R 1000:1000 /mnt/user/appdata/hindsight && chmod 700 /mnt/user/appdata/hindsight
    If you started the container first and the log says the database directory is not writable, stop the container, run the same command, and start it again.
  2. Local Ollama is selected by default. Set Model endpoint to your Ollama address and Model name to a model you have pulled. To use a hosted API instead, change Model service and paste its key into Model provider key.
  3. Set a strong Memory API key. Paste the SAME key into Web UI backend key. Set a separate Web UI login key.
  4. Open the WebUI. Agents use http://YOUR_Unraid_IP:8888/mcp/YOUR_BANK/ with Authorization: Bearer YOUR_MEMORY_API_KEY. One bank per project.

No project folders or Docker socket mounts are needed. Keep ports on a trusted network. Shared API keys grant access across every bank, so bank names are not separate access controls.
Back up appdata while the container is stopped. For a long-lived shared service, use external PostgreSQL with pgvector as described in the guide.

Hindsight on Unraid

Shared memory for AI agents, reachable over MCP and HTTP. This template runs the official image ghcr.io/vectorize-io/hindsight:latest, which bundles the API, the web dashboard, the local search models, and an embedded PostgreSQL database. Hindsight also needs one language model, which you point at a local Ollama server or a hosted API.

First start

  1. Make the data folders on the Unraid terminal before you start the container:

    mkdir -p /mnt/user/appdata/hindsight
    chown -R 1000:1000 /mnt/user/appdata/hindsight
    chmod 700 /mnt/user/appdata/hindsight
    

    The container runs as user 1000 and does not read Unraid's PUID and PGID settings. If you change a path in the template, use the same path here.

  2. Copy templates/hindsight.xml to /boot/config/plugins/dockerMan/templates-user/my-hindsight.xml on Unraid. Then open Docker > Add Container and pick hindsight from the user templates.

  3. Set the model fields. The template defaults to local Ollama:

    Field Value
    Model service ollama
    Model name gemma4:12b
    Model endpoint http://YOUR_UNRAID_IP:11434/v1
    Model provider key empty

    The model must support tool calling. Pull it on the Ollama host first:

    ollama pull gemma4:12b
    

    For any other service, use these values:

    Model service Provider Model Endpoint Provider key
    Local Ollama ollama Exact local name http://YOUR_UNRAID_IP:11434/v1 Blank
    OpenAI API key openai gpt-4o-mini Blank OpenAI key
    Anthropic API key anthropic claude-haiku-4-5 Blank Anthropic key
    Google Gemini API key gemini gemini-3.5-flash Blank Gemini key
    Groq API key groq openai/gpt-oss-120b Blank Groq key
    Ollama Cloud key ollama-cloud gpt-oss:120b Blank Ollama key
    OpenRouter key openrouter Exact OpenRouter model id Blank OpenRouter key
    DeepSeek key deepseek deepseek-v4-flash Blank DeepSeek key
    xAI Grok API key openai Exact xAI model name https://api.x.ai/v1 xAI key
    Other OpenAI-compatible API openai Exact API name Provider URL ending in /v1 API key

    Model service also accepts these:

    openai-responses, vertexai, lmstudio, llamacpp, minimax, zai, opencode-go, atlas, meta, volcano, requesty, github-copilot, bedrock, fireworks, nous, litellm, litellmrouter

    The Hindsight models documentation lists the extra variables some of them need.

  4. Set the three keys. Memory API key and Web UI backend key must hold the same value. Web UI login key is a separate one.

  5. Apply the template. Open http://YOUR_UNRAID_IP:9999/ and sign in with the Web UI login key. Leave the internal Web UI backend URL at http://127.0.0.1:8888.

Connect agents

Upstream ships an installer that detects the coding agents you already have and wires them all up. Run it on the machine you code from, not on Unraid. This has only been run on Linux.

npx @vectorize-io/hindsight-coding-agents install all \
  --server self-hosted \
  --api-url http://YOUR_UNRAID_IP:8888 \
  --api-token YOUR_MEMORY_API_KEY

It covers Claude Code, Codex, Cursor, opencode and Pi, and writes one config file at ~/.hindsight/coding-agent.json. After that each repo gets its own bank, seeded from its commit history.

A repo named myproject lands in a bank named coding-agent::myproject. To send a folder to a bank you named yourself, add a mapping to that same file:

{
  "mapPathToBank": {
    "/path/to/your/repo": "your-bank"
  }
}

Anything the installer does not cover

It is a plain MCP endpoint over Streamable HTTP. One bank per project, named in the URL:

  • http://YOUR_UNRAID_IP:8888/mcp/YOUR_BANK/

Send the header Authorization: Bearer YOUR_MEMORY_API_KEY, using the Memory API key from the template. Most tools read the same JSON shape:

{
  "mcpServers": {
    "hindsight-YOUR_BANK": {
      "type": "http",
      "url": "http://YOUR_UNRAID_IP:8888/mcp/YOUR_BANK/",
      "headers": { "Authorization": "Bearer YOUR_MEMORY_API_KEY" }
    }
  }
}
Tool Where to put it
Cursor ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one project. Cursor ignores the type field.
Oh My Pi ~/.omp/agent/mcp.json. It expands ${HINDSIGHT_API_KEY} in headers.
Plain Pi Install the pi-mcp extension, then use ~/.pi/agent/mcp.json with the same shape.
Grok CLI Run grok mcp add --transport http hindsight-YOUR_BANK http://YOUR_UNRAID_IP:8888/mcp/YOUR_BANK/ --header "Authorization: Bearer YOUR_MEMORY_API_KEY"
Claude Desktop Its connector dialog has nowhere for a bearer token, so use the mcp-remote bridge in claude_desktop_config.json: "command": "npx", "args": ["mcp-remote", "http://YOUR_UNRAID_IP:8888/mcp/YOUR_BANK/", "--header", "Authorization: Bearer YOUR_MEMORY_API_KEY"]
ChatGPT Desktop Needs a public HTTPS server with OAuth or no auth, so a LAN address will not work.

The shared API key opens every bank, so only give it to clients you trust.

Storage and updates

The appdata path maps to /home/hindsight/.pg0 inside the container. Keep that mapping on updates. Before an update, stop the container and back up the whole mapped folder.

To move to an external PostgreSQL with pgvector, export and import your memories first, then change Database URL under Show more settings from pg0 to the connection string. Changing the URL alone does not move existing memory. The external database must already exist with its vector extension enabled before Hindsight starts.

Sources

Install Hindsight on Unraid in a few clicks.

Find Hindsight in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Hindsight Review the template variables and paths Click Install

Related apps

Details

Repository
ghcr.io/vectorize-io/hindsight:latest
Last Updated2026-09-08
First Seen2026-09-06

Runtime arguments

Web UI
http://[IP]:[PORT:9999]/
Network
bridge
Shell
bash
Privileged
false
Extra Params
--shm-size=1g --stop-timeout=60

Template configuration

Memory API / MCP portPorttcp

Host port for API and MCP. Use /mcp/PROJECT/ and the Memory API key.

Target
8888
Default
8888
Value
8888
Web UI portPorttcp

Host port for the memory dashboard.

Target
9999
Default
9999
Value
9999
Memory dataPathrw

Embedded database. Prepare the host folder with owner 1000:1000 and mode 700 before starting. Do not map a code repository here.

Target
/home/hindsight/.pg0
Default
/mnt/user/appdata/hindsight
Value
/mnt/user/appdata/hindsight
Model serviceVariable

Local Ollama is selected. Keep ollama unless you choose another service in the guide. Hosted options include openai, anthropic, gemini, groq, ollama-cloud, openrouter and deepseek.

Target
HINDSIGHT_API_LLM_PROVIDER
Default
ollama
Value
ollama
Model nameVariable

Exact name of a model already pulled in Ollama. The model must support tool calling and JSON output. gemma4:12b fits a 12 GB GPU. Gemma 3 has no tool calling and breaks reflect. Change this when you change Model service.

Target
HINDSIGHT_API_LLM_MODEL
Default
gemma4:12b
Value
gemma4:12b
Model endpointVariable

Needed for Ollama only. Use your Unraid IP, not localhost, for example http://YOUR_UNRAID_IP:11434/v1. Leave blank for hosted services.

Target
HINDSIGHT_API_LLM_BASE_URL
Model provider keyVariable

Leave blank for local Ollama. Enter the key for your hosted service. This is not the Memory API key.

Target
HINDSIGHT_API_LLM_API_KEY
Ollama context sizeVariable

Ollama only. Prompt window in tokens. Upstream recommends setting this explicitly. Lower it if the model does not fit in memory.

Target
HINDSIGHT_API_LLM_OLLAMA_NUM_CTX
Default
16384
Value
16384
Parallel model callsVariable

Upstream recommends 1 for a local model. A single GPU serves one request at a time. Raise this for a hosted API.

Target
HINDSIGHT_API_LLM_MAX_CONCURRENT
Default
1
Value
1
Background observationsVariable

Extra model calls after each save that build higher-level insights. Upstream recommends false for a local model because it is slow. Set true for a hosted API.

Target
HINDSIGHT_API_ENABLE_OBSERVATIONS
Default
false
Value
false
Model call timeoutVariable

Seconds to wait for one model reply. Raise it for a slow local model. Do not leave this blank.

Target
HINDSIGHT_API_LLM_TIMEOUT
Default
120
Value
120
Database URLVariable

Keep pg0 to use the embedded database in the Memory data folder. For an external PostgreSQL with pgvector, replace this with its connection string. Do not leave this blank.

Target
HINDSIGHT_API_DATABASE_URL
Default
pg0
Value
pg0
Log levelVariable

One of critical, error, warning, info or debug. Use debug when you need to report a problem.

Target
HINDSIGHT_API_LOG_LEVEL
Default
info
Value
info
Stateless MCPVariable

Keep false for normal use. Set true when a reverse proxy or client cannot hold a streaming session open.

Target
HINDSIGHT_API_MCP_STATELESS
Default
false
Value
false
Memory API keyVariable

Required. Create a long random secret for agents. Paste the same value into Web UI backend key. No shared default is supplied.

Target
HINDSIGHT_API_TENANT_API_KEY
Web UI backend keyVariable

Required. Must exactly match Memory API key so the dashboard can read and write memory.

Target
HINDSIGHT_CP_DATAPLANE_API_KEY
Web UI login keyVariable

Required. Use a separate long random secret to sign in to the dashboard. Leaving this blank disables dashboard login.

Target
HINDSIGHT_CP_ACCESS_KEY
API authenticationVariable

Keep enabled. Startup fails when Memory API key is empty.

Target
HINDSIGHT_API_TENANT_EXTENSION
Default
hindsight_api.extensions.builtin.tenant:ApiKeyTenantExtension
Value
hindsight_api.extensions.builtin.tenant:ApiKeyTenantExtension
Web UI backend URLVariable

Internal API address for the bundled dashboard. Leave unchanged when changing host port mappings.

Target
HINDSIGHT_CP_DATAPLANE_API_URL
Default
http://127.0.0.1:8888
Value
http://127.0.0.1:8888
Worker identityVariable

Keep stable across restarts so interrupted work keeps the same owner. Use a unique value for each instance sharing a database.

Target
HINDSIGHT_API_WORKER_ID
Default
hindsight-unraid
Value
hindsight-unraid
MCP enabledVariable

Enable memory tools for MCP clients.

Target
HINDSIGHT_API_MCP_ENABLED
Default
true
Value
true
Container homeVariable

Path inside the container. Keep unchanged.

Target
HOME
Default
/home/hindsight
Value
/home/hindsight
Time zoneVariable

Container time zone. Change to your local zone.

Target
TZ
Default
America/New_York
Value
America/New_York