VictorTaelin/OptMem
Permanent memory for AI agents. A 426-token prompt, a script, plug and play.
What it solves
OptMem provides a permanent, persistent memory system for AI agents that survives across different sessions, model updates, and vendor changes. It prevents agents from forgetting decisions, insights, and user preferences over time.
How it works
It uses a lightweight Python script and a specific prompt to integrate with agents. Memories are stored as fixed-width records in an append-only log. To manage scale, it organizes memories into a binary tree of summaries, allowing the agent to navigate from high-level summaries down to specific raw memories using a "zoom" command. The agent interacts with the system via a CLI tool (memo) to wake up (load memory), record new notes, search via regex, and refine summaries through a "nap" process.
Who it’s for
Developers building AI agents that require long-term memory and the ability to recall specific facts or insights across multiple sessions without relying on a proprietary database.
Highlights
- Zero Dependencies: Written in a single Python 3 file with no external libraries.
- High Performance: Fixed-width records allow for near-instant lookups even with millions of memories.
- Tree-based Navigation: Uses a binary tree of summaries to help agents efficiently browse their history.
- Portable Storage: Memory files can be stored in any directory, making them easy to sync or version control via Git.
Related
- Project
mnemon-dev/mnemonMnemon is a cross‑platform CLI that adds persistent, graph‑based memory to LLM agents. The host LLM supervises what to remember, link, or forget, while Mnemon handles deterministic storage, decay, deduplication, and optional vector search. It integrates with many AI coding tools (Claude Code, Codex, Cursor, etc.) via one‑click setup, requiring only a single local binary and no extra API keys.
- Project
zjunlp/LightMemLightMem is a lightweight memory management framework for LLMs and AI agents, providing efficient storage, retrieval, and update mechanisms. It reduces token usage and latency while maintaining high accuracy on long-context benchmarks.
- Project
MemTensor/MemOSMemOS 2.0 is a Memory Operating System for LLM‑based AI agents. It offers a unified API to store, retrieve, edit, and delete multi‑modal memories (text, images, tool traces) organized as a graph. The system can run as a hosted cloud service (API‑key access) or be self‑hosted via Docker (Neo4j + Qdrant) or a local SQLite plugin. Ready‑made plugins integrate MemOS with OpenClaw, Hermes, and DeepSeek Harness. Benchmarks show it outperforms existing commercial memory products. Licensed under Apache 2.0.
- Project
JuliusBrussee/cavememA cross-agent persistent memory system for coding assistants that uses compressed local storage and MCP to allow AI agents to remember information across sessions.
- Project
MemoriLabs/MemoriA persistent, structured memory layer for AI agents that captures conversations and and agent execution traces to eliminate session amnesia and reduce token costs.