> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Build

> Give xAI's Grok Build coding agent persistent, cross-session memory with the Memanto plugin.

# Grok Build + Memanto

<img src="https://unpkg.com/@lobehub/icons-static-svg@latest/icons/grok.svg" alt="Grok Build" width="64" style={{marginBottom: "1.5rem"}} />

Connect [Grok Build](https://docs.x.ai/build), xAI's coding agent, to Memanto so it can store decisions, preferences, and corrections and recall them across sessions.

Grok Build reads Claude Code marketplaces, plugins, skills, agents, and hooks alongside its own `.grok/` directory, so it uses the same **[Memanto plugin](https://github.com/moorcheh-ai/claude-memanto)** as [Claude Code](/integrations/claude-code) — no separate package.

## Quick Start

<Steps>
  <Step title="Install the plugin">
    Add the Memanto marketplace and install the plugin:

    ```bash theme={null}
    claude plugin marketplace add moorcheh-ai/claude-memanto
    claude plugin install memanto@moorcheh-ai
    ```

    Grok Build picks up the installed plugin automatically. Or load it from a local checkout:

    ```bash theme={null}
    git clone https://github.com/moorcheh-ai/claude-memanto.git
    grok --plugin-dir ./claude-memanto
    ```
  </Step>

  <Step title="Install and configure the Memanto CLI">
    ```bash theme={null}
    pip install memanto   # Python 3.10+
    memanto               # interactive setup — writes your key to ~/.memanto/.env
    ```

    Get a free API key at [console.moorcheh.ai](https://console.moorcheh.ai), or export it yourself with `export MOORCHEH_API_KEY="..."`. You can also run [on-prem](/on-prem/quickstart) with no key at all.
  </Step>

  <Step title="Create an agent for your project">
    ```bash theme={null}
    memanto agent create my-project   # creates and activates the agent
    memanto status                    # confirm it is wired up
    ```
  </Step>

  <Step title="Start Grok Build">
    ```bash theme={null}
    grok
    ```
  </Step>
</Steps>

## Features

* **Memory on its own** — the `memanto` skill loads when you state a decision worth keeping or ask what was decided earlier.
* **Always-current `MEMORY.md`** — synced when a session starts, and again before compaction.
* **Readable transcript** — memory operations are summarized in plain English.
* **`memory-scout` subagent** — gathers deep background from memory before substantial work.
* **Memory commands** — `quickstart`, `remember`, `recall`, `answer`, `capture`, `forget`, `upload`, `conflicts`, `sync`, `session`, and `status`.

Once installed, just talk to Grok:

> "Remember that we decided to use React for the frontend"
>
> "What do you remember about our authentication approach?"
>
> "Use memory-scout to get background before we touch the auth module"

## Architecture

The plugin integrates through lifecycle hooks, skills, a subagent, and commands:

| Component                  | Trigger                             | Function                                                               |
| -------------------------- | ----------------------------------- | ---------------------------------------------------------------------- |
| `hooks/session_start.py`   | `SessionStart`                      | Runs `memanto memory sync` and points the agent at `MEMORY.md`         |
| `memanto memory sync`      | `PreCompact`                        | Re-syncs `MEMORY.md` before context is compacted                       |
| `hooks/notify.py`          | `PostToolUse` on `memanto` commands | Summarizes memory operations in the transcript                         |
| `skills/memanto`           | Loaded when relevant                | Remember, recall, answer, edit/forget, upload, conflicts, expiry, sync |
| `skills/memanto-cookbooks` | Loaded when relevant                | Blueprints for building memory-powered applications                    |
| `agents/memory-scout`      | Delegated or named                  | Fans out several recalls and returns a short, sourced brief            |
| `commands/*`               | Slash commands                      | Explicit memory operations                                             |

The plugin ships no MCP server. Its only network access is the `memanto` CLI talking to Moorcheh under your own API key. See the [Claude Code page](/integrations/claude-code#commands) for the full command reference.

## Configuration

Memanto settings live in the CLI, not in the plugin: `MOORCHEH_API_KEY` is read from the environment or `~/.memanto/.env`. For a self-hosted backend, see [On-Prem Configuration](/on-prem/configuration).

### Sharing memory with Claude Code

Grok Build and Claude Code both use Memanto's **active agent**, so with one agent active they read and write the same memory. A decision stored from Claude Code is available in Grok Build, and vice versa.

### Separating Grok Build memory

To keep Grok Build's memory separate, give it its own agent and activate it before launching:

```bash theme={null}
memanto agent create grok-build     # once
memanto agent activate grok-build   # before each Grok Build session
grok
```

Switch back with `memanto agent activate <other-agent>`.

### Per-project memory

Create one agent per project and activate it when you switch projects:

```bash theme={null}
cd my-project
memanto agent activate my-project
grok
```

`MEMORY.md` is written into the project directory, so each repository keeps its own snapshot.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Plugin isn't registered">
    Check that Grok Build sees the plugin:

    ```bash theme={null}
    grok plugin list
    grok inspect   # shows loaded config, skills, plugins, hooks, and MCP servers
    ```

    Inside the TUI, `/plugins` opens the extensions modal. If `memanto` is missing, re-run the install commands above, or start Grok with `--plugin-dir` pointing at a local checkout.
  </Accordion>

  <Accordion title="MEMORY.md isn't refreshed at session start">
    The hook stays quiet when it can't sync. Check the CLI directly:

    ```bash theme={null}
    memanto status
    memanto memory sync --project-dir .
    ```

    If `memanto` isn't found, install it with `pip install memanto` and make sure it's on the `PATH` Grok Build inherits. If there's no active agent, run `memanto agent create <project-name>`.
  </Accordion>

  <Accordion title="Recall returns nothing">
    Memory is per agent. Make sure the active agent is the one that stored the memories — `memanto agent list` shows every agent.
  </Accordion>
</AccordionGroup>

## Requirements

* Grok Build
* Python 3.10+
* A [Moorcheh](https://console.moorcheh.ai) account and API key — or [on-prem](/on-prem/quickstart) with no key

## Next Steps

* [Claude Code](/integrations/claude-code) — full plugin reference
* [MCP Integration](/integrations/mcp)
* [Memory Types Reference](/reference/memory-types)
* [Plugin source on GitHub](https://github.com/moorcheh-ai/claude-memanto)
