Glossary · Token-Fold

Token-Fold.

Compression in three tiers.

Direct answer

Token-Fold is Anvaya's staged compression thesis: Micro (per-tool-call output caps and filters), Meso (per-turn packing under budget), and Macro (cross-session synthesis into threads and nodes). Each tier assumes the last leaks, caps catch verbose tools, packing catches redundant retrieval, synthesis catches repeated history. Design thesis: 100+ tool rounds at stable quality, because no single tier carries the whole burden.

In Anvaya

How We Implement It.

01Token-FoldImplemented across the harness (output caps, context guard, accounting, prompt cache) and the memory engine (Quorum packing, session synthesis into threads at ~25x design estimate).

Questions

Asked About Token-Fold.

Q

What breaks first without staged compression?

Tool outputs: one verbose test run or directory dump poisons every later turn until compaction. Micro caps are the cheapest lever.

Q

How many tool rounds stay stable?

Design target is 100+ rounds at stable quality. Measured so far: micro-fold −11.0% median uncached (n=5, verification 19/19), headless fix tasks −11%…−21%; meso variants measured losses and were retired.

Q

Is Token-Fold just summarization?

No, summarization is one Meso tactic. Folding spans caps, packing, caching, isolation, and cross-session synthesis as one budget discipline.

Run Agents That Fit On Your Laptop.

25.6 MB median RSS. 25 agents ran in parallel on a Core 2 Duo with 4 GB RAM. Hundreds on your machine. Zero cloud required on the Ollama path.

Requires Rust/cargo to build from source. Linux and macOS today, Windows not yet supported. Pre-1.0, public beta. Pricing TBD.