Grok memory
What xAI says about Grok’s memory across chats, Private Chat and deleting your history, and how Dray shares your grok.com chats with your other assistants.
Coding agents Facts checked 12 October 2026
Grok Build loads rules such as AGENTS.md into every session and saves each conversation on your computer. Its memory across sessions is experimental and off by default. Dray saves each turn to your Dray account, where every agent you connect can search it.
~/.grok/, then every folder from the repo root down to your working folder, and deeper files win when rules conflict. xAI docs: project rulesAGENTS.md, AGENT.md, CLAUDE.md, CLAUDE.local.md and the Markdown files in .grok/rules/, and it reads .claude/rules/ and .cursor/rules/ too. Gitignored files are skipped, and files load in full with no size cap. xAI docs: project rulesgrok inspect lists the rules files in use, and --rules adds rules for one run. xAI docs: project rules--experimental-memory, the GROK_MEMORY variable or [memory] enabled turns it on, and --no-memory turns it off for one session. xAI docs: CLI reference xAI docs: settings/remember <note> saves a memory note, /memory browses your memories and /dream runs memory consolidation. grok memory clear removes the memory files. xAI docs: commands xAI docs: CLI reference[compat.claude] and [compat.cursor]). xAI docs: settings~/.grok/sessions/ by working folder. It works the same in the terminal app, headless mode and ACP. xAI docs: sessions/resume opens a picker, and grok --resume or grok -c picks up the latest session for the folder. grok sessions list, search and delete manage them, and grok export <id> writes one as Markdown. xAI docs: sessionsgrok import brings in sessions from Claude Code. xAI docs: CLI referencedray images is on. Dray: connectdray tokens on. On your computer, it outlines big files before Grok Build reads them. Grok Build can still read the full file. It can’t overwrite one it has only seen in outline until it has read all of it. Images stay as they are. Dray: connect~/.grok/skills: /link links this chat with your other chats, /link CODE joins a link another chat made, /unlink leaves it, and /dray-status checks what Dray has saved. Dray: connect
Watch Grok Build setupOne command sets up Grok Build and the other agents it finds on your computer. It needs Node.js 18 or later on macOS or Linux, and no Chrome extension.
curl -fsSL https://api.withdray.com/cli/install.sh | sh~/.grok/hooks/, Dray’s memory tools in ~/.grok/config.toml and Dray’s instructions in ~/.grok/AGENTS.md. It offers to import the last 30 days of your Grok Build sessions.To set up Grok Build on its own, or add it later:
dray setup --agents grokIf you connected Dray to Grok on grok.com, Grok Build already has it: type /mcps and it’s listed as Dray (managed). Otherwise run: Dray: connect
grok mcp add --transport http dray https://mcp.withdray.com/mcpThen type /mcps inside Grok Build, select dray and press i to sign in. Connecting this way does not save your sessions.
Facts checked on 12 October 2026 against these pages.