docs/public/grok-bot/index.mdx
<CardGroup cols={2}> <Card title="No host hooks" icon="ban"> Ingest is a transcript watcher on agent JSONL, not Cursor-style hooks. </Card> <Card title="CMEM Pro default" icon="cloud"> `npx claude-mem install --ide grok-bot` pre-selects CMEM Pro. `--provider host` is opt-in. </Card> <Card title="Independent of Cursor" icon="puzzle-piece"> Install Grok Bot only, Cursor only, or both. Neither host requires the other. </Card> <Card title="MCP search" icon="magnifying-glass"> Search past sessions with the 3-layer memory tools. </Card> </CardGroup> <Info> This install path ships in **claude-mem 13.24** ([PR #3842](https://github.com/thedotmack/claude-mem/pull/3842)). npm 13.23.x does not yet accept `--ide grok-bot`. Grok Bot is **not** Grok Build CLI. Plugin id: **`claude-mem-grok-bot`**. </Info>Your Grok Bot remembers. Claude-mem captures what the agent does, compresses it, and injects it into later sessions.
Grok Bot has no session-start, file-read, or tool-use hooks. Claude-mem wires up four pieces instead:
agent-transcripts/*/*.jsonl and stamps platformSource=grok-bot.37700 + uid % 100 on 127.0.0.1).https://cmem.ai/api/inference/v1 with model cmem-observer. Opt in to a host observer with --provider host (this Grok login over a local OpenAI-compatible loopback, no API key).search → timeline → get_observations).Do not install Claude CLI for this host. Do not pass an xAI API key. There is no --provider grok flag.
npx claude-mem install --ide grok-bot
That starts a local worker with CMEM Pro as the observer (pre-selected). Local host-login observer is opt-in:
npx claude-mem install --ide grok-bot --provider host
--ide takes a single host. To also wire Cursor, run a second install (do not pass --ide twice on one command — only the last value is kept):
npx claude-mem install --ide cursor
Other options:
# Remote worker
npx claude-mem install --ide grok-bot --runtime server --server-url https://YOUR_HOST
# Remote observer (cmem.ai or any OpenAI-compatible URL)
npx claude-mem install --ide grok-bot --provider openrouter
--provider also still accepts claude and gemini. Passing an explicit --provider skips the sign-in step.
Grok Bot's plugin store is the Cursor catalog. Install claude-mem-grok-bot from there when the listing is live (submitted at cursor.com/marketplace/publish after 13.24 lands). The listing does not install Cursor.
After the plugin is installed, still run the CLI above for a local worker, or set CLAUDE_MEM_MCP_TOKEN for remote MCP.
| Piece | Default | Opt-in / remote |
|---|---|---|
| Worker | npx claude-mem install --ide grok-bot | --runtime server --server-url |
| Observer | CMEM Pro (cmem-observer at https://cmem.ai/api/inference/v1) | --provider host (loopback, logged-in Grok Bot, no API key) or --provider openrouter |
| MCP | npx -y claude-mem mcp | https://cmem.ai/api/mcp with Authorization: Bearer ${CLAUDE_MEM_MCP_TOKEN} |
--provider host is an OpenRouter-shaped loopback: CLAUDE_MEM_OPENROUTER_BASE_URL=http://127.0.0.1:<shim>/v1 plus a dummy non-empty API key. You do not configure that by hand.
Port rule: the observer shim must not bind the worker port. The worker is often 37700 + (uid % 100). On macOS it is often 37777 — if that port is taken, the shim uses 37778 (or CLAUDE_MEM_HOST_OBSERVER_PORT).
Never restart a healthy worker. The observation queue is in RAM and a restart drops it.
Host-observer idle replies must be skip_summary XML; a finished unit is one observation. Prose like "still observing" drops the batch (issue #2485).
When using --provider host, the worker parser only accepts three roots.
Idle / init / no tool results yet:
<skip_summary reason="noise" />
Finished searchable unit: one <observation> covering the whole pile — real title, 4–10 facts with paths, a short narrative. Never title with a tool name. Do not mix skip_summary and <observation>. Timeouts must return skip_summary XML, not an HTTP 504.
At the start of a real task, call MCP session_start_context for the project with platformSource grok-bot.
Then the 3-layer search:
search — compact index with IDstimeline — context around a hitget_observations — full details only for the IDs you will useWrites from this host stamp platformSource=grok-bot. When reading, do not drop Cursor (or other host) memories unless you asked for grok-only. See Search Tools.
http://127.0.0.1:<worker-port>/api/health (port is in ~/.claude-mem/.worker.port or settings).platformSource=grok-bot.cmem-observer. Host observer: if the queue sits idle, the reply is probably prose instead of skip_summary./api/health (provider openrouter) and /api/sync/status. See CMEM Pro (manual / headless).skip_summary or observation), and the shim is not on the worker port (macOS: worker 37777 → shim 37778).npx claude-mem install --ide grok-bot is rejectedYou are on npm 13.23.x or earlier. This host lands in 13.24 with PR #3842.
--ide is a single string. Run a second install for Cursor; do not stack --ide flags on one command:
npx claude-mem install --ide grok-bot
npx claude-mem install --ide cursor
Cursor uses hooks (npx claude-mem hook cursor …) and platformSource=cursor. Grok Bot still has no hooks. See Cursor Integration.
The Grok Build CLI marketplace (xai-org/plugin-marketplace) is a different catalog. This page is Grok Bot only.