RCLL — self-hosted shared memory for a team of AI agents. Canonical repository; pushed out to github.com/Holetron-lab/fleet-memory. Fork of vectorize-io/hindsight (MIT). https://rcll.ai
Find a file
Nicolò Boschi 3bb0a58ded
Increase graph neighbor limit and benchmark improvements (#18)
* Improve LongMemEval benchmark with structured prompts and better options

- Add --context-format option with 'json' (original) and 'structured' modes
- Structured format groups facts with source chunks for better LLM comprehension
- Add detailed instructions for date calculations, relative time handling, and abstention
- Add --source-results flag to read failed questions from a different file
- Allow --category to be combined with --max-instances for sampling
- Fix Gemini structured output by passing response_schema parameter
- Add retry logic for empty Gemini responses with block reason logging
- Add judge prompt comparison documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix recall in benchmarks

* Improve LongMemEval prompt and Gemini error handling

- Add JSONDecodeError retry for Gemini truncated responses
- Increase max_tokens to 32768 for thinking models
- Add counting/disambiguation guidance to structured prompt
- Add "when in doubt, undercount" and overlap detection rules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add connection error retry and preference question guidance

- Add APIConnectionError retry for OpenAI client (server disconnects)
- Add recommendation/preference question guidance to structured prompt
- Instruct model to build on user's existing tools/experiences

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Make reasoning optional

* Seed for LLM through Groq

* fix entity and observations

* Increase graph retrieval neighbor limit for expanded entities

Doubled the neighbor limit multiplier from 10 to 20 in graph retrieval.
With expanded entity extraction (now including objects and concepts like
"kitchen"), facts share more common entities, causing the previous limit
to arbitrarily exclude relevant results. This fix ensures better recall
for questions about related items (e.g., kitchen items).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Expand entity extraction to include objects and concepts

Updated entity extraction prompt to include:
- Specific objects (coffee maker, toaster, car, laptop, kitchen)
- Abstract concepts/themes (friendship, career growth, loss, celebration)
- Places and organizations (IKEA, Goodwill, New York)

This enables better fact linking through shared entities. For example,
kitchen appliances now share a "kitchen" entity, allowing graph traversal
to find related facts like "replaced coffee maker" when querying about
"kitchen items".

Works in conjunction with the increased neighbor limit to improve recall.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Chris Bartholomew <chris.bartholomew@vectorize.io>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: andrew <andrew.neeser@me.com>
2025-12-08 15:24:13 +01:00
.github/workflows docs, packages and quick start 2025-12-04 12:49:01 +01:00
cookbook prepare for release 2025-12-03 11:52:25 +01:00
docker/standalone improve docker and mcp 2025-12-04 15:38:55 +01:00
helm Release v0.0.21 2025-12-05 01:21:40 +01:00
hindsight Release v0.0.21 2025-12-05 01:21:40 +01:00
hindsight-api Increase graph neighbor limit and benchmark improvements (#18) 2025-12-08 15:24:13 +01:00
hindsight-cli Release v0.0.21 2025-12-05 01:21:40 +01:00
hindsight-clients Release v0.0.21 2025-12-05 01:21:40 +01:00
hindsight-control-plane Increase graph neighbor limit and benchmark improvements (#18) 2025-12-08 15:24:13 +01:00
hindsight-dev Increase graph neighbor limit and benchmark improvements (#18) 2025-12-08 15:24:13 +01:00
hindsight-docs fix node build 2025-12-05 01:21:30 +01:00
hindsight-integrations rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
scripts fix node build 2025-12-05 01:21:30 +01:00
.dockerignore .dockerignore 2025-12-03 21:11:27 +01:00
.env.example chunks 2025-11-29 16:34:13 +01:00
.gitignore rename bank facts to interactions 2025-12-04 17:16:04 +01:00
.python-version initial commit 2025-10-30 12:53:12 +01:00
.sesskey papers and fixes 2025-11-14 14:07:41 +01:00
CODE_OF_CONDUCT.md add repo files 2025-12-04 10:20:26 +01:00
CONTRIBUTING.md prepare for release 2025-12-03 11:52:25 +01:00
LICENSE Add license (#12) 2025-12-03 23:06:15 +01:00
openapi.json new names 2025-12-04 21:34:05 +01:00
pyproject.toml fix: ci and ui improvements (#8) 2025-12-03 15:08:39 +01:00
README.md fix readme 2025-12-05 07:43:19 +01:00
SECURITY.md add repo files 2025-12-04 10:20:26 +01:00
uv.lock fix readme 2025-12-05 07:43:19 +01:00

Hindsight

CI License: MIT PyPI - hindsight-client PyPI - hindsight-api PyPI - hindsight-all npm

Long-term memory for AI agents.

Why Hindsight?

AI assistants forget everything between sessions. Every conversation starts from zero—no context about who you are, what you've discussed, or what the memory bank has learned. This isn't just inconvenient; it fundamentally limits what AI memory banks can do.

The problem is harder than it looks:

  • Simple vector search isn't enough — "What did Alice do last spring?" requires temporal reasoning, not just semantic similarity
  • Facts get disconnected — Knowing "Alice works at Google" and "Google is in Mountain View" should let you answer "Where does Alice work?" even if you never stored that directly
  • Memory banks need opinions — A coding assistant that remembers "the user prefers functional programming" should weigh that when making recommendations
  • Context matters — The same information means different things to different memory banks with different personalities

Hindsight solves these problems with a memory system designed specifically for AI memory banks.

Quick Start

Get the full experience with the API and Control Plane UI:

export OPENAI_API_KEY=your-key
docker run -p 8888:8888 -p 9999:9999 \
  -e HINDSIGHT_API_LLM_PROVIDER=openai \
  -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \
  -e HINDSIGHT_API_LLM_MODEL=gpt-4o-mini \
  -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \
  ghcr.io/vectorize-io/hindsight

Then use the Python client:

pip install hindsight-client
from hindsight import HindsightClient

client = HindsightClient(base_url="http://localhost:8888")

# Store memories
client.retain(bank_id="my-agent", content="Alice works at Google as a software engineer")
client.retain(bank_id="my-agent", content="Alice mentioned she loves hiking in the mountains")

# Query with temporal reasoning
results = client.recall(bank_id="my-agent", query="What does Alice do for work?")

# Get a synthesized perspective
response = client.reflect(bank_id="my-agent", query="Tell me about Alice")
print(response.text)

Option 2: Embedded (no docker/server required)

For quick prototyping, run everything in-process:

pip install hindsight-all
export OPENAI_API_KEY=your-key
import os
from hindsight import HindsightServer, HindsightClient

with HindsightServer(llm_provider="openai", llm_model="gpt-4o-mini", llm_api_key=os.environ["OPENAI_API_KEY"]) as server:
    client = HindsightClient(base_url=server.url)

    client.retain(bank_id="my-user", content="User prefers functional programming")
    response = client.reflect(bank_id="my-user", query="What coding style should I use?")
    print(response.text)

Documentation

Full documentation: vectorize-io.github.io/hindsight

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

MIT