A Beginner-Friendly Codex Memory System: One-Click Configuration and Deep Dive

@gengdaJ
จีน1 วันที่ผ่านมา · 02 ก.ค. 2569
126K
364
71
57
701

TL;DR

This article details a robust AI memory architecture using Obsidian Markdown as a source of truth, integrated with SQLite for search and Git for auditing to ensure persistence.

Fable5 has made a triumphant return, and as a veteran Codex user, I couldn't resist testing it to see if it's as good as the hype—specifically, whether it could replace Codex or help iterate on the memory system I've optimized to the limit. I topped up $10 on Zenmux and connected Fable5 to Claude Code. TL;DR: Fable5 is the 'daddy' of Codex's 'ultra-high' intelligence!!! (Memory system Skill link at the end).

Regarding my previous semi-finished memory system:

https://x.com/gengdaJ/status/2067985719675773192

https://x.com/evermind/status/2063262473357336824

https://x.com/gengdaJ/status/2068555151733043504

Fable5 is indeed expensive, so I followed the advice of experts on my timeline and let Fable5 handle the advice and planning stages for the Codex memory system.

You don't know until you ask—the first check using 'First Principles' identified a ton of bugs and optimization opportunities. Its technical professionalism is unquestionable, as Codex itself admitted. While Fable5's suggestions occasionally lacked rigor, in a 4:1 comparison, Fable5 won by a landslide.

逸尘 - inline image
逸尘 - inline image

That was just the first step. Fable5's incredible capabilities were just starting to show. I had Codex organize a development plan and sent it to Fable5 for review. Fable5 continued to question it, and Codex continued to agree.

逸尘 - inline image

I then had Codex optimize based on Fable5's suggestions. Thinking it was perfect, I sent it back to Fable.

逸尘 - inline image

In the end, Fable still found so many issues. I'm truly impressed. I quickly had Codex acknowledge its strictest 'father.'

逸尘 - inline image

After development, Fable5 remained sharp, crushing the code review phase.

逸尘 - inline image

After this test, I have to admit Fable5 is incredibly solid in decision-making and judgment. Even as a loyal Codex user, I have to praise it. I'll continue using Fable5 for complex systems (like optimizing Agent search systems next). It's expensive, but worth it when used where it counts.

If you want to try Fable5's terrifying planning capabilities, you can call the Zenmux API like I did (they have the best Claude source quality in my opinion): https://zenmux.ai/invite/GYMUHL. I noticed today that free subscribers can try the web version, and pay-as-you-go users (credits > 0) can call the API directly for free, with a 20% bonus on top-ups—a nice little perk!

Next, let's talk about this memory system architecture reconstructed by Fable5. You'll understand how powerful it is through this simple breakdown:

My current Codex memory system is a local, auditable, searchable, and maintainable Agent Obsidian memory vault. It seamlessly turns projects, pitfalls, preferences, decisions, and reusable workflows shared with Codex into Markdown documents in Obsidian. It then uses SQLite, full-text search, semantic search, Git, hooks, and closeout scripts to achieve self-operation and self-iteration.

Basic Concepts

Before diving into the functions, you need to understand eight basic concepts:

  • Obsidian Markdown: The Original Memory Archive These are essentially standard .md text files. Why not use a database? Because Obsidian is friendlier for non-programmers—humans can read and edit them directly, and Git can track changes. This is the 'source of truth' for the memory system.
  • INDEX.md: Directory and Navigation Desk INDEX.md isn't the memory itself but an 'entry map.' If Markdown is a library, INDEX.md is the front desk catalog telling the Agent which files are important and where to find answers.
  • SQLite / FTS: Fast Retrieval Cards SQLite is a small local database, and FTS is its full-text search capability. It's not the 'fact source' but a 'search index,' like library index cards for titles, keywords, and summaries.
  • Zvec: Semantic Search Zvec is vector retrieval, meaning 'searching by meaning.' While standard search requires exact keywords, semantic search can find relevant memories even if you don't use the exact terms.
  • Git: Change Records and Rollback Insurance Git is a version control system. It answers: Who changed this and when? What lines were changed? Can we roll back if there's an error?
  • closeout script: Automated Post-Task Organizer Closeout automates the cleanup process. It ensures that updating memories, refreshing indices, and committing to Git aren't left to the Agent's 'memory' but are handled by a single command.
  • audit script: Periodic Health Check Doctor As the vault grows, things get messy. Audit identifies outdated memories, long-unresolved open loops, and duplicate files for human review.
  • AGENTS.md: System Constitution AGENTS.md defines the Agent's behavior rules: when to read memory, what to write, and when it MUST ask the user (e.g., for sensitive data or deletions).

Memory System Workflow

逸尘 - inline image
  1. Task Input: The user asks a question.
  2. Read AGENTS.md: Determine the operational boundaries and rules.
  3. Read INDEX.md: Locate relevant files with low token cost.
  4. Unified Retrieval: Use SQLite/Zvec if needed to find specific memories.
  5. Read Markdown Source: Confirm facts from the actual readable files.
  6. Execute Task: Work with long-term context.
  7. Judge Memory Value: Decide if the new info is worth saving.
  8. Reconcile Before Writing: Check for duplicates or conflicts with old memories.
  9. Write to Markdown: Categorize and save to the correct directory.
  10. Run Closeout: Refresh indices, check for sensitive info, and log the session.
  11. Git Logging: Create an auditable trail of the changes.
  12. Periodic Audit: Maintain vault health through weekly checks.

Advantages of the Memory System

逸尘 - inline image
  1. Controllable Fact Source: Stored in local Markdown, not locked into a platform.
  2. Complete Retrieval: Combines navigation, keyword search, and semantic search.
  3. Reconciliation: Prevents duplicates and conflicts before writing.
  4. Closeout Loop: Turns memory saving into a standardized process.
  5. Git Versioning: Provides full traceability and rollback capabilities.
  6. Audit Mechanism: Keeps the memory vault clean and relevant.
  7. Restrained Automation: High-risk actions always require human confirmation.
  8. Self-Evolution: Allows the Agent to grow its capabilities through audited experience.

Finally, I've encapsulated this memory system into a Skill: https://github.com/mcncarl/codex-memory. You can connect it to Codex or continue optimizing it for your own needs! ☺️

Turn one viral article into a full content workflow

Collect the source, decode the pattern, create assets, draft the story, and distribute from one AI workspace.

Explore YouMind
สำหรับครีเอเตอร์

เปลี่ยน Markdown ของคุณให้เป็นบทความ 𝕏 ที่สะอาดตา

เวลาคุณเผยแพร่งานเขียนยาวของตัวเอง การจัดรูปแบบรูปภาพ ตาราง และบล็อกโค้ดให้เข้ากับ 𝕏 นั้นน่าปวดหัว YouMind เปลี่ยนร่าง Markdown ทั้งฉบับให้เป็นบทความ 𝕏 ที่สะอาดตาและพร้อมโพสต์ทันที

ลอง Markdown เป็น 𝕏

แพตเทิร์นให้ถอดรหัสเพิ่มเติม

บทความไวรัลล่าสุด

สำรวจบทความไวรัลเพิ่มเติม