> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-e852fafe-t3code-rewrite-docs-declutter.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Build

> Give Grok Build, xAI's coding agent, long-term memory with the HydraDB plugin.

Automatic long-term memory for [Grok Build](https://docs.x.ai/build/overview),
xAI's coding agent. Grok Build's plugin system is Claude-Code-compatible, so this
is a full plugin with **real per-prompt auto-recall** (not just MCP tools).

| Grok Build hook | Engine action |
| - | - |
| `SessionStart` | print status + async workspace sync |
| `UserPromptSubmit` | recall memory/knowledge, inject as `additionalContext` |
| `PostToolUse` (file writes) | incremental workspace sync |
| `Stop` | capture the completed turn |

<Steps>
  <Step title="Set credentials">
    ```bash theme={"dark"}
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"
    ```
  </Step>

  <Step title="Install in Grok Build">
    Use `/marketplace` to browse and install (from a local checkout, or via the
    catalog once listed).
  </Step>
</Steps>

**MCP alternative:** `grok mcp add hydradb --url https://mcp.hydradb.com`. The
plugin already gives automatic recall, so MCP is optional.

It runs on the same engine as the [Claude Code plugin](/plugins/claude-code), so the [modes](/plugins/claude-code#modes) and [config variables](/plugins/claude-code#config-variables) there apply here too.

## Feedback and contributions

This plugin is open source. Feel free to [raise an issue](https://github.com/hydra-db/hydradb-grok-plugin/issues) or [contribute on GitHub](https://github.com/hydra-db/hydradb-grok-plugin).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.