Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hindsight

БесплатноБез исполняемых скриптовНе проверен

Hindsight is a self-hosted agent memory server: an agent stores facts with retain, searches them with recall, and asks for reasoned answers over them with…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Hindsight — Memory Server for Agents That Learn

Overview

Hindsight is a memory service for AI agents. You run a server (Docker, pip, or Helm), and agents talk to it through a Python, Node.js or Go client, a REST API, or a built-in MCP endpoint. Everything lives in banks: strictly isolated stores, typically one per user, agent or project.

Three operations do the work:

  • retain pushes text in. The server uses its configured LLM to extract facts, entities, relationships and dates.
  • recall searches a bank with semantic, keyword (BM25), graph and temporal strategies in parallel, merges and reranks, and trims to a token budget.
  • reflect answers a question by reasoning over the bank, not just returning matches. Facts are consolidated in the background into observations and mental models.

The server needs an LLM key for extraction and reflection, and PostgreSQL with a vector extension (the Docker image and the pip package embed one for development). The README includes benchmark claims; this skill does not rely on them.

Choose Hindsight when you want a standalone memory service shared by several agents or users. For a simple file-based memory inside one project, the agent-memory skill is lighter.

Instructions

Run the server in Docker

export OPENAI_API_KEY="$(cat ~/.secrets/openai-key)"   # create at platform.openai.com/api-keys
docker run -d --name hindsight --restart unless-stopped \
  -p 127.0.0.1:8888:8888 -p 127.0.0.1:9999:9999 \
  -e HINDSIGHT_API_LLM_API_KEY="$OPENAI_API_KEY" \
  -v hindsight-data:/home/hindsight/.pg0 \
  ghcr.io/vectorize-io/hindsight:latest

The API listens on http://127.0.0.1:8888 and the web UI on http://127.0.0.1:9999. The README's example omits the 127.0.0.1 prefix, which would publish both ports on every network interface; keep it unless you have put authentication in front.

Other providers use HINDSIGHT_API_LLM_PROVIDER (for example openai, anthropic, gemini, groq, ollama), with HINDSIGHT_API_LLM_MODEL and HINDSIGHT_API_LLM_BASE_URL for a custom endpoint. Pass them as extra -e flags.

Check the container is up:

docker logs --tail 20 hindsight

Run the server with pip instead

python3 -m venv .venv
.venv/bin/pip install hindsight-api
export HINDSIGHT_API_LLM_PROVIDER=openai
export HINDSIGHT_API_LLM_API_KEY="$OPENAI_API_KEY"
.venv/bin/hindsight-api --host 127.0.0.1 --port 8888

hindsight-api accepts --host, --port (default 8888) and --workers. Use hindsight-api-slim when you supply your own embeddings, reranker and database (needed on Intel Macs).

For a throwaway in-process server in a script, pip install hindsight-all provides HindsightServer and HindsightClient (from hindsight import HindsightServer, HindsightClient); the server is a context manager and server.url gives its address.

Install the client

.venv/bin/pip install -U hindsight-client

Node.js: npm install @vectorize-io/hindsight-client, then new HindsightClient({ baseUrl }) with client.retain(bankId, content) and client.recall(bankId, query).

Retain, recall, reflect from Python

from hindsight_client import Hindsight

client = Hindsight(base_url="http://127.0.0.1:8888")

client.retain(
    bank_id="user-4812",
    content="Marta moved the Lisbon offsite to 14 March and wants vegetarian catering.",
    context="planning chat",
    timestamp="2026-10-12T09:30:00Z",
    tags=["offsite", "catering"],
)

found = client.recall(bank_id="user-4812", query="What does Marta need for the offsite?")
for item in found.results:
    print(item.type, item.text)

answer = client.reflect(bank_id="user-4812", query="What should I keep in mind when booking for Marta?")
print(answer.text)

Verified signatures (hindsight-client 1.1.0):

  • retain(bank_id, content, timestamp=None, context=None, document_id=None, metadata=None, tags=None, retain_async=False, ...).
  • recall(bank_id, query, types=None, max_tokens=4096, budget="mid", tags=None, tags_match="any", ...) returns an object whose results have text, type, tags, context, occurred_start.
  • reflect(bank_id, query, budget="low", context=None, max_tokens=None, tags=None, include_facts=False, ...) returns an object with text; based_on is filled only when include_facts=True.
  • retain_batch(bank_id, items, document_id=None, retain_async=False) takes a list of dicts, one per memory.
  • Async variants carry an a prefix: aretain, arecall, areflect.

Create a bank with a mission

Banks are created on first use, but you can set their purpose and behavior up front:

client.create_bank(
    bank_id="support-agent",
    name="Support agent memory",
    mission="Remember customer environments, recurring failures and what fixed them.",
)

Other create_bank parameters include disposition_skepticism, disposition_literalism, disposition_empathy, enable_observations and `reflect_missio

Полный SKILL.md на GitHub

Установить hindsight в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл hindsight?

Hindsight is a self-hosted agent memory server: an agent stores facts with retain, searches them with recall, and asks for reasoned answers over them with reflect, per isolated memory bank. Use when an agent or chatbot must remember users and projects across sessions, or when asked to "set up Hindsight", "retain and recall memories", "add per-user memory banks", "run a memory server for my agent", or "connect an MCP client to Hindsight memory".

Как установить скилл hindsight?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hindsight запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить hindsight с