mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
d7ff44b984
Clears the verify-generated-files drift: CI lints all integrations (LINT_ALL_INTEGRATIONS) and reformats these recently-added test files, which were committed without CI-mode formatting and so showed as drift on every PR.
hindsight-roo-code
Persistent long-term memory for Roo Code via Hindsight.
Run the installer once and every Roo Code session automatically recalls past context before tasks and retains learnings after.
What It Does
- Before each task — Roo Code recalls relevant memories from Hindsight and includes them as context
- During a task — agents can store important decisions and discoveries immediately via
retain - After each task — agents summarize and retain what was accomplished for future sessions
Prerequisites
✨ Recommended: Hindsight Cloud — sign up free, get an API key, and skip the self-hosting setup entirely.
Self-hosting alternative — run Hindsight locally:
pip install hindsight-all
export HINDSIGHT_API_LLM_API_KEY=your-openai-key
hindsight-api # starts on http://localhost:8888
Installation
pip install hindsight-roo-code
Then, from your project directory:
hindsight-roo-code install
Or with a custom API URL:
hindsight-roo-code install --api-url https://my-hindsight.example.com
Install globally (applies to all projects):
hindsight-roo-code install --global
This writes two files:
.roo/mcp.json— registers the Hindsight MCP server with Roo Code.roo/rules/hindsight-memory.md— rules injected into every system prompt
How It Works
New task starts
└─ Roo Code rules instruct agent to call recall
└─ Relevant memories injected into context
Agent working…
└─ retain stores decisions/discoveries immediately
Task ends
└─ Roo Code rules instruct agent to call retain with summary
└─ Summary stored for future sessions
Hindsight exposes recall and retain as MCP tools via its built-in /mcp endpoint. The rules file in .roo/rules/ tells Roo Code when to call them.
Configuration
The installer writes to .roo/mcp.json:
{
"mcpServers": {
"hindsight": {
"type": "streamable-http",
"url": "http://localhost:8888/mcp",
"timeout": 30,
"alwaysAllow": ["recall", "retain"]
}
}
}
To change the API URL after installation, edit .roo/mcp.json directly or re-run the installer:
hindsight-roo-code install --api-url https://new-url.example.com
Verifying Setup
- Start Hindsight (
hindsight-apior Hindsight Cloud) - Open Roo Code in your project
- Check Settings → MCP Servers —
hindsightshould show as connected - Start a task — you should see
recallcalled automatically
Development
uv sync
uv run pytest tests/ -v