Build a Codex that gets sharper over time.
Codex Memory Forge is a Codex-native memory system for people who are tired of re-explaining the same preferences, fixing the same mistakes, and rebuilding the same context every session.
No vector database. No daemon. No fake hidden memory. Just Codex, files, rules, and a clean refinement loop.
Instead of hiding memory behind a proprietary service, this project keeps the whole loop visible:
AGENTS.mdis the entrypoint- layered markdown files hold memory
- promotion rules decide what becomes high-priority guidance
- an optional nightly automation keeps the system clean
Most "self-improving agent" setups fall into one of two traps:
- they rely on platform-specific primitives that do not actually exist in Codex
- they turn memory into a messy dump that grows forever and gets worse over time
Codex Memory Forge takes the opposite approach:
- Codex-native, no fake hidden internals
- layered memory instead of one giant note
- explicit promotion rules instead of vague "the agent will remember"
- human-readable files you can audit, edit, back up, and version
- a reusable Codex skill
- a five-layer memory architecture
- a clean
AGENTS.mdentrypoint model - a recommended nightly review automation
- templates for
PROFILE.md,ACTIVE.md,LEARNINGS.md,ERRORS.md, andFEATURE_REQUESTS.md
.
|-- SKILL.md
|-- agents/
| `-- openai.yaml
`-- references/
|-- agents-snippet.md
|-- memory-files.md
`-- nightly-review.md
- Copy this project into your Codex skills directory.
- Load the skill as
$codex-memory-forge. - Create or update your global
AGENTS.mdusing the guidance inreferences/agents-snippet.md. - Create the five memory files using
references/memory-files.md. - Optionally add the nightly review automation using
references/nightly-review.md.
Use each file for a different class of signal:
PROFILE.md: durable identity and communication preferencesACTIVE.md: short, high-priority operational rulesLEARNINGS.md: reusable lessons not promoted yetERRORS.md: recurring failures and debugging knowledgeFEATURE_REQUESTS.md: long-term missing capabilities
This is the core idea of the project: memory should be curated, promoted, and pruned, not merely accumulated.
- engineers who use Codex every day
- solo builders who want Codex to adapt to personal workflow
- teams experimenting with durable agent behavior without extra infrastructure
- anyone who wants a transparent alternative to "trust me, the agent remembers"
- visible over magical
- structured over bloated
- portable over locked-in
- operational over theoretical
This repository is designed to be forked, audited, and improved in the open.
Recommended defaults if you publish your own version:
- keep the entrypoint thin
- keep the memory layers explicit
- keep promotion rules conservative
- never auto-edit
AGENTS.mdwithout clear user consent
MIT. See LICENSE.
If this project saves you repeated setup work, give it a star and ship your own Memory Forge.