Every AI agent has the same problem — wake up in a new session and it’s amnesia all over again. But you told it about your project structure, your preferences, yesterday’s debugging log. Gone. So OptMem from VictorTaelin (687★, released July 25) fixes this with a 426-token prompt block you paste into your AGENTS.md. That’s it.
What Makes OptMem Different
Here’s the thing: OptMem is not a vector database. It’s not a knowledge graph either. Nor is it another MCP server. It’s a single Python file (~/.optmem/memo) with zero dependencies that manages persistent memory for any AI agent. The trick? The tool encodes everything into a structured prompt block the agent reads at session start. The tool lives on disk while the “memory” lives in the conversation. But it’s a design philosophy so minimal it almost feels like cheating.
Quick Start — I Tested It
I ran the install on my Windows machine (Git Bash, Python 3.11):
curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/install.sh | sh
Took about 4 seconds. Then it printed a ## Memory block — I copied it into a test AGENTS.md and ran memo wake. The tool scanned my memory log and printed a compressed summary of everything stored. The CLI fits on one screen:
| Command | What It Does |
|---|---|
memo wake |
Read memory — mandatory first command every session |
memo note "..." |
Record one memory (1 line, 280 chars) |
memo nap |
Compress memories into the binary summary tree |
memo recall <regex> |
Search every memory ever recorded, word for word |
memo zoom <lo>-<hi> |
Expand a tree node into its two halves |
memo forget <lo>-<hi> |
Drop a bad summary; the next nap rebuilds it |
memo config |
Tune sizes (WAKE_LINES controls reading budget) |
So I tested a quick round — memo note "Decided to use SQLite for the project's data layer" then memo recall SQLite. But it found the memory instantly. Position-based addressing means every lookup is one file seek, and the binary tree compression keeps wake fast even as memories pile up. At 1M records the author claims 0.03s per wake.
Then I tested memo zoom by checking what the tree compression did. After three notes, memo nap collapsed them into a single summary node — I used memo zoom 0-3 to expand it back and saw the raw entries underneath. Still, the tree depth stays logarithmic. At 1M memories you’re looking at about 20 levels, which means recall and wake stay fast no matter how long you’ve been using it.
On top of that, no daemons. No servers. No background processes. Merges fire synchronously when you call note. The entire raw log is one append-only LOG.txt you could back up with a single cp.
What Surprised Me
Honestly? I expected a learning curve. Instead I got a copy-paste install and six verbs. OptMem survives model swaps, vendor changes, framework switches. Switch from Claude Code to OpenCode to Codex tomorrow — the memory block in AGENTS.md stays the same. But the only dependency is python3.
If you’ve been following other agent memory tools on ToolGenix — like my full SuperMemory quick review — you’ll notice OptMem goes a different direction from most. No vector embeddings, no graph traversal. Just raw file seeks.
What to Watch Out For
So what’s the catch? Single-user only. Subagents explicitly should not run memo. No multi-agent coordination built in. You can’t dump large context either — each note is a tweet-length 280-char entry. Still, no semantic search. recall is pure regex. If you need vector similarity, this isn’t it. And it’s very early. 687★ and 36 forks. Documentation is the README (which is good), but there’s no FAQ or troubleshooting guide yet. Another agent memory option I covered recently was Mnemo, which takes a completely different architectural approach. If you’re building LLM-powered agents seriously, pair OptMem with Building LLM-Powered Applications (affiliate link) — it covers production patterns for prompt composition and context injection that complement tools like this.
The Bottom Line
OptMem solves a real pain point with shocking simplicity. No infra, no API keys, no Docker — just a prompt block and a script. If you run AI coding agents and you’re tired of re-teaching them your context every session, this is one of the fastest fixes I’ve found. Still, it’s not for multi-user production memory, but for personal agent persistence? Hard to beat free with zero deps.
Disclosure: Some links above are affiliate links. I may earn a commission at no extra cost to you if you make a purchase through them. As an Amazon Associate, I earn from qualifying purchases.
Found this on GitHub Trending today. Follow me for daily AI tool discoveries.