Integrations
Codex
Integrate memories.sh with OpenAI Codex CLI.
Codex is OpenAI's CLI coding agent. It reads instructions from AGENTS.md and the .agents/ directory.
Quick Setup
cd your-project
memories initThis automatically:
- Sets up your local memory store
- Configures MCP for supported tools
- Generates instruction files with your existing memories
Manual Setup
Option 1: Generated File
memories generate agentsThis creates the canonical .agents/ directory that Codex reads for project context. Codex also reads AGENTS.md at the project root.
Option 2: MCP Server
Codex has built-in MCP support. Configure it to use memories.sh:
{
"mcpServers": {
"memories": {
"command": "npx",
"args": ["-y", "@memories.sh/cli", "serve"]
}
}
}Recommended: Use Both
- Generated file — Provides instructions Codex always sees via
AGENTS.md - MCP server — Gives Codex live access to search, recall, and add memories
Syncing Codex Config
To sync your Codex configuration across machines:
# On your main machine
memories files ingest
# On a new machine
memories files apply --global --force