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

# Ecosystem

> HydraDB plugins and integrations across the wider ecosystem: OpenClaw, Cursor, Muse Code, Grok Build, OpenCode, and the CrewAI and LangChain frameworks.

Beyond [Claude Code / Codex](/plugins/claude-code), [MCP](/plugins/mcp),
[CLI](/plugins/cli), and [Hermes](/plugins/hermes), HydraDB ships plugins for a
growing set of coding agents and frameworks. The editor/agent plugins run on the
**same shared engine** as the Claude Code plugin, so their config keys,
environment overrides, and capture/search/ingest modes are identical; see
[Claude Code / Codex](/plugins/claude-code#config-variables) for the full
reference.

<Info>
  Credentials are the same everywhere: an **API key** and a **tenant ID** from
  the [HydraDB dashboard](https://app.hydradb.com/keys), set as `HYDRADB_API_KEY`
  and `HYDRADB_DATABASE`.
</Info>

## Coding agents & editors

<CardGroup cols={2}>
  <Card title="OpenClaw" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/openclaw.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=1cffb5f77eb90cdf33f5d6b513fa93de" href="#openclaw" width="120" height="120" data-path="images/plugins/openclaw.svg" />

  <Card title="Cursor" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/cursor.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=6b928cab2b489f6b80bcf92606a63245" href="#cursor" width="24" height="24" data-path="images/plugins/cursor.svg" />

  <Card title="Muse Code" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/meta.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=69611229bc10faa7dfda629149612a46" href="#muse-code" width="256" height="171" data-path="images/plugins/meta.svg" />

  <Card title="Grok Build" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/grok.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=6cfb982d7eda35ceed71d200c3ef77a7" href="#grok-build" width="1024" height="1024" data-path="images/plugins/grok.svg" />

  <Card title="OpenCode" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/opencode.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=943a47dc3ef334a8a1e768ce8dd08581" href="#opencode" width="24" height="24" data-path="images/plugins/opencode.svg" />
</CardGroup>

### OpenClaw

Automatically captures conversations, recalls relevant context with
knowledge-graph connections, and injects it before every AI turn.

<Steps>
  <Step title="Install">
    Clone the repo and install from the local checkout:

    ```bash theme={"dark"}
    git clone https://github.com/hydra-db/hydradb-openclaw-plugin.git
    openclaw plugins install ./hydradb-openclaw-plugin
    ```

    <Note>
      Requires **OpenClaw 2026.6.0 or later** (`openclaw --version`).
    </Note>
  </Step>

  <Step title="Configure">
    Set credentials in the environment (or in the plugin config block
    `plugins.entries.hydradb.config`), then restart the gateway:

    ```bash theme={"dark"}
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"
    openclaw gateway restart
    ```

    Optional: `HYDRADB_COLLECTION` (sub-tenant scope) and `HYDRADB_BASE_URL`.
    Turn capture reads conversation messages, which OpenClaw gates for
    non-bundled plugins; enable it with
    `plugins.entries.hydradb.hooks.allowConversationAccess: true`.
  </Step>
</Steps>

**Lifecycle hooks:** `before_prompt_build` recalls relevant memory and prepends
it to the prompt, `after_tool_call` syncs edited files, `agent_end` captures the
completed turn, and `session_start` syncs workspace docs.

**Manual actions** come from the shipped skills: `query`, `ingest`, `doctor`,
`setup`, and `last-recall`.

Repo:
[`hydradb-openclaw-plugin`](https://github.com/hydra-db/hydradb-openclaw-plugin).

### Cursor

Persistent, cross-session memory for [Cursor](https://cursor.com): recalls
relevant notes on each prompt, syncs your markdown docs into HydraDB, and saves
conversations as durable memories.

<Steps>
  <Step title="Bootstrap & set credentials">
    ```bash theme={"dark"}
    git clone https://github.com/hydra-db/hydradb-cursor-plugin.git
    cd hydradb-cursor-plugin
    make bootstrap
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"
    ```

    Requires **Node.js 18+** and npm.
  </Step>

  <Step title="Install in Cursor">
    Install via Cursor's plugin/marketplace flow pointing at this checkout.
  </Step>
</Steps>

Repo: [`hydradb-cursor-plugin`](https://github.com/hydra-db/hydradb-cursor-plugin).

### Muse Code

Memory for [Muse Code](https://dev.meta.ai/docs/muse-code), Meta's terminal
coding agent. Muse Code's hooks **cannot inject context back to the model**, so
recall is agent-invoked through **MCP** or **skills**, while **hooks** handle
automatic capture and doc sync.

| Extension point | Role |
| - | - |
| **MCP** (`mcp_servers`) | recall (`hydradb_query`) + ingest |
| **Skills** (`.claude/skills/`) | `/hydradb …` slash commands (manual recall / remember / sync) |
| **Hooks** (`.muse/hooks.json`) | automatic capture (`Stop`) + doc sync (`SessionStart`, `PostToolUse`) |

<Steps>
  <Step title="Add the MCP server">
    ```json theme={"dark"}
    {
      "mcp_servers": {
        "hydradb": {
          "transport": "streamable_http",
          "url": "https://mcp.hydradb.com",
          "headers": {
            "Authorization": "Bearer ${HYDRADB_API_KEY}",
            "X-HydraDB-Database": "your-database"
          },
          "enabled": true,
          "mode": "optional"
        }
      }
    }
    ```

    <Note>
      API-key requests to the MCP server require the `X-HydraDB-Database` header
      (your database ID). See the [MCP reference](/plugins/mcp#api-key-headers)
      for all supported headers.
    </Note>
  </Step>

  <Step title="Set credentials & run with the required flags">
    ```bash theme={"dark"}
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"

    # --trust-workspace loads project skills + hooks; --yolo (or an approval
    # profile) lets the auto-recall skill run node; both are required or recall
    # silently no-ops in headless mode.
    muse exec --trust-workspace --yolo "what did we decide about X?"
    ```

    <Warning>
      Only use `--yolo` in a workspace you trust. It bypasses command approval,
      so any project hooks loaded by `--trust-workspace` run against your local
      environment. In untrusted checkouts, prefer an approval profile that
      permits only the recall skill's `node` call instead of `--yolo`.
    </Warning>
  </Step>
</Steps>

Repo: [`hydradb-muse-code-plugin`](https://github.com/hydra-db/hydradb-muse-code-plugin).

### Grok Build

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. Repo:
[`hydradb-grok-plugin`](https://github.com/hydra-db/hydradb-grok-plugin).

### OpenCode

Native plugin for [OpenCode](https://opencode.ai) that hooks the session
lifecycle to recall context at prompt time, sync workspace docs, and capture
turns.

| OpenCode surface | Engine action |
| - | - |
| `hydradb_recall` tool (agent-invocable) | recall memory/knowledge for a query |
| `event` → `file.edited` | incremental workspace sync |
| `event` → `session.idle` | capture the completed turn |

<Steps>
  <Step title="Install & set credentials">
    Add the plugin to your `opencode.json`; OpenCode installs it from npm:

    ```json theme={"dark"}
    { "plugin": ["hydradb-opencode-plugin"] }
    ```

    ```bash theme={"dark"}
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"
    ```

    Requires [Bun](https://bun.sh) (OpenCode's runtime) and Node.js 18+.
  </Step>

  <Step title="Run with tool approval">
    Tool calls need approval. Run with `--auto` or approve `hydradb_recall`
    interactively:

    ```bash theme={"dark"}
    opencode run --auto "What did we decide? Use hydradb_recall."
    ```
  </Step>
</Steps>

Repo: [`hydradb-opencode-plugin`](https://github.com/hydra-db/hydradb-opencode-plugin). Package: [`hydradb-opencode-plugin`](https://www.npmjs.com/package/hydradb-opencode-plugin).

***

## Framework integrations

Python integrations that give your agents and chains persistent memory backed by
HydraDB. These use the public API only; no HydraDB SDK required.

<CardGroup cols={2}>
  <Card title="CrewAI" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/crewai.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=0aecafaf3e978bbcb87c9b832342d78a" href="#crewai" width="24" height="24" data-path="images/plugins/crewai.svg" />

  <Card title="LangChain" icon="https://mintcdn.com/cortex-e852fafe/lwj66p-aXeKlg1uY/images/plugins/langchain.svg?fit=max&auto=format&n=lwj66p-aXeKlg1uY&q=85&s=1a6a917493391d8c4e1ea51dccca9f5c" href="#langchain" width="24" height="24" data-path="images/plugins/langchain.svg" />
</CardGroup>

### CrewAI

HydraDB as external memory for [CrewAI](https://crewai.com) agents. Crews recall
relevant history on each task and persist their outputs into HydraDB, so memory
survives across runs.

```bash theme={"dark"}
pip install crewai-hydradb
```

```python theme={"dark"}
from crewai import Crew
from crewai.memory.external.external_memory import ExternalMemory
from hydradb_crewai import HydraDBClient, HydraDBStorage

client = HydraDBClient(api_key="sk_live_...", tenant_id="your-tenant")

crew = Crew(
    agents=[...],
    tasks=[...],
    external_memory=ExternalMemory(storage=HydraDBStorage(client)),
)
crew.kickoff()
```

<Note>
  Implements CrewAI's `Storage` interface via `ExternalMemory`, available in
  **CrewAI 1.0-1.10**. On **1.11+** (which restructured memory around an
  embedding-based `StorageBackend`), use HydraDB over [MCP](/plugins/mcp)
  instead. Outputs are stored as knowledge via the public `/context/ingest` path;
  `search` uses `POST /query`.
</Note>

Repo: [`hydradb-crewai-plugin`](https://github.com/hydra-db/hydradb-crewai-plugin). Package: [`crewai-hydradb`](https://pypi.org/project/crewai-hydradb/).

### LangChain

HydraDB integration for [LangChain](https://langchain.com): persistent,
cross-session memory and retrieval for your chains and agents.

```bash theme={"dark"}
pip install langchain-hydradb
```

```python theme={"dark"}
from langchain_hydradb import HydraDBClient, HydraDBRetriever

client = HydraDBClient(api_key="sk_live_...", tenant_id="your-tenant")

# Use HydraDB as a retriever in any chain
retriever = HydraDBRetriever(client=client, kind="both", max_results=6)
docs = retriever.invoke("what did we decide about auth?")

# Write durable memory
client.add_text("We deploy on Fridays only.", infer=True)
```

| Class | Role |
| - | - |
| `HydraDBClient` | Thin HTTP client, public API only (`POST /query`, `POST /context/ingest`, `DELETE /context`) |
| `HydraDBRetriever` | `BaseRetriever` over memory, knowledge, or both |
| `HydraDBChatMessageHistory` | `BaseChatMessageHistory` that persists and recalls turns |

<Note>
  Requires `langchain-core >= 0.3`. Writes use the public knowledge path, so
  `add_text`/`add_conversation` store as knowledge; recall `kind` may be
  `"memory"`, `"knowledge"`, or `"both"`. Ingestion is asynchronous, so recall a
  source only after it finishes indexing.
</Note>

Repo: [`hydradb-langchain-plugin`](https://github.com/hydra-db/hydradb-langchain-plugin). Package: [`langchain-hydradb`](https://pypi.org/project/langchain-hydradb/).

***

## Source & Show Support

<Note>
  If any of these integrations make your workflow smarter, please star the
  open-source repos that power them.

  <CardGroup cols={2}>
    <Card title="hydradb-openclaw-plugin" icon="star" href="https://github.com/hydra-db/hydradb-openclaw-plugin" />

    <Card title="hydradb-cursor-plugin" icon="star" href="https://github.com/hydra-db/hydradb-cursor-plugin" />

    <Card title="hydradb-muse-code-plugin" icon="star" href="https://github.com/hydra-db/hydradb-muse-code-plugin" />

    <Card title="hydradb-grok-plugin" icon="star" href="https://github.com/hydra-db/hydradb-grok-plugin" />

    <Card title="hydradb-opencode-plugin" icon="star" href="https://github.com/hydra-db/hydradb-opencode-plugin" />

    <Card title="hydradb-crewai-plugin" icon="star" href="https://github.com/hydra-db/hydradb-crewai-plugin" />

    <Card title="hydradb-langchain-plugin" icon="star" href="https://github.com/hydra-db/hydradb-langchain-plugin" />
  </CardGroup>
</Note>


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