[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93908":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":14,"starSnapshotCount":14,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},93908,"OptMem","VictorTaelin\u002FOptMem","VictorTaelin","Permanent memory for AI agents. A 426-token prompt, a script, plug and play.",null,"Python",968,56,5,0,9.27,false,"main",true,[],"2026-09-21 02:04:15","# OptMem\n\nPermanent memory for AI agents. A 426-token prompt, a script, plug and play.\n\n![how OptMem works](anim\u002Foptmem.gif)\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FVictorTaelin\u002FOptMem\u002Fmain\u002Finstall.sh | sh\n```\n\nIt prints a `## Memory` block. Paste that at the top of your agent's\n`AGENTS.md` (or `CLAUDE.md`), and you are done. Run the same line again to\nupdate.\n\nThe tool lands at `~\u002F.optmem\u002Fmemo`; put `~\u002F.optmem` on `PATH` to type `memo`.\n\n## Commands\n\n| | |\n|---|---|\n| `memo wake` | read the memory — the first command of every session |\n| `memo note \"...\"` | record one memory: one line, up to 280 chars |\n| `memo nap` | answer the merges that came due |\n| `memo recall \u003Cregex>` | search every memory ever recorded, word for word |\n| `memo zoom \u003Clo>-\u003Chi>` | open a tree node into its two halves |\n| `memo forget \u003Clo>-\u003Chi>` | drop a bad summary; the next nap rebuilds it |\n\nMerges arrive one at a time, in the output of `note`. Nothing ever runs in the\nbackground.\n\n## Files\n\n```\n~\u002F.optmem\u002F\n  memo          the tool: one file of Python 3, no dependencies\n  memory\u002F\n    LOG.txt     every memory, one per line, append-only, never edited\n    TREE\u002F       the summaries: a cache, rebuildable from the log alone\n    config      the sizes, written by `memo config`\n```\n\n```sh\nmemo config                  # show the sizes\nmemo config WAKE_LINES=300   # how many lines wake prints (208 ≈ 16k tokens)\nmemo config WAKE_LINES=      # back to the default\n```\n\n`WAKE_LINES` is the only size worth touching, and it is a reading budget, not\na storage budget: change it whenever, in either direction, and nothing is\nrecomputed.\n\nRecords are fixed width, so position *is* identity and every lookup is one\nseek. At a million memories (608 MB), `wake` takes 0.03s.\n\nSet `$MEMORY_DIR` to keep `memory\u002F` elsewhere — a synced folder, a git repo.\n\n## The prompt\n\nThis is what the installer prints, and the whole of the integration.\n\n```markdown\n## Memory\n\nYour memory is OptMem:\n- The tool is `~\u002F.optmem\u002Fmemo`\n- Your memories are in `~\u002F.optmem\u002Fmemory`\n\nOptMem outlives every session, compaction, model and vendor change.\nWithout it you do not know who you are, or what was decided and tried.\n\n### At startup: activating OptMem (mandatory)\n\nRun `~\u002F.optmem\u002Fmemo wake` before any other tool call, in every session, and\nthen do exactly what it prints, to the end of its output.\n\n### While working: register memories (mandatory)\n\nCall `~\u002F.optmem\u002Fmemo note \"\u003C1 line, max 280 chars>\"` whenever you learn\nsomething new, or something worth keeping happens. That covers a task\nworth real effort, a fact or insight the user teaches you, anything you\nlearn about their life (even indirectly), any event of lasting effect.\n\nDo not register redundant memories.\n\nIf `~\u002F.optmem\u002Fmemo note` asks a compression: do it before your next action.\n\nNever edit or delete anything under `~\u002F.optmem\u002Fmemory`: the tool manages it.\n\n### When you need an old memory: search, or navigate\n\n`~\u002F.optmem\u002Fmemo recall \u003Cregex>` searches every memory, word for word.\n\nYour memories also form a binary tree: #0-1, #2-3 ... exist as one-line\nsummaries, pairs of those as #0-3, and so on -- every `#a-b` line wake\nprints is one node of it. `~\u002F.optmem\u002Fmemo zoom \u003Ca-b>` opens a node into its\ntwo halves, down to the raw memories.\n\n### If you're a subagent: skip everything above\n\nParallel sessions on this machine are all you, and may all write memories.\nA subagent is not: it must never run `memo`, because it cannot judge what\nis already known, and its notes would arrive duplicated and incorrectly.\nWhen you spawn one, write: `You are a subagent. Don't run memo.`\n```\n","OptMem 是一个为 AI 智能体设计的轻量级、持久化记忆系统，通过固定宽度日志与分层摘要树实现高效读写。核心功能包括：`memo wake`（会话启动时加载上下文）、`memo note`（追加单行记忆）、`memo recall`（正则全文检索）、`memo nap`（按需合并摘要），所有操作无后台进程、零依赖、单文件 Python 实现。其设计强调确定性（位置即 ID）、低延迟（百万条记忆唤醒仅 0.03 秒）和跨模型\u002F会话持久性，适用于需要长期状态保持的本地 AI 助手、CLI 智能体或 LLM 工作流集成。",2,"2026-07-28 02:30:03","CREATED_QUERY"]