mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
6f2799569f
* docs: link every integration changelog from its doc page The release script has written a changelog page per integration since 0.4.20 (src/pages/changelog/integrations/<slug>.md), but nothing reliably linked them: 16 of 61 doc pages carried a "View Changelog" link, and the only index was a hand-written table at the bottom of /changelog listing 6 of the 48 pages, stale since the release that introduced them. coding-agents was one of the 31 pages with a changelog nobody could reach except by guessing the URL. Adds the link to the 30 pages missing one, plus a third invariant in check-integrations.mjs so the next one can't ship unlinked: every changelog page whose integration has a gallery entry must be linked from its doc page. coding-agents.md is generated, so its link goes in the README as an absolute hindsight.vectorize.io URL — the sync script rewrites our own absolute URLs to site-relative, so it resolves on npm, GitHub and the docs site. It sits outside the skill:begin regions, so SKILL.md is unchanged. Claude-Session: https://claude.ai/code/session_01DNWFQn8AUN6SApcswHG3aN * docs(integrations): compact grouped gallery with Docs/Changelog buttons The Integrations Hub listed 60 three-line cards with a repeated "Hindsight Team" byline and an OFFICIAL badge on 52 of them, running 6092px tall — scanning it meant scrolling past what you came for. Cards are now a compact row (icon, name, two-line description) grouped by category, with the featured three using the same row tinted rather than a second card design: 4352px, and the shape of the catalogue is visible at a glance. Each card carries Docs and Changelog buttons. Which integrations have a changelog comes from a new build-time plugin that indexes src/pages/changelog/integrations/*.md and joins integrations.json on the link slug (vercel-ai-sdk -> /sdks/integrations/ai-sdk -> ai-sdk.md), so an integration grows the button on its first release with nothing to update by hand. The card is a <div> now — nested anchors are invalid — so the name and the pills are the links, not the whole card. /changelog's first line points here instead of carrying its own listing. Also drops the 14 CSS classes the old card owned, and shares CATEGORY_LABELS / groupByCategory from src/lib/integrations.ts so the taxonomy has one definition. Claude-Session: https://claude.ai/code/session_01DNWFQn8AUN6SApcswHG3aN
132 lines
3.8 KiB
Markdown
132 lines
3.8 KiB
Markdown
---
|
|
sidebar_position: 20
|
|
title: "Roo Code Persistent Memory with Hindsight | Integration"
|
|
description: "Add persistent long-term memory to Roo Code via Hindsight MCP. Auto-recalls relevant context before each task and retains learnings after — so every session builds on the last."
|
|
---
|
|
|
|
# Roo Code
|
|
|
|
Persistent long-term memory for [Roo Code](https://github.com/RooVetGit/Roo-Code) via [Hindsight](https://vectorize.io/hindsight). A one-command installer registers Hindsight's MCP server and injects custom rules that teach Roo to recall context before tasks and retain learnings after.
|
|
|
|
[View Changelog →](/changelog/integrations/roo-code)
|
|
|
|
## Quick Start
|
|
|
|
:::tip Hindsight Cloud (recommended)
|
|
[Sign up free](https://ui.hindsight.vectorize.io/signup) — get an API key instantly, no infrastructure to run.
|
|
:::
|
|
|
|
```bash
|
|
# Install the CLI
|
|
pip install hindsight-roo-code
|
|
|
|
# Install the integration into your project (defaults to Hindsight Cloud)
|
|
hindsight-roo-code install
|
|
|
|
# Restart Roo Code — memory is active
|
|
```
|
|
|
|
**Self-hosting alternative:**
|
|
|
|
```bash
|
|
# Start Hindsight locally first
|
|
pip install hindsight-all
|
|
export HINDSIGHT_API_LLM_API_KEY=your-openai-key
|
|
hindsight-api
|
|
|
|
# Then install with the local URL
|
|
hindsight-roo-code install --api-url http://localhost:8888
|
|
```
|
|
|
|
## How It Works
|
|
|
|
Roo Code has two primary extensibility mechanisms: **MCP servers** for tools and **custom rules** for system-prompt injection. This integration uses both.
|
|
|
|
```
|
|
New task starts
|
|
└─ Rules file instructs Roo to call recall
|
|
└─ Relevant memories injected into context automatically
|
|
|
|
Agent working…
|
|
└─ Agent calls retain for significant decisions/discoveries
|
|
|
|
Task ends
|
|
└─ Rules file instructs Roo to call retain with a summary
|
|
└─ Summary stored for future sessions
|
|
```
|
|
|
|
The installer writes:
|
|
- **`.roo/mcp.json`** — registers Hindsight's `/mcp` endpoint as an MCP server, with `recall` and `retain` auto-approved
|
|
- **`.roo/rules/hindsight-memory.md`** — instructions injected into every Roo system prompt
|
|
|
|
## Installation Options
|
|
|
|
### Project-local install (default)
|
|
|
|
Writes to `.roo/` in the current directory — memory is scoped to this project:
|
|
|
|
```bash
|
|
hindsight-roo-code install
|
|
hindsight-roo-code install --api-url https://api.hindsight.vectorize.io # default (Hindsight Cloud)
|
|
hindsight-roo-code install --api-url http://localhost:8888 # self-hosted
|
|
hindsight-roo-code install --project-dir /path/to/project
|
|
```
|
|
|
|
### Global install
|
|
|
|
Writes to `~/.roo/` — applies to all projects:
|
|
|
|
```bash
|
|
hindsight-roo-code install --global
|
|
```
|
|
|
|
## Configuration
|
|
|
|
The MCP entry written to `.roo/mcp.json`:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"hindsight": {
|
|
"type": "streamable-http",
|
|
"url": "http://localhost:8888/mcp",
|
|
"timeout": 30,
|
|
"alwaysAllow": ["recall", "retain"]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
To update the API URL after installation, re-run the installer or edit `.roo/mcp.json` directly.
|
|
|
|
## MCP Tools
|
|
|
|
Hindsight exposes two tools via its `/mcp` endpoint:
|
|
|
|
| Tool | Description |
|
|
|------|-------------|
|
|
| `recall` | Search memory for context relevant to a query |
|
|
| `retain` | Store content in memory immediately |
|
|
|
|
The rules file instructs Roo to call these automatically at task start and end. Agents can also call them explicitly mid-task.
|
|
|
|
## Verifying Setup
|
|
|
|
1. Start Hindsight and run the installer
|
|
2. Open Roo Code in your project
|
|
3. Check **Settings → MCP Servers** — `hindsight` should show as connected
|
|
4. Start a task — you should see `recall` invoked in the tool call log
|
|
|
|
## Prerequisites
|
|
|
|
A running Hindsight instance:
|
|
|
|
**Hindsight Cloud (recommended):** [Sign up](https://ui.hindsight.vectorize.io/signup) — no self-hosting required.
|
|
|
|
**Self-hosted:**
|
|
```bash
|
|
pip install hindsight-all
|
|
export HINDSIGHT_API_LLM_API_KEY=your-api-key
|
|
hindsight-api # starts on http://localhost:8888
|
|
```
|