Reddit - r/MachineLearning

[P] Stop force-feeding your agent 30,000 tokens of chat history just to wake up. We built DUMEdb (Apache 2.0) - 220-token zero-turn wake using 1959 IBM unit-record principles. [P]

Yo Peace! If you build autonomous agents or pair-program across multiple sessions, you've probably hit this wall: Every time an agent switches context or resumes a project, the standard practice in most frameworks is to dump 30,000+ tokens of raw chat history back into prompt memory.

Why this architecture breaks

  • KV-Cache / Context Choke: You're burning 25%-70% of your model's context ceiling on Turn 1 before doing any actual work.
  • Silent Compaction / Amnesia: When context fills up, the IDE or harness silently summarizes and truncates earlier turns. The first things lost are usually critical architectural rules and operator preferences.
  • Probabilistic Drift: Variables and operational state become a guessing game across multi-turn prompts rather than deterministic facts.
  • Cost & Latency: Re-ingesting massive transcripts on every wake handshake spikes latency and API costs.

The 1959 IBM 1401 Approach

To solve this, I had the idea to go back to 70-year-proven computing principles: the IBM 1401 unit-record processing system. That punch system just told the machine what to do separated by size cause they were only so big. So it just went super fast, and 100% facts, no drift!

With bloat float an agent can go from being on point to accidently removing one feature to fix another. Yall know what I'm talking about! LOL

In 1959, IBM systems didn't have gigabytes of digital RAM, and they certainly didn't recount every punch card in a stack to know a current balance. They read fixed, discrete column registers off 80-column cards at hardware line-speeds.

As our 1959 engineer persona Frank puts it:

"Deletions is where the lies live. You don't erase the ledger, and you don't recount every punch card to read the total. You read the register."

What is DUMEdb?

DUMEdb (Deterministic Unit-Record Memory Engine) replaces transcript replay with memory-mapped immutable registers:

  • 220-Token Zero-Turn Wake: Instead of replaying 30,000+ tokens, the agent executes a structured cabinet_wake handshake. It ingests operator identity, mode, touched files, and the immediate next move in under 220 tokens (~0.2% context usage, leaving 99.8% clean runway).
  • Zero Filesystem Rummaging: The agent is instructed not to run ripgrep or crawl directories to "remember" state. State lives in the registers.
  • 4.2 ยตs Zero-Copy LMDB Engine: Built on Lightning Memory-Mapped Database (LMDB). Pages are mapped directly into OS virtual memory with zero heap allocations, zero userspace copying, and zero JSON deserialization overhead.
  • Ground-Truth Context Odometer (Real Math): Most context bars in IDEs display smoothed, fake percentages. DUMEdb audits actual post-compaction JSON Lines byte counts directly from transcript.jsonl on disk, tracking real runway against hardware limits.
  • First-Class MCP Server: Connects natively to Antigravity, Cursor, Windsurf, Claude Code, and Copilot via standard Model Context Protocol. If you don't know what this is, hit me up and I'll try to help you get clarity! :-)
  • 100% Local & Private: Apache 2.0 open source. All registers, LMDB environments, and logs live strictly on your machine. Zero cloud telemetry.

Try it locally

# Install the package
pip install dumedb
# Launch engine with built-in visual inspector on port 8095
python -m dume -p 8095

Quick MCP Config (mcp_config.json):

{
  "mcpServers": {
    "dumedb": {
      "command": "python",
      "args": ["-m", "dume.mcp_server"],
      "env": {
        "DUME_PORT": "8095"
      }
    }
  }
}

Links & Resources

Would love to hear how folks here are handling cross-session state persistence and avoiding KV-cache compaction in long-running agent workflows. Feedback and PRs welcome!

Keep your context clear! :-) Peace!

Comments

No comments yet. Start the discussion.