Automatic long-term memory for the Zed editor's AI assistant via Hindsight
Project description
hindsight-zed
Long-term memory for the Zed editor's AI assistant, powered by Hindsight.
hindsight-zed init wires Zed's Agent Panel to the Hindsight MCP server and
adds a rule telling the agent to use it — so it recalls relevant memory at the
start of a task and retains durable facts as it goes. Recall happens at query
time against your actual message (no lag), and from your seat it's automatic.
How it works
Zed has no pre-prompt hook, but it does support two things this integration uses:
- MCP context servers — Zed runs MCP servers configured under
context_serversinsettings.jsonand exposes their tools in the Agent Panel. We register the Hindsight MCP server there, giving the agentrecall/retain/reflecttools. - A global instructions file (
~/.config/zed/AGENTS.md) that Zed includes in every conversation. We add a small rule there telling the agent to recall first and retain what it learns.
Zed doesn't yet have native HTTP-MCP transport, so the server is connected
through the mcp-remote stdio bridge
(run via npx) — that means you need Node.js installed.
Install
pip install hindsight-zed
hindsight-zed init --api-token YOUR_HINDSIGHT_API_KEY --bank-id my-memory
init adds the hindsight MCP server to ~/.config/zed/settings.json and the
recall/retain rule to ~/.config/zed/AGENTS.md. Restart Zed, open the Agent
Panel, and the hindsight server should show a green dot.
Use a Hindsight Cloud key, or point at a
self-hosted server with --api-url http://localhost:8888 (no token needed for an
open local server).
If your
settings.jsoncontains comments (JSONC),initwon't rewrite it — it prints the exactcontext_serversentry for you to paste instead. Usehindsight-zed init --print-onlyany time to see the snippet without writing.
Commands
| Command | Description |
|---|---|
hindsight-zed init |
Add the MCP server + recall/retain rule |
hindsight-zed status |
Show whether the server + rule are configured |
hindsight-zed uninstall |
Remove the server + rule |
hindsight-zed init --print-only |
Print the config to add manually |
What gets written
~/.config/zed/settings.json:
{
"context_servers": {
"hindsight": {
"source": "custom",
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://api.hindsight.vectorize.io/mcp/my-memory/",
"--header", "Authorization: Bearer YOUR_HINDSIGHT_API_KEY"
]
}
}
}
~/.config/zed/AGENTS.md (inside a fenced <!-- HINDSIGHT --> block that leaves
the rest of the file untouched): a short rule telling the agent to recall at
the start of each task and retain durable facts.
Configuration
| Setting | Env var | Default |
|---|---|---|
| API URL | HINDSIGHT_API_URL |
https://api.hindsight.vectorize.io |
| API token | HINDSIGHT_API_TOKEN |
(none; required for Cloud) |
| Bank id | HINDSIGHT_ZED_BANK_ID |
zed |
These can also live in ~/.hindsight/zed.json (written by init).
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_zed-0.1.0.tar.gz.
File metadata
- Download URL: hindsight_zed-0.1.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdf1a6ce6cf59b1c6048670eac41978c784d1ccabc26ad041346589b6b782dc2
|
|
| MD5 |
bb5537bf30078f611b3b0df6fc3612c4
|
|
| BLAKE2b-256 |
477a1bc87e8c6440ddd0b32a0e084ecaa684bec34b60284bee702aa8cbdd51e9
|
Provenance
The following attestation bundles were made for hindsight_zed-0.1.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_zed-0.1.0.tar.gz -
Subject digest:
bdf1a6ce6cf59b1c6048670eac41978c784d1ccabc26ad041346589b6b782dc2 - Sigstore transparency entry: 1853502095
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@b8cfddd7b63d33e4146da734c0f28a8e76bad53e -
Branch / Tag:
refs/tags/integrations/zed/v0.1.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@b8cfddd7b63d33e4146da734c0f28a8e76bad53e -
Trigger Event:
push
-
Statement type:
File details
Details for the file hindsight_zed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hindsight_zed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.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 |
883c4b400b36c067f0f72e59cd914990f6d8be3a058637e511cb44cac0bb37ab
|
|
| MD5 |
b952635f797fc4c87b279ff7ae9bdb9d
|
|
| BLAKE2b-256 |
38480d74ff946d0102a378d6f59b5567010bf496b7b5abcebd290c2102bc943d
|
Provenance
The following attestation bundles were made for hindsight_zed-0.1.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_zed-0.1.0-py3-none-any.whl -
Subject digest:
883c4b400b36c067f0f72e59cd914990f6d8be3a058637e511cb44cac0bb37ab - Sigstore transparency entry: 1853502124
- Sigstore integration time:
-
Permalink:
vectorize-io/hindsight@b8cfddd7b63d33e4146da734c0f28a8e76bad53e -
Branch / Tag:
refs/tags/integrations/zed/v0.1.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@b8cfddd7b63d33e4146da734c0f28a8e76bad53e -
Trigger Event:
push
-
Statement type: