hindsight-hermes
Persistent long-term memory for Hermes Agent using Hindsight. Automatically recalls relevant context before every LLM call and retains conversations for future sessions.
Quick Start
# 1. Install into Hermes's Python environment
uv pip install hindsight-hermes --python $HOME/.hermes/hermes-agent/venv/bin/python
# 2. Configure
mkdir -p ~/.hindsight
cat > ~/.hindsight/hermes.json << 'EOF'
{
"hindsightApiUrl": "http://localhost:9077",
"bankId": "hermes"
}
EOF
# 3. Start Hermes — the plugin activates automatically
hermes
What it does
Automatic memory on every turn (via Hermes lifecycle hooks):
pre_llm_call— Recalls relevant memories and injects them into the system prompt. The model sees cross-session context automatically, no tool call needed.post_llm_call— Retains the user/assistant exchange so it can be recalled in future sessions.
Three explicit tools (via Hermes plugin system):
hindsight_retain— Store information to long-term memoryhindsight_recall— Search long-term memory for relevant informationhindsight_reflect— Synthesize a reasoned answer from stored memories
The lifecycle hooks require hermes-agent with PR #2823 or later. On older versions, only the tools are registered — hooks are silently skipped.
Configuration
All settings live in ~/.hindsight/hermes.json. Environment variables override file values.
Same field names as the openclaw and claude-code integrations.
Example config
{
"hindsightApiUrl": "http://localhost:9077",
"bankId": "hermes",
"autoRecall": true,
"autoRetain": true,
"recallBudget": "mid",
"recallMaxTokens": 4096,
"bankMission": "Focus on user preferences, project context, and technical decisions."
}
Connection
| Setting | Env Var | Default | Description |
|---|---|---|---|
hindsightApiUrl |
HINDSIGHT_API_URL |
— | Hindsight API URL |
hindsightApiToken |
HINDSIGHT_API_TOKEN / HINDSIGHT_API_KEY |
— | Auth token |
apiPort |
HINDSIGHT_API_PORT |
9077 |
Local daemon port |
daemonIdleTimeout |
HINDSIGHT_DAEMON_IDLE_TIMEOUT |
0 |
Idle shutdown (seconds, 0 = never) |
embedVersion |
HINDSIGHT_EMBED_VERSION |
"latest" |
hindsight-embed version |
Memory Bank
| Setting | Env Var | Default | Description |
|---|---|---|---|
bankId |
HINDSIGHT_BANK_ID |
— | Memory bank ID |
bankMission |
HINDSIGHT_BANK_MISSION |
"" |
Agent purpose for the bank |
retainMission |
— | — | Custom extraction prompt |
bankIdPrefix |
— | "" |
Prefix for bank IDs |
Auto-Recall
| Setting | Env Var | Default | Description |
|---|---|---|---|
autoRecall |
HINDSIGHT_AUTO_RECALL |
true |
Enable pre_llm_call recall |
recallBudget |
HINDSIGHT_RECALL_BUDGET |
"mid" |
Effort: low/mid/high |
recallMaxTokens |
HINDSIGHT_RECALL_MAX_TOKENS |
4096 |
Max tokens in response |
recallMaxQueryChars |
HINDSIGHT_RECALL_MAX_QUERY_CHARS |
800 |
Max query chars |
recallPromptPreamble |
— | see below | Header before recalled memories |
Auto-Retain
| Setting | Env Var | Default | Description |
|---|---|---|---|
autoRetain |
HINDSIGHT_AUTO_RETAIN |
true |
Enable post_llm_call retain |
retainEveryNTurns |
— | 1 |
Retain every Nth turn |
retainOverlapTurns |
— | 2 |
Overlap turns for continuity |
retainRoles |
— | ["user", "assistant"] |
Roles to retain |
LLM (daemon mode)
| Setting | Env Var | Default | Description |
|---|---|---|---|
llmProvider |
HINDSIGHT_LLM_PROVIDER |
auto-detect | openai/anthropic/gemini/groq/ollama |
llmModel |
HINDSIGHT_LLM_MODEL |
provider default | Model override |
Misc
| Setting | Env Var | Default | Description |
|---|---|---|---|
debug |
HINDSIGHT_DEBUG |
false |
Debug logging |
Disabling Hermes's built-in memory
Hermes has a built-in memory tool that saves to local files. Disable it so the LLM uses Hindsight instead:
hermes tools disable memory
Troubleshooting
Plugin not loading — verify the entry point:
python -c "
import importlib.metadata
eps = importlib.metadata.entry_points(group='hermes_agent.plugins')
print(list(eps))
"
Tools missing from /tools — the plugin skips registration when hindsightApiUrl is not configured. Check ~/.hindsight/hermes.json or env vars.
Connection refused — verify the API is running: curl http://localhost:9077/health
No memories recalled — memories need at least one retain cycle. Store a fact, start a new session, then ask about it.
Metadata
Release files for hindsight-hermes 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hindsight_hermes-0.5.0.tar.gz | 168.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hindsight_hermes-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 179.7 kB
Release files / hindsight_hermes-0.5.0.tar.gz
| Download URL | hindsight_hermes-0.5.0.tar.gz |
|---|---|
| Size | 168.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07f88998e3252bd801b76f74a199974cb3ebae76e1769a5c20dd6a019127be27
|
|
BLAKE2b-256 checksum How to use checksums |
2b08cdac996a04282d8875a82d910fa4073260b76dd49393a38dde108230c699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.
Transparency logRelease files / hindsight_hermes-0.5.0-py3-none-any.whl
| Download URL | hindsight_hermes-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b2355074536b2a0549081ac0108188d77fad562305cb9c9e6991bee95775316
|
|
BLAKE2b-256 checksum How to use checksums |
126700d1cee9d2c13168fd9f016673bc684f82e11c971f3b820b4fedd6bdf393
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 30, 2026.
Transparency log