Devin Desktop (formerly Windsurf) integration for Hindsight - persistent long-term memory via MCP
Project description
hindsight-devin-desktop
Long-term memory for Devin Desktop (the editor formerly known as Windsurf / Codeium), powered by Hindsight.
hindsight-devin-desktop init wires the Hindsight MCP server into Devin
Desktop and adds always-on recall/retain rules, so the agent has recall /
retain / reflect tools and — guided by the rules — recalls relevant memory at
the start of a task and retains durable facts as it works.
Note: Cognition rebranded Windsurf to Devin Desktop (June 2026). This integration configures both agents Devin Desktop ships (see below), so memory works whichever one you use.
Two agents, both covered
Devin Desktop runs two agents with separate configuration, so init wires
each:
| Cascade (legacy Windsurf agent) | Devin Local (the successor agent) | |
|---|---|---|
| MCP server | ~/.codeium/windsurf/mcp_config.json (serverUrl) |
~/.config/devin/config.json (url + transport + headers) |
| Tool approval | automatic | pre-seeded allow-rule (mcp__hindsight__*) so tools don't prompt |
| Per-project rule | .devin/rules/hindsight.md |
repo-root AGENTS.md |
| Global rule | ~/.codeium/windsurf/memories/global_rules.md |
~/.config/devin/AGENTS.md |
| Auto-recall | — (rule-driven) | SessionStart hook injects memory deterministically |
| Retain nudge | — | Stop hook forces a retain pass before the session ends |
| Visibility | post_mcp_tool_use banner (hooks.json) |
native tool cards + rule narration |
Configuring one agent does not surface the server in the other, so the
integration writes both. All the file edits are surgical — dedicated files, or a
fenced managed block inside shared files (AGENTS.md, global_rules.md,
hooks.json). Paths above are macOS/Linux; on Windows the Devin Local config
lives under %APPDATA%\devin\ (Cascade stays under ~/.codeium/windsurf\).
Hooks (Devin Local) — deterministic memory, always visible
The MCP tools + rules are model-driven — the agent recalls/retains because the
rule tells it to. For Devin Local, init also adds two hooks (opt out of both
with --no-hooks):
SessionStartauto-recall — recalls project + global memory and injects it into the agent's context at the start of every session, so relevant memory loads even if the model forgets to callrecall. It always reports status (loaded N / empty / unavailable) so memory use is never silent, and never blocks a session.Stopretain-nudge — before the agent stops, it forces one retain pass (the model decides what is durable and callsretain). Loop-guarded. Costs one extra turn per session; opt out with--no-retain-hook.
Why not fully-automatic retain? Devin's hooks can't hand a script the
conversation transcript, so a hook can't summarize-and-retain on its own — the
nudge is the closest deterministic option (guaranteed trigger, model authors
the content). Cascade can't do either hook (its hooks can't inject context), so
recall/retain there stay model-driven — but init adds a post_mcp_tool_use
banner (show_output) so Cascade visibly shows every 🧠 Hindsight: <tool> used.
Two-tier memory: global + per-project
Memory is split across two Hindsight banks (isolated memory scopes), so work on one repo never bleeds into another:
- Global bank (
devin-desktop) — your cross-project memory: preferences, coding style, who you are. Shared across every project. - Project bank (
devin-desktop-<slug>) — this repository's memory: architecture, decisions, conventions. The<slug>is derived from the repo's git remote, so it's stable across machines and identical for teammates.
The MCP server runs in multi-bank mode (a single endpoint ending in /mcp/),
and the always-on rule tells the agent which bank_id to use — recall both banks
at task start, retain project facts to the project bank and user facts to the
global bank. An X-Bank-Id header names the global bank as the default.
Opting out of the shared layer (--no-global-bank)
If you'd rather your preferences not follow you across repos, pass
--no-global-bank (local-only mode): everything — project facts and your
preferences — stays in that repo's project bank, nothing is shared, and the
global rule files aren't written. Good for keeping work and personal machines
separate, or when a shared profile isn't wanted.
Install
pip install hindsight-devin-desktop
cd your-project
hindsight-devin-desktop init --api-token YOUR_HINDSIGHT_API_KEY
init (run inside a repo) derives the project bank from your git remote and
wires both agents: the MCP server entries, the per-project rules (commit
./.devin/rules/hindsight.md and ./AGENTS.md so teammates share the project
bank), and the global rules. Then activate the server in whichever agent you
use (config isn't hot-reloaded):
- Cascade — open the MCP panel and press Refresh.
- Devin Local — open the Devin MCP Marketplace, find
hindsightunder Installed, and click Connect.
The hindsight tools then load and are used automatically. (Not sure which agent
you're on? Check the agent selector in the bottom-right of Devin Desktop.)
Verify it's working
Start a session and you'll see memory is on — nothing is silent:
- Devin Local — the reply opens with a status line like
🧠 Hindsight preloaded 3 memories for this session(orno memory yet, or⚠️ memory unavailable this session). Every hook run is also logged to~/.hindsight/devin-hook.log, so you can confirm the recall/retain hooks fired. - Cascade — each
recall/retainshows as a tool card, and expanding thepost-tool hooksline reveals the🧠 Hindsight: <tool> usedbanner. hindsight-devin-desktop statuslists every component as installed for both agents, and the banks it resolved.
Use a Hindsight Cloud key, or a self-hosted
server with --api-url http://localhost:8888 (no token needed for an open local
server). Pass --bank-id <id> to set the project bank explicitly, or
--global-bank <id> to change the cross-project bank. Run
hindsight-devin-desktop init --print-only to see everything it would write
without touching a file.
Commands
| Command | Description |
|---|---|
hindsight-devin-desktop init |
Wire both agents' MCP server + memory rules (derives the project bank) |
hindsight-devin-desktop status |
Show resolved banks + whether each agent is configured |
hindsight-devin-desktop uninstall |
Remove the MCP server + memory rules from both agents |
Configuration
| Setting | Env var | Default |
|---|---|---|
| API URL | HINDSIGHT_API_URL |
https://api.hindsight.vectorize.io |
| API token | HINDSIGHT_API_TOKEN |
(none; required for Cloud) |
| Global bank | HINDSIGHT_DEVIN_DESKTOP_GLOBAL_BANK |
devin-desktop |
| Project bank | HINDSIGHT_DEVIN_DESKTOP_BANK_ID |
(derived from git remote) |
Development
uv sync
uv run pytest tests -v -m 'not requires_real_llm' # deterministic suite
uv run pytest tests -v -m requires_real_llm # gated MCP-endpoint check
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hindsight_devin_desktop-0.2.0.tar.gz.
File metadata
- Download URL: hindsight_devin_desktop-0.2.0.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dba8ba174197b9b1af7a74440b81c8030a44123997d68aab5027a742677b8a5a
|
|
| MD5 |
3badd3c80b3e6b9f22c204fc98c7826a
|
|
| BLAKE2b-256 |
1b4ec34c9d79b365cc55f6ac895d9dfdb1c67cb870bad288dab0a8dba46e513e
|
Provenance
The following attestation bundles were made for hindsight_devin_desktop-0.2.0.tar.gz:
Publisher:
release-integration.yml on vectorize-io/hindsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_devin_desktop-0.2.0.tar.gz -
Subject digest:
dba8ba174197b9b1af7a74440b81c8030a44123997d68aab5027a742677b8a5a - Sigstore transparency entry: 2165375377
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@b6c7b2a2e94d5e6ea6aad4c3de8913d7059f0c58 -
Branch / Tag:
refs/tags/integrations/devin-desktop/v0.2.0 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@b6c7b2a2e94d5e6ea6aad4c3de8913d7059f0c58 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hindsight_devin_desktop-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hindsight_devin_desktop-0.2.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c219c9d470e25d49c36d28c28dddfeb267ee2621960325e7e754d059533c95b
|
|
| MD5 |
ff84ef91d70a7b7e5e8afd6babaea1c9
|
|
| BLAKE2b-256 |
e246d37a6e689588125d6c9703085320520ca36d5228b74c40a9ef46063c8688
|
Provenance
The following attestation bundles were made for hindsight_devin_desktop-0.2.0-py3-none-any.whl:
Publisher:
release-integration.yml on vectorize-io/hindsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hindsight_devin_desktop-0.2.0-py3-none-any.whl -
Subject digest:
5c219c9d470e25d49c36d28c28dddfeb267ee2621960325e7e754d059533c95b - Sigstore transparency entry: 2165375381
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@b6c7b2a2e94d5e6ea6aad4c3de8913d7059f0c58 -
Branch / Tag:
refs/tags/integrations/devin-desktop/v0.2.0 - Owner: https://github.com/vectorize-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-integration.yml@b6c7b2a2e94d5e6ea6aad4c3de8913d7059f0c58 -
Trigger Event:
push
-
Statement type: