Integration

Long-term memory for Codex

Codex is OpenAI's CLI coding agent: fast at multi-step tasks, blank between them. Engram installs as a Codex plugin. Register it once via Codex's marketplace (a local vendored install, or remote via `codex marketplace add lumetra-io/engram-codex-plugin` on v0.121+) and the agent gains six tools for storing and recalling everything that happened in past sessions.

Install

Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into Codex.

Three steps to memory in your agent

  1. Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
  2. Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
  3. Paste the snippet below into your agent and restart it. Use Authorization: Bearer <api-key>with the API key from your portal.

engram: Codex plugin

Wires Codex into the hosted Engram MCP server. Codex prompts for your ENGRAM_API_KEY on install and stores it in its secret store. Source: github.com/lumetra-io/engram-codex-plugin.

  1. Copy the plugin folder into your repo (vendored, per Codex's local-plugin convention):
  2. Terminal
    mkdir -p plugins
    curl -fsSL https://codeload.github.com/lumetra-io/engram-codex-plugin/tar.gz/refs/heads/main \
      | tar -xz --strip-components=2 -C plugins engram-codex-plugin-main/plugins/engram
  3. Add this entry to .agents/plugins/marketplace.json (create the file if it doesn't exist):
  4. .agents/plugins/marketplace.json
    {
      "name": "engram-plugins",
      "interface": { "displayName": "Engram Plugins" },
      "plugins": [
        {
          "name": "engram",
          "source": { "source": "local", "path": "./plugins/engram" },
          "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
          "category": "Productivity"
        }
      ]
    }
  5. Open the Codex UI, find Engram in the plugin list, install. Codex prompts for ENGRAM_API_KEY once and forwards it as a Bearer token to mcp.lumetra.io on every request via the bearer_token_env_var mechanism declared in .codex-mcp.json.

What you can do once memory's wired in

  • Recall the decisions we made in last week's session on the payments rewrite
  • Remember the conventions you asked Codex to follow (commit message format, branch naming)
  • Pull up the list of files Codex has refactored this week, and what changed in each
  • Avoid re-discovering the same gotchas in the legacy auth module every time we touch it

FAQ

Vendored or remote install?

Both work. Codex supports remote distribution via `codex marketplace add lumetra-io/engram-codex-plugin` (since Codex v0.121, April 2026). The vendored path is still useful if you want to pin the plugin in a monorepo or audit the source before installing. Put the bundle under `.agents/plugins/engram/` and register it in `.agents/plugins/marketplace.json` with a `"source": "local"` entry.

What happens on first install?

Codex prompts for your `ENGRAM_API_KEY` once and stores it in its secret store. After that it forwards the key as a Bearer token to `mcp.lumetra.io` via the `bearer_token_env_var` setting under `[mcp_servers.engram]` in `~/.codex/config.toml`. The plugin's installer writes that entry for you.

Can I share the plugin across multiple Codex projects?

Yes. Vendor it once in a shared location and reference that path from each project's `marketplace.json`. Or vendor per-project if you want different buckets per repo.

Ship durable memory in Codex today

Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.