frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Oc-mnemoria – Persistent memory for AI coding agents

https://github.com/one-bit/oc-mnemoria
1•one-bit•1h ago
I built this to solve a problem that kept annoying me: every time I start a new AI coding session, the agent has zero memory of what happened before. Decisions, discoveries, bug fixes - all gone. oc-mnemoria is an OpenCode plugin that gives all agents a shared persistent memory store - a "hive mind." The plan agent records a decision, the build agent sees it. The review agent flags a bug pattern, and next session the build agent knows about it. The storage engine is mnemoria, a Rust crate I also wrote. Some details on the architecture: - Append-only binary log with CRC32 checksum chains for integrity - Hybrid search: Tantivy BM25 + simsimd SIMD cosine similarity - ~95us search latency, ~9,900 writes/sec on commodity hardware - Single file format, git-friendly - rkyv zero-copy deserialization (no parsing overhead) The plugin side (TypeScript) handles: - Automatic intent capture from chat messages - System prompt injection with relevant memories at session start - Per-agent tagging so you know which agent recorded what - Selective forgetting and compaction for memory maintenance Everything runs 100% locally. No data leaves your machine. The memory store is a single binary file you can commit to git, back up, or delete to reset. I built this because I use OpenCode daily and got tired of re-explaining the same context every session. Happy to answer questions about the Rust internals, the plugin architecture, or the append-only storage design. GitHub: https://github.com/one-bit/oc-mnemoria Rust engine: https://github.com/one-bit/mnemoria npm: https://www.npmjs.com/package/oc-mnemoria crates.io: https://crates.io/crates/mnemoria