Skip to content

Add Hindsight plugin#57

Open
benfrank241 wants to merge 1 commit into
xai-org:mainfrom
benfrank241:add-hindsight-plugin
Open

Add Hindsight plugin#57
benfrank241 wants to merge 1 commit into
xai-org:mainfrom
benfrank241:add-hindsight-plugin

Conversation

@benfrank241

Copy link
Copy Markdown

Summary

Adds Hindsight to the marketplace — automatic long-term memory for Grok Build. Hindsight recalls relevant memories before each prompt, retains conversation transcripts, and exposes knowledge-page tools (recall, ingest, create/update/delete pages) through a bundled MCP server. It fills a gap in the catalog: there's no agent-memory plugin yet. Category memory.

cc @ykeremy

How it works

  • Source: type: local, vendored under external_plugins/hindsight/ — same shape as the merged neon entry (#18). The plugin's canonical home is a subdirectory of the vectorize-io/hindsight monorepo (hindsight-integrations/claude-code/), so a root-cloning url source can't target it; vendoring locally is the clean path, matching neon.
  • MCP server (hindsight, stdio): .mcp.json launches scripts/run_mcp.sh, which creates a per-plugin venv and pip installs mcp>=1.0.0 from the vendored requirements.txt (no curl|bash, no remote eval), then execs the local mcp_server.py.
  • Memory backend: the server talks to Hindsight's own hindsight-embed package, run via uvx hindsight-embed@latest and reached over localhost only (http://127.0.0.1:9077). Pinnable via HINDSIGHT_EMBED_VERSION in settings.json.
  • Hooks: four lifecycle hooks (SessionStart, UserPromptSubmit, Stop, SessionEnd) run local Python scripts to recall before prompts and retain transcripts after.
  • Skill: create-agent — scaffold a Hindsight-powered subagent with long-term memory.

Network & credentials (for security review)

  • Local daemon over loopback 127.0.0.1:9077 — no inbound, no external endpoint by default.
  • Optional outbound only when the user configures it: a chosen LLM provider (OpenAI/Anthropic/etc.) for fact extraction using the user's own env key, or an external Hindsight API URL set explicitly in config.
  • No reading of ~/.ssh/.env/tokens for exfiltration; hooks are scoped to lifecycle events; no obfuscated payloads. MIT licensed.

Changes

  • .grok-plugin/marketplace.json — Hindsight catalog entry (local source, homepage, keywords, domains).
  • .grok-plugin/plugin-index.json — regenerated; records the hindsight MCP server (stdio), 4 hooks, and the create-agent skill.
  • external_plugins/hindsight/** — vendored plugin (manifest, .mcp.json, hooks, scripts, skill, README, LICENSE).

Validation

```
python3 scripts/validate-catalog.py # Catalog OK
python3 scripts/generate-plugin-index.py --check # Plugin index OK
```

Both pass — the same two steps CI runs.

Note

The plugin uses \${CLAUDE_PLUGIN_ROOT} / \${CLAUDE_PLUGIN_DATA} (Claude-ecosystem convention, which this repo already accepts via .claude-plugin/ manifests). Happy to swap to \${GROK_PLUGIN_ROOT} if Grok Build expects that variable instead — just let me know.

@benfrank241 benfrank241 requested a review from a team June 24, 2026 16:12
Adds Hindsight — automatic long-term memory for Grok Build. Recalls
relevant memories before each prompt, retains conversation transcripts,
and exposes agent_knowledge_* tools via a bundled stdio MCP server.

Source: url pin to vectorize-io/hindsight-grok-plugin at a full commit
SHA, same shape as the other third-party entries. Category `memory`.

Changes:
- .grok-plugin/marketplace.json — Hindsight catalog entry (url source + SHA).
- .grok-plugin/plugin-index.json — regenerated; records the hindsight MCP
  server (stdio), 4 lifecycle hooks, and the create-agent skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benfrank241 benfrank241 force-pushed the add-hindsight-plugin branch from 0b127fe to 0c3080f Compare June 25, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant