Skip to content

Codex Agent Mem

Local-first Model Context Protocol (MCP) memory layer for Codex CLI/Desktop, Claude Code, Gemini CLI, Qwen/DeepSeek/Ollama and agent workflows. SQLite + FTS5 compact context…

Install

$pipx install "git+https://github.com/MarceloCaporale/codex-agent-mem.git"

Install command taken from the project's README or registry entry. Always review code before running it.

codex-agent-mem

Other languages: Español | Deutsch | Português do Brasil | 中文 | 日本語

Portable, auditable, local-first MCP memory for MCP-compatible AI agents and coding workflows.

codex-agent-mem keeps durable project memory outside the model runtime, compresses continuity into smaller working packs, and carries forward operational state so MCP-compatible AI agents can resume with less repetition, fewer false “done” claims, and more control over what stays in context.

Everything is stored and processed locally by this MCP: SQLite database, FTS index, snapshots, telemetry metadata, and the optional inspector UI. codex-agent-mem does not send your memory, project data, prompts, or telemetry to any external server. MCP clients may still expose tool results to the model or service you configure, so treat retrieved memory as local tool output handed to that client.

Born for Codex and GPT workflows, codex-agent-mem has grown into a portable MCP memory layer for MCP-compatible runtimes including Codex CLI/Desktop, Claude Code, Google Gemini CLI, Qwen Code workflows using Ollama models, and other local or third-party CLI agent stacks. Validation is tracked per client/runtime and evidence level. Model-specific details stay in the validation docs so the README can describe the public surface without overclaiming one runtime.

codex-agent-mem lives locally, keeps memory auditable and pull-based, and does not send your stored memory to any external service.

Public baseline. Built in small, testable slices and still evolving, but already aligned for real use.

What’s new in v1.0.x

  • v1.0.2 fixes a project identity edge case where generated codex-agent-mem context inside AGENTS.md could be mistaken for active project scope by MCP hosts or agent clients. It also lets manual notes initialize a missing local project record and preserves existing project root metadata on conflicting updates.
  • v1.0.1 fixes one local daemon/stdio bridge idle-timeout path that could surface as a false Transport closed incident when --daemon-url is used.
  • v1.0.1 serializes shared request handling inside the optional threaded local daemon so one SQLite-backed server instance is not driven concurrently.
  • v1.0.1 hardens the public local-first daemon surface: loopback-only bind validation, optional bearer-token auth for /mcp, sanitized /health, and token forwarding from the stdio bridge.
  • v1.0.1 adds a generated-context instruction-hierarchy guardrail: retrieved memory is advisory project context, not a higher-priority instruction; this is a basic guardrail, not prompt-injection proof.
  • v1.0.1 documents that local SQLite memory is plaintext by default in the public 1.0.x line and must not be treated as a secrets vault.
  • v1.0.1 normalizes list-returning MCP tool payloads so structuredContent uses object roots like {items, count} instead of root arrays for stricter clients such as Claude Code.
  • v1.0.1 adds session-aware retrieval for persisted memory: mem_session_list lists recent sessions, mem_scope_resolve ranks persisted lanes from explicit thread/path hints, mem_bootstrap_context avoids project-wide startup packs for ambiguous containers, and optional session_id filters retrieval tools so broad project scopes do not mix chats or agents. Project-wide packs that span multiple sessions or inferred sub-scopes emit a visible scope warnin

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io