> ## 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.

# Codex

> Give OpenAI Codex long-term memory with the HydraDB plugin.

The [Codex](https://developers.openai.com/codex) plugin recalls relevant notes
when you send a prompt, syncs your markdown docs into HydraDB, and saves
conversations as durable memories, the **same behavior and the same engine** as
the [Claude Code plugin](/plugins/claude-code). The JSON config keys, capture/search/ingest
modes, and environment variables are identical; only the install flow differs.

<Steps>
  <Step title="Install the plugin">
    ```bash theme={"dark"}
    git clone https://github.com/hydra-db/hydradb-codex-plugin.git
    cd hydradb-codex-plugin
    make bootstrap
    ```

    <Note>
      Requires **Node.js 18+** and npm. Then add a local marketplace entry in
      your project's `.agents/plugins/marketplace.json` pointing at this plugin
      folder and enable it in `.codex/config.toml`. See the
      [Codex plugin docs](https://developers.openai.com/codex) for the current
      install flow.
    </Note>
  </Step>

  <Step title="Get credentials">
    * Create an API key from the [HydraDB dashboard](https://app.hydradb.com/keys)
    * Create or copy your database ID from the [HydraDB dashboard](https://app.hydradb.com/databases)
  </Step>

  <Step title="Set environment variables">
    ```bash theme={"dark"}
    export HYDRADB_API_KEY="your-api-key"
    export HYDRADB_DATABASE="your-database"
    export HYDRADB_COLLECTION=""
    ```

    Set `HYDRADB_COLLECTION` to an empty string for the default collection,
    or a workspace-specific value for project-isolated memory.
  </Step>
</Steps>

The [commands](/plugins/claude-code#commands), [modes](/plugins/claude-code#modes), and [config variables](/plugins/claude-code#config-variables) on the Claude Code page apply to Codex unchanged.

## Feedback and contributions

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


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