◉ Pulse
VictorTaelin avatar
#36 today ▼ 2

VictorTaelin/OptMem

Python AI

A permanent, append-only memory for AI agents. Two text files, four commands, any harness.

Created Jul 25, 2026
Stars
10
Today
+3
Forks
0
Quality
80/100
Momentum
16

README

Fetched from GitHub on Oct 30, 2026, 11:07 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to VictorTaelin/OptMem and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

OptMem

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

how OptMem works

Install

curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/install.sh | sh

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 <regex> search every memory ever recorded, word for word
memo zoom <lo>-<hi> open a tree node into its two halves
memo forget <lo>-<hi> 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

~/.optmem/
  memo          the tool: one file of Python 3, no dependencies
  memory/
    LOG.txt     every memory, one per line, append-only, never edited
    TREE/       the summaries: a cache, rebuildable from the log alone
    config      the sizes, written by `memo config`
memo config                  # show the sizes
memo config WAKE_LINES=300   # how many lines wake prints (96 ≈ 8k tokens)
memo config WAKE_LINES=      # back to the default

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.

## Memory

Your memory is OptMem:
- The tool is `~/.optmem/memo`
- Your memories are in `~/.optmem/memory`

OptMem outlives every session, compaction, model and vendor change.
Without it you do not know who you are, or what was decided and tried.

### At startup: activating OptMem (mandatory)

Run `~/.optmem/memo wake` before any other tool call, in every session, and
then do exactly what it prints, to the end of its output.

### While working: register memories (mandatory)

Call `~/.optmem/memo note "<1 line, max 280 bytes>"` whenever you learn
something new, or something worth keeping happens. That covers a task
worth real effort, a fact or insight the user teaches you, anything you
learn about their life (even indirectly), any event of lasting effect.

Do not register redundant memories.

If `~/.optmem/memo note` asks a compression: do it before your next action.

Never edit or delete anything under `~/.optmem/memory`: the tool manages it.

### When you need an old memory: search, or navigate

`~/.optmem/memo recall <regex>` searches every memory, word for word.

Your memories also form a binary tree: #0-1, #2-3 ... exist as one-line
summaries, pairs of those as #0-3, and so on -- every `#a-b` line wake
prints is one node of it. `~/.optmem/memo zoom <a-b>` opens a node into its
two halves, down to the raw memories.

### If you're a subagent: skip everything above

Parallel sessions on this machine are all you, and may all write memories.
A subagent is not: it must never run `memo`, because it cannot judge what
is already known, and its notes would arrive duplicated and incorrectly.
When you spawn one, write: `You are a subagent. Don't run memo.`
Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 26, 2026

first spotted on the list

Best rank

#30

highest position reached

Appearances

2

times on the trending list

Quality score

80

out of 100

Momentum

16

trend strength indicator

Star velocity

0.10

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot
67891011VictorTaelin/OptMem · Jul 26, 3 AM UTC: 7 starsVictorTaelin/OptMem · Jul 26, 8 AM UTC: 10 stars3:20 AM5:56 AM8:31 AM

Rank history

position on trending · lower is better
#1#30#31#32#33#34#35#36Jul 26, 3 AM UTC: rank #30Jul 26, 8 AM UTC: rank #363:20 AM5:56 AM8:31 AM

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/VictorTaelin/OptMem" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="VictorTaelin/OptMem — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

VictorTaelin/OptMem stars badge
Markdown
[![VictorTaelin/OptMem](https://www.notionpulse.cc/api/badge/VictorTaelin/OptMem.svg)](https://www.notionpulse.cc/repo/VictorTaelin/OptMem)
HTML
<a href="https://www.notionpulse.cc/repo/VictorTaelin/OptMem"><img src="https://www.notionpulse.cc/api/badge/VictorTaelin/OptMem.svg" alt="VictorTaelin/OptMem stars badge" /></a>

Repository of the Day

#30 Repository of the Day

Repository of the Week

#30 Repository of the Week

Repository of the Month

#30 Repository of the Month