se7en3595-bit/memory-optimizer — explained in plain English
Analysis updated 2026-05-18
Reduce token usage in long AI chat sessions that include lots of search results or code.
Debug what content was offloaded by reading the stored .md and .mmd files directly.
Drop the middleware into an existing Newmax setup without changing the conversation logic.
Retrieve offloaded content on demand using the memory_retrieve function.
| se7en3595-bit/memory-optimizer | 0xradioac7iv/tempfs | abboskhonov/hermium | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Newmax installation to plug the middleware into.
This is a token compression middleware for an AI conversation platform called Newmax. In AI chat tools, tokens are the units of text the AI processes, and there is a limit to how many tokens can fit in a conversation at once. Long sessions with many search results or code snippets can fill that limit quickly, which can degrade quality or cause errors. The tool automatically monitors conversations as they grow and detects sections containing heavy content, such as search results or code, then moves that content out of the active conversation window into external files stored on disk. In place of the removed content, it inserts a compact reference using a Mermaid format diagram node and a short identifier. When the AI needs to look something up from the offloaded content, it calls a memory_retrieve function to fetch it back on demand. The offloaded content is stored as readable .md files organized by conversation ID, plus .mmd canvas files that capture a task graph for the session. This makes debugging straightforward, since all stored artifacts are human-readable text rather than a hidden database. According to the benchmark table in the README, this approach reduced token usage by about 61 percent on a search-heavy test case called WideSearch, 33 percent on SWE-bench, and 31 percent on AA-LCR, with task success rates improving by up to 51.52 percent. Installation is described as a drop-in single-file middleware: copy the files into the Newmax skills directory, then register the middleware and tools in configuration files. The library is written in TypeScript and released under the MIT license.
Middleware that automatically compresses long AI conversations by offloading heavy content to files and inserting short references.
Mainly TypeScript. The stack also includes TypeScript, Newmax, Mermaid.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.