* 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
7.6 KiB
sidebar_position, title, description
| sidebar_position | title | description |
|---|---|---|
| 40 | ZCode Persistent Memory with Hindsight | Integration Guide | Add persistent long-term memory to ZCode (Z.ai's GLM desktop coding agent) with Hindsight. Python hooks automatically recall context before each prompt and retain conversations — no MCP, no workflow changes. |
ZCode
Persistent memory for ZCode — Z.ai's GLM desktop coding agent — using Hindsight. ZCode embeds the Claude Code agent runtime, so Python hook scripts automatically recall relevant context before each prompt and retain conversations after each turn. No MCP server, no changes to your ZCode workflow.
Quick Start
:::tip Recommended: Hindsight Cloud Sign up free for a Hindsight Cloud API key — no self-hosting, no local daemon to manage. :::
# Install the CLI
pip install hindsight-zcode
# Install the hooks (defaults to Hindsight Cloud)
hindsight-zcode install --api-url https://api.hindsight.vectorize.io --api-token your-api-key
# Restart ZCode — memory is live
The installer copies the hook scripts to ~/.zcode/hooks/hindsight/, registers them in ~/.zcode/cli/config.json (merged with any existing hooks), and creates ~/.hindsight/zcode.json for your personal config. It never touches your Claude Code config at ~/.claude/settings.json.
Self-hosting alternative — connect to a local hindsight-embed daemon by omitting the flags:
hindsight-zcode install
To uninstall:
hindsight-zcode uninstall
Alternative: install as a ZCode plugin
ZCode can install Hindsight directly from a plugin marketplace — no pip step. The same hook scripts ship as a hooks-only Claude Code plugin (hindsight-zcode) in the Hindsight marketplace:
# In ZCode: add the Hindsight marketplace, then install the plugin
zcode plugins add-marketplace vectorize-io/hindsight
zcode plugins install hindsight-zcode
When installed this way, ZCode registers the hooks automatically (no config-file edit). Provide your Hindsight credentials via environment variables (HINDSIGHT_API_URL, HINDSIGHT_API_TOKEN) or by creating ~/.hindsight/zcode.json:
{
"hindsightApiUrl": "https://api.hindsight.vectorize.io",
"hindsightApiToken": "hsk_your_token"
}
Features
- Auto-recall — before each prompt, queries Hindsight for relevant memories and injects them as additional context (visible to the model, not the transcript)
- Auto-retain — after each response, stores the turn to Hindsight for future recall
- No MCP required — plain Python hook scripts calling Hindsight's REST API; nothing to run alongside ZCode
- Cross-tool memory — the same Hindsight bank is shared across Claude Code, Cursor, and other Hindsight integrations, so memory follows you between tools
- Dynamic bank IDs — supports per-project memory isolation based on the working directory
- Zero runtime dependencies — the hook scripts are pure Python stdlib; the
pip installonly ships the one-time installer
Architecture
ZCode embeds the Claude Code agent runtime and reads the standard Claude Code hook schema from its own config namespace, ~/.zcode/cli/config.json (with hooks.enabled: true). The plugin wires three hook events:
| Hook | Event | Purpose |
|---|---|---|
session_start.py |
SessionStart |
Warm up — verify Hindsight is reachable |
recall.py |
UserPromptSubmit |
Auto-recall — query memories, inject as additionalContext |
retain.py |
Stop |
Auto-retain — assemble the turn, POST to Hindsight |
On UserPromptSubmit, the hook reads the prompt, queries Hindsight for the most relevant memories, and emits a context block that ZCode injects before sending the turn to the model:
<hindsight_memories>
Relevant memories from past conversations...
Current time - 2026-03-27 09:14
- Project uses FastAPI with asyncpg — not SQLAlchemy [world] (2026-03-26)
- Preferred testing framework: pytest with pytest-asyncio [experience] (2026-03-26)
</hindsight_memories>
On Stop, the hook pairs the user prompt (captured at UserPromptSubmit) with the agent's response and POSTs the turn to Hindsight. ZCode does not provide a SessionEnd hook event, so retention rides Stop — every turn is stored as it completes.
Connection Modes
1. External API (recommended)
Connect to a running Hindsight server (cloud or self-hosted) via ~/.hindsight/zcode.json:
{
"hindsightApiUrl": "https://api.hindsight.vectorize.io",
"hindsightApiToken": "hsk_your_token"
}
2. Local Daemon
Run hindsight-embed locally. The session_start.py hook detects it on apiPort (default 9077). The daemon is not auto-started by the plugin — start it separately:
uvx hindsight-embed
Then leave hindsightApiUrl empty in your config and the plugin connects to http://localhost:9077.
Configuration
Default config ships in ~/.zcode/hooks/hindsight/settings.json. For personal overrides that survive updates, create ~/.hindsight/zcode.json. Most settings can also be overridden via environment variable.
Loading order (later entries win):
- Built-in defaults
- Plugin
settings.json(at~/.zcode/hooks/hindsight/settings.json) - User config (
~/.hindsight/zcode.json) - Environment variables
Connection
| Setting | Env Var | Default | Description |
|---|---|---|---|
hindsightApiUrl |
HINDSIGHT_API_URL |
"" |
URL of the Hindsight API server. Empty = local daemon. |
hindsightApiToken |
HINDSIGHT_API_TOKEN |
null |
API token for authentication. Required for Hindsight Cloud. |
apiPort |
HINDSIGHT_API_PORT |
9077 |
Port for the local hindsight-embed daemon. |
Memory Bank
| Setting | Env Var | Default | Description |
|---|---|---|---|
bankId |
HINDSIGHT_BANK_ID |
"zcode" |
The bank to read from and write to. All sessions share this bank unless dynamicBankId is enabled. |
bankMission |
HINDSIGHT_BANK_MISSION |
coding assistant prompt | Describes the agent's purpose. Sent when creating or updating the bank. |
dynamicBankId |
HINDSIGHT_DYNAMIC_BANK_ID |
false |
When true, derives a unique bank ID from dynamicBankGranularity fields — useful for per-project isolation. |
agentName |
HINDSIGHT_AGENT_NAME |
"zcode" |
Agent name used in dynamic bank ID derivation. |
Auto-Recall
| Setting | Env Var | Default | Description |
|---|---|---|---|
autoRecall |
HINDSIGHT_AUTO_RECALL |
true |
Master switch for auto-recall. |
recallBudget |
HINDSIGHT_RECALL_BUDGET |
"mid" |
Search depth: "low" (fast), "mid" (balanced), "high" (thorough). |
recallMaxTokens |
HINDSIGHT_RECALL_MAX_TOKENS |
1024 |
Token budget for the injected memory block. |
Auto-Retain
| Setting | Env Var | Default | Description |
|---|---|---|---|
autoRetain |
HINDSIGHT_AUTO_RETAIN |
true |
Master switch for auto-retain. |
retainEveryNTurns |
HINDSIGHT_RETAIN_EVERY_N_TURNS |
1 |
Retain every N turns. Default 1 stores every turn on Stop. |
Relationship to ZCode's built-in memory
ZCode ships its own local, per-project memory (~/.zcode/cli/memories/). Hindsight is complementary: it stores memory in a cloud (or self-hosted) bank that is shared across tools — the same bank powers Claude Code, Cursor, and other Hindsight integrations — so your context follows you between agents and machines rather than staying local to one ZCode project.