Tameru (財める) Compaction System
A query-aware, deterministic, purely extractive context compaction engine for autonomous LLM agents.
Overview
Named from 財める (tameru), Japanese for "to save or store up". Long-running agents fill their context with tool output, plans and history, and something has to decide what survives when the window runs out. Most systems answer that with a model-written summary. Tameru answers it with selection: it is deterministic and purely extractive, so the compacted context is made of real spans from the transcript rather than generated paraphrase, and every decision can be audited and reproduced.
TL;DR
- Deterministic, purely extractive compaction with zero dependencies
- Typed-edge dependency restoration keeps related spans together
- SelfCompact-style timing gate decides when to compact
- Plan-aware multi-query and qualifier-aware structured trimming
- Derived-objective mode for empty or implicit goals
Why extractive
Abstractive summaries read smoothly but they lie quietly: details get paraphrased, numbers drift, and there is no way to trace a claim back to the original text. For an agent acting on its own history, that is a correctness problem, not a style problem. Extractive compaction keeps the ground truth intact. If a span is dropped, it was a deliberate, logged decision.
Design principles
- Deterministic output: the same input always produces the same compacted context
- No model in the loop: compaction is a selection problem, not a generation task
- Query-aware: what gets kept depends on what the agent is currently trying to do
- Zero dependencies: a single importable package, MIT licensed
The repository includes benchmarks, fixtures, harnesses and a test suite, because a compaction system you cannot measure is just a hope.
In practice
Tameru ships with a Hermes integration, wiring deterministic compaction into the Hermes agent loop where context pressure is a daily reality rather than a benchmark curiosity.
Status
v1.3.0 is released under MIT on GitHub.