---
title: "Deploy Hindsight (w/ access key)"
description: "Agent memory over MCP and REST behind your access key, kept in Postgres."
category: "AI/ML"
url: https://railway.com/deploy/hindsight-w-access-key
---

# Deploy Hindsight (w/ access key)

Agent memory over MCP and REST behind your access key, kept in Postgres.

**[Deploy Hindsight (w/ access key) on Railway](https://railway.com/template/hindsight-w-access-key)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/hindsight-w-access-key/manifest.json

- **Creator:** AvgSoft
- **Category:** AI/ML

## Template content

### Hindsight UI https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@e8623f22017942048facdde4a7ddb6d9f5e58663/service-icons/hindsight.svg

- **Image:** ghcr.io/vectorize-io/hindsight-control-plane:1.1.0
- **Health check:** /api/health
- **Public domain:** Yes

### Hindsight API https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@e8623f22017942048facdde4a7ddb6d9f5e58663/service-icons/hindsight.svg

- **Image:** ghcr.io/vectorize-io/hindsight-api:1.1.0
- **Health check:** /health
- **Public domain:** Yes

### Postgres https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@ba04713942d7782e33bc06e4d76f9e782a9f7605/service-icons/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host Hindsight (w/ access key) on Railway

Hindsight gives AI agents long-term memory they store and recall over REST or MCP. This template locks the API, MCP and web UI behind one access key you choose, and keeps memories in a private Postgres that survives redeploys.

![Hindsight agent memory behind your access key](https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@2587b2dbe107c01fbbef4d72c02ebfe26c120377/hindsight/banner.png)

## About Hosting Hindsight (w/ access key)

Choose your access key on the deploy form, with your LLM provider and its key. Sign in to Hindsight UI with the access key, or connect an agent below. Needs the Hobby plan: Hindsight API idles at about 0.85 GB.

### Connect Claude Code

1. In your Railway project, click **Hindsight API** and copy its public URL.
2. In a terminal, run this with your URL and access key. `my-project` is the memory bank; Hindsight creates it on first use.

```
claude mcp add --transport http hindsight https://YOUR-API-URL/mcp/my-project/ --header "Authorization: Bearer YOUR-ACCESS-KEY"
```

3. Run `claude mcp list`: **hindsight** shows as Connected, and Claude Code can now retain, recall and reflect.

### Connect n8n

1. In your workflow's **AI Agent** node, click **+** under **Tool** and add **MCP Client Tool**.
2. Set **Endpoint** to `https://YOUR-API-URL/mcp/my-bank/` and **Authentication** to **Bearer Auth**, then create a credential with your access key as the **Bearer Token**. If n8n runs in this Railway project, the endpoint can be `http://hindsight-api.railway.internal:8888/mcp/my-bank/` instead.
3. Set **Tools to Include** to **Selected** and pick `retain`, `recall` and `reflect`.

## Common Use Cases

- Memory for Claude Code across sessions
- Agents that remember each customer
- Shared knowledge for n8n agents

## Dependencies for Hindsight (w/ access key) Hosting

- Hindsight API
- Hindsight UI
- Postgres

### Deployment Dependencies

- [Hindsight configuration](https://hindsight.vectorize.io/developer/configuration)
- [Hindsight MCP server](https://hindsight.vectorize.io/developer/mcp-server)

### Implementation Details

![Hindsight (w/ access key) architecture](https://cdn.jsdelivr.net/gh/mikedepo/railway-template-assets@2587b2dbe107c01fbbef4d72c02ebfe26c120377/hindsight/architecture.png)

Memories live in the Postgres volume. To change the access key, edit `HINDSIGHT_API_TENANT_API_KEY` on Hindsight API; clients then need the new key.

## Why Deploy Hindsight (w/ access key) on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Hindsight (w/ access key) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

**Updated 2026-10-30:** First release, Hindsight 1.1.0.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/hindsight-w-access-key
