Hindsight explained: what an agent can keep between sessions
Hindsight explained: what an agent can keep between sessions
Follow a memory from an agent conversation into a bank, then decide when recall or reflection is warranted.
What you will learn
- Start with a concrete memory problem
- Understand the four kinds of material
- Decide what deserves a second look
Before you start
- Python client basics
- A synthetic memory test case and a deployment boundary
Create a small, auditable fixture that records corrections, retrieval misses and costs.
Key takeaways
- A bank gives memory an explicit scope.
- Observations and mental models have different update paths.
- Upstream benchmark figures are not local test results.
Start with a concrete memory problem
An assistant that restarts each session can lose a decision made yesterday. Hindsight offers a persistent bank for facts and experiences, plus operations to retain new information, recall relevant records and reflect over what has accumulated. Those operations are a useful way to describe the product without borrowing its benchmark slogans.
A bank should have an owner and a retention purpose. For a first experiment, use a fictional project with three decisions that change over time. If the system recalls an obsolete decision, record that failure instead of treating a fluent answer as proof that memory worked.
Understand the four kinds of material
The README separates world facts, experiences, observations and mental models. Observations consolidate supporting evidence; mental models are standing answers updated in the background. A user preference and an agent action therefore should not enter the bank with the same interpretation or lifecycle.
The repository describes banks as isolated memory stores. That is a design claim to test at the API and authorization boundary before storing customer data. This review did not run a cross-bank security test, so the first example stays synthetic.
Decide what deserves a second look
Recall retrieves candidates through semantic, keyword, graph and temporal strategies described by the project. Reflect asks the model to reason over stored material. The latter can cost more and produce an interpretation, so use it when the question calls for synthesis rather than a direct lookup.
The next articles trace the client call and the storage boundary. We inspected a fixed source revision, but did not launch the service or reproduce the LongMemEval result shown by the upstream project.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Write three fictional facts with timestamps and a later correction.
- 2
Assign them to one test bank and state who may read it.
- 3
Ask one direct recall question and one synthesis question.
Copy-ready example
from hindsight_client import Hindsight
client = Hindsight(base_url="http://localhost:8888")
client.retain(bank_id="fictional-project", content="The demo deadline is Friday")
print(client.recall(bank_id="fictional-project", query="When is the demo?"))Frequently asked questions
Does Hindsight remember every chat automatically?
Only information sent through an integration or retain call enters a bank; check the chosen client path.
Is reflect a substitute for recall?
Reflect is for interpretation over memory; use recall when the task needs retrieved records.
Sources
- Hindsight / README.mdSource checked 2026-09-26