Back to Hermes Agent

Hindsight Memory Provider

plugins/memory/hindsight/README.md

2026.6.57.4 KB
Original Source

Hindsight Memory Provider

Long-term memory with knowledge graph, entity resolution, and multi-strategy retrieval. Supports cloud, local embedded, and local external modes.

Requirements

  • Cloud: API key from ui.hindsight.vectorize.io
  • Local Embedded: API key for a supported LLM provider (OpenAI, Anthropic, Gemini, Groq, OpenRouter, MiniMax, Ollama, or any OpenAI-compatible endpoint). Embeddings and reranking run locally — no additional API keys needed.
  • Local External: A running Hindsight instance (Docker or self-hosted) reachable over HTTP.

Setup

bash
hermes memory setup    # select "hindsight"

The setup wizard will install dependencies automatically via uv and walk you through configuration.

Or manually (cloud mode with defaults):

bash
hermes config set memory.provider hindsight
echo "HINDSIGHT_API_KEY=your-key" >> ~/.hermes/.env

Cloud

Connects to the Hindsight Cloud API. Requires an API key from ui.hindsight.vectorize.io.

Local Embedded

Hermes spins up a local Hindsight daemon with built-in PostgreSQL. Requires an LLM API key for memory extraction and synthesis. The daemon starts automatically in the background on first use and stops after 5 minutes of inactivity.

Supports any OpenAI-compatible LLM endpoint (llama.cpp, vLLM, LM Studio, etc.) — pick openai_compatible as the provider and enter the base URL.

Daemon startup logs: ~/.hermes/logs/hindsight-embed.log Daemon runtime logs: ~/.hindsight/profiles/<profile>.log

To open the Hindsight web UI (local embedded mode only):

bash
hindsight-embed -p hermes ui start

Local External

Points the plugin at an existing Hindsight instance you're already running (Docker, self-hosted, etc.). No daemon management — just a URL and an optional API key.

Config

Config file: ~/.hermes/hindsight/config.json

Connection

KeyDefaultDescription
modecloudcloud, local_embedded, or local_external
api_urlhttps://api.hindsight.vectorize.ioAPI URL (cloud and local_external modes)

Memory Bank

KeyDefaultDescription
bank_idhermesMemory bank name (static fallback used when bank_id_template is unset or resolves empty)
bank_id_templateOptional template to derive the bank name dynamically. Placeholders: {profile}, {workspace}, {platform}, {user}, {session}. Example: hermes-{profile} isolates memory per active Hermes profile. Empty placeholders collapse cleanly (e.g. hermes-{user} with no user becomes hermes).
bank_missionReflect mission (identity/framing for reflect reasoning). Applied via Banks API.
bank_retain_missionRetain mission (steers what gets extracted). Applied via Banks API.

Recall

KeyDefaultDescription
recall_budgetmidRecall thoroughness: low / mid / high
recall_prefetch_methodrecallAuto-recall method: recall (raw facts) or reflect (LLM synthesis)
recall_max_tokens4096Maximum tokens for recall results
recall_max_input_chars800Maximum input query length for auto-recall
recall_prompt_preambleCustom preamble for recalled memories in context
recall_tagsTags to filter when searching memories
recall_tags_matchanyTag matching mode: any / all / any_strict / all_strict
recall_typesobservationFact types surfaced by recall (both auto-recall and the hindsight_recall tool). Comma-separated string or JSON list. Default narrowed to observation only (see "Behavior change" below). Set to observation,world,experience to also include raw facts.
auto_recalltrueAutomatically recall memories before each turn

Behavior change — recall_types defaults to observation only.

Previously recall returned all three fact types. It now returns only observations.

Per Hindsight's docs, observations are the consolidated knowledge layer Hindsight builds on top of raw facts: deduplicated beliefs grounded in evidence, refined as new facts arrive, with proof counts and freshness signals. Raw world / experience facts are the individual supporting evidence that feeds them. For per-turn context injection, observations are denser per token and avoid feeding the model multiple raw facts that one observation already summarizes.

Restore the broad recall with "recall_types": "observation,world,experience" (string or JSON list) in ~/.hermes/hindsight/config.json. This applies to both auto-recall and the hindsight_recall tool — both read the same recall_types setting (the tool schema has no per-call types argument), so narrowing the default narrows both paths.

Retain

KeyDefaultDescription
auto_retaintrueAutomatically retain conversation turns
retain_asynctrueProcess retain asynchronously on the Hindsight server
retain_every_n_turns1Retain every N turns (1 = every turn)
retain_contextconversation between Hermes Agent and the UserContext label for retained memories
retain_tagsDefault tags applied to retained memories; merged with per-call tool tags
retain_sourceOptional metadata.source attached to retained memories
retain_user_prefixUserLabel used before user turns in auto-retained transcripts
retain_assistant_prefixAssistantLabel used before assistant turns in auto-retained transcripts

Integration

KeyDefaultDescription
memory_modehybridHow memories are integrated into the agent

memory_mode:

  • hybrid — automatic context injection + tools available to the LLM
  • context — automatic injection only, no tools exposed
  • tools — tools only, no automatic injection

Local Embedded LLM

KeyDefaultDescription
llm_provideropenaiopenai, anthropic, gemini, groq, openrouter, minimax, ollama, lmstudio, openai_compatible
llm_modelper-providerModel name (e.g. gpt-4o-mini, qwen/qwen3.5-9b)
llm_base_urlEndpoint URL for openai_compatible (e.g. http://192.168.1.10:8080/v1)

The LLM API key is stored in ~/.hermes/.env as HINDSIGHT_LLM_API_KEY.

Tools

Available in hybrid and tools memory modes:

ToolDescription
hindsight_retainStore information with auto entity extraction; supports optional per-call tags
hindsight_recallMulti-strategy search (semantic + entity graph)
hindsight_reflectCross-memory synthesis (LLM-powered)

Environment Variables

VariableDescription
HINDSIGHT_API_KEYAPI key for Hindsight Cloud
HINDSIGHT_LLM_API_KEYLLM API key for local mode
HINDSIGHT_API_LLM_BASE_URLLLM Base URL for local mode (e.g. OpenRouter)
HINDSIGHT_API_URLOverride API endpoint
HINDSIGHT_BANK_IDOverride bank name
HINDSIGHT_BUDGETOverride recall budget
HINDSIGHT_MODEOverride mode (cloud, local_embedded, local_external)

Client Version

Requires hindsight-client >= 0.4.22. The plugin auto-upgrades on session start if an older version is detected.