AI Agent Hub
Back to plugins
mosaic-memory-compress preview

mosaic-memory-compress

Memory Updated 2026.09.05

Run the following command in DeepSeek Harness:

dsh plugin install TuringCorp-net/mosaic-memory-compress

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install TuringCorp-net/mosaic-memory-compress in your terminal to install the plugin; the source is available at https://github.com/TuringCorp-net/mosaic-memory-compress .

About this plugin

LLM conversations grow every turn, yet the context window stays fixed. The industry-standard fix is threshold summarization: once the window fills, squeeze the entire history into a single brief and hand it to the next model. Structurally, though, that is amnesia followed by reading a diary — a hard switch point, indiscriminate loss (the user s latest instruction gets paraphrased too), and an invisible gap the next model can neither detect nor compensate for.

MosaicMemoryCompress models biological forgetting inside one message array. Distant turns settle into a semantic-memory zone (rules and lessons that must never be lost), recent turns stay in a vivid episodic zone, and the freshest turns remain verbatim. There is no reset moment, no hard length ceiling; loss is graduated and visible — the model knows what it no longer knows and can fetch detail from host-side storage on demand. The algorithm is fully stateless: feed its output back in as the next turn s input with no session bookkeeping. The Light zone is pure structural truncation with zero LLM cost; only the Heavy zone calls the user-supplied LLM. A ready-made DeepSeek Harness adapter ships in the box, while the core library stays framework-agnostic.

Built for agent developers who need a single conversation to run for hundreds or thousands of rounds without repeatedly resetting context. Bring any LLM — OpenAI, Anthropic, a local model — via a single callLLM callback for Heavy compression, or omit it entirely for safe, zero-LLM Light truncation.

Screenshots

Use Cases

  • Agent conversations that outgrow the context window and need automatic compaction
  • Tool-call-heavy workflows where rules and latest instructions must survive
  • Hundred-plus-round dialogues that need to avoid the semantic gap caused by threshold summarization

Best For

  • Agent developers building long-running LLM conversations
  • DeepSeek Harness plugin ecosystem users
  • Teams managing multi-turn AI dialogues without repeated context resets