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 anv-agent (caps, guard, accounting, cache) and mind-services (Quorum packing, SessionSynthesizer threads at ~25x).

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; measurement trials with published scripts arrive Q3 2026.

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.

Stop Starting From Zero.

One binary. 11+9 Rust crates. 545 tests. Hand-written HNSW index. Three transport modes. Four providers, Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.