Codex
Add persistent memory to OpenAI's CLI agent
Codex is OpenAI's CLI agent for coding tasks. Engrammic gives it memory that persists across sessions.
Prerequisites
- Codex installed and authenticated
- Engrammic server running locally or cloud account
Installation
The fastest path:
curl -fsSL https://get.engrammic.ai/install.sh | sh
engrammic installThe installer detects Codex automatically and writes the MCP config to ~/.codex/config.toml.
Manual Configuration
If you prefer manual setup, add the MCP server to ~/.codex/config.toml:
Local server
[mcp_servers.engrammic]
url = "http://localhost:8000/mcp"Cloud (Engrammic hosted)
[mcp_servers.engrammic]
url = "https://beta.engrammic.ai/mcp/"Cloud requires authentication. Run engrammic-mcp login to configure credentials.
AGENTS.md Approach
Codex also reads AGENTS.md files for behavior configuration. You can add memory prompts directly to your project's AGENTS.md to make Codex proactive about memory.
See Harness Integration Guide for prompt snippets you can paste into AGENTS.md.
Verify
Start a new Codex session and ask:
What MCP tools do you have?You should see Engrammic tools like remember, learn, recall, trace, and link.
Load the EAG Guide
The tools alone are passive. To make Codex proactive with memory, load the EAG guide:
Load the engrammic onboarding patternThis teaches the agent when to recall and store automatically.
See EAG Guide for details.
Next Steps
- EAG Guide - make memory proactive
- Harness Integration - AGENTS.md prompt snippets
- Memory Tools Reference - full tool documentation
Related Pages
Other pages in the docs that reference this one: