This is the shortest path from clone to a working local setup.
git clone https://github.com/MarceloCaporale/codex-agent-mem.git
cd codex-agent-mem
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]
git clone https://github.com/MarceloCaporale/codex-agent-mem.git
cd codex-agent-mem
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
codex-agent-mem-smoke
codex-agent-mem-smoke
That should insert a sample turn into a local SQLite database and verify retrieval.
codex-agent-mem-bootstrap-codex --db-path "$HOME/.codex_agent_mem/codex_agent_mem.db"
codex-agent-mem-bootstrap-codex --db-path C:\Users\YOU\.codex_agent_mem\codex_agent_mem.db
Paste the generated output into ~/.codex/config.toml.
The snippet already includes read-only MCP tool approvals plus a defensive MCP idle timeout for non-interactive Codex runs.
If you also want automatic AGENTS.md reinjection, add --sync-project-doc to the notify command before --db-path.
Start the inspection API:
codex-agent-mem-api --db-path "$HOME/.codex_agent_mem/codex_agent_mem.db"
codex-agent-mem-api --db-path C:\Users\YOU\.codex_agent_mem\codex_agent_mem.db
Then open the local inspector:
http://127.0.0.1:37770/ui
Start the MCP server:
codex-agent-mem-mcp --db-path "$HOME/.codex_agent_mem/codex_agent_mem.db"
codex-agent-mem-mcp --db-path C:\Users\YOU\.codex_agent_mem\codex_agent_mem.db
codex-agent-mem-refresh-context --db-path "$HOME/.codex_agent_mem/codex_agent_mem.db" --project-key YOUR_PROJECT --cwd /path/to/project
codex-agent-mem-refresh-context --db-path C:\Users\YOU\.codex_agent_mem\codex_agent_mem.db --project-key YOUR_PROJECT --cwd C:\Path\To\Project
ruff check .
python -m compileall src
pytest -q
python -m build