Grok Bot Integration
Your Grok Bot remembers. Claude-mem captures what the agent does, compresses it, and injects it into later sessions.
No host hooks
Ingest is a transcript watcher on agent JSONL, not Cursor-style hooks.
CMEM Pro default
npx claude-mem install --ide grok-bot pre-selects CMEM Pro. --provider host is opt-in.Independent of Cursor
Install Grok Bot only, Cursor only, or both. Neither host requires the other.
MCP search
Search past sessions with the 3-layer memory tools.
This install path ships in claude-mem 13.24 (PR #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.How it works
Grok Bot has no session-start, file-read, or tool-use hooks. Claude-mem wires up four pieces instead:- Transcript watcher tails
agent-transcripts/*/*.jsonland stampsplatformSource=grok-bot. - Local worker stores sessions and serves search (default port
37700 + uid % 100on127.0.0.1). - Observer (CMEM Pro by default) — observation extraction runs off-plan through
https://cmem.ai/api/inference/v1with modelcmem-observer. Opt in to a host observer with--provider host(this Grok login over a local OpenAI-compatible loopback, no API key). - MCP exposes search to the bot (
search→timeline→get_observations).
--provider grok flag.
Install
CLI (Grok Bot only)
--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):
--provider also still accepts claude and gemini. Passing an explicit --provider skips the sign-in step.
Plugin store
Grok Bot’s plugin store is the Cursor catalog. Installclaude-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.
Observer and worker
--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).
XML contract (host observer)
When using--provider host, the worker parser only accepts three roots.
Idle / init / no tool results yet:
<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.
Using memory
At the start of a real task, call MCPsession_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 use
platformSource=grok-bot. When reading, do not drop Cursor (or other host) memories unless you asked for grok-only. See Search Tools.
Verify it worked
- Worker health: open
http://127.0.0.1:<worker-port>/api/health(port is in~/.claude-mem/.worker.portor settings). - Memory viewer: open the worker URL printed at install.
- Do a small unit of work in Grok Bot, then search. New observations should show
platformSource=grok-bot. - Default observer: first real observation stores via model
cmem-observer. Host observer: if the queue sits idle, the reply is probably prose instead ofskip_summary.
Troubleshooting
Nothing is being stored
- Confirm the worker is up and you did not restart a healthy one.
- CMEM Pro: check
/api/health(provider openrouter) and/api/sync/status. See CMEM Pro (manual / headless). - Host observer: confirm the reply is XML (
skip_summaryorobservation), and the shim is not on the worker port (macOS: worker 37777 → shim 37778).
npx claude-mem install --ide grok-bot is rejected
You are on npm 13.23.x or earlier. This host lands in 13.24 with PR #3842.
I also use Cursor
--ide is a single string. Run a second install for Cursor; do not stack --ide flags on one command:
npx claude-mem hook cursor …) and platformSource=cursor. Grok Bot still has no hooks. See Cursor Integration.
This is not Grok Build
The Grok Build CLI marketplace (xai-org/plugin-marketplace) is a different catalog. This page is Grok Bot only.
Next steps
- CMEM Pro (manual / headless) — default observer settings
- Search Tools — query project history
- Configuration — settings and environment variables
- Cursor Integration — if you also run Cursor

