📈 GH Trending Explorer 🎲 Surprise me

← all repos

VictorTaelin / OptMem

git clone https://github.com/VictorTaelin/OptMem.git

Permanent memory for AI agents. A 426-token prompt, a script, plug and play.

+8
stars, 24h · #3,949
+~86
stars, 7 days · #2,465
+~370
stars, 30 days · #2,211
2.3k
★ total · +4% this week
147
forks · 17 open issues

Star history (as recorded here)

2026-10-20 · 2,272 ★ 2026-10-23 · 2,309 ★
LanguagePython
License—
Created2026-07-25 (2mo ago)
Last push2mo ago
Watchers17
OwnerUser

Links

README excerpt
# OptMem
Permanent memory for AI agents. A 426-token prompt, a script, plug and play.
## Install
 [code] 
It prints a `## Memory` block. Paste that at the top of your agent's
`AGENTS.md` (or `CLAUDE.md`), and you are done. Run the same line again to
update.
The tool lands at `~/.optmem/memo`; put `~/.optmem` on `PATH` to type `memo`.
## Commands
| | |
|---|---|
| `memo wake` | read the memory — the first command of every session |
| `memo note "..."` | record one memory: one line, up to 280 bytes |
| `memo nap` | answer the merges that came due |
| `memo recall ` | search every memory ever recorded, word for word |
| `memo zoom - ` | open a tree node into its two halves |
| `memo forget - ` | drop a bad summary; the next nap rebuilds it |
Merges arrive one at a time, in the output of `note`. Nothing ever runs in the
background.
## Files
 [code] 
 [code] 
`WAKE_LINES` is the only size worth touching, and it is a reading budget, not
a storage budget: change it whenever, in either direction, and nothing is
recomputed.
Records are fixed width, so position *is* identity and every lookup is one
seek. At a million memories (608 MB), `wake` takes 0.03s.
Set `$MEMORY_DIR` to keep `memory/` elsewhere — a synced folder, a git repo.
## The prompt
This is what the installer prints, and the whole of the integration.
 [code]