Bake Context Down to Pure Signal.
TokenOven is the active context-governance engine that sits between your agent and frontier LLMs. It compresses bloated traces, multi-file codebases, and RAG bundles by 40–80% while mathematically guaranteeing that hard constraints, file paths, identifiers, and benchmark numbers are 100% preserved.

Raw tokens in. Refined intelligence out.
How TokenOven transforms massive, redundant multi-turn agent context into compact, deterministic signal before model inference.
Large, noisy context
Bloated logs, repetitive code ASTs, multi-file RAG chunks, and accumulating conversation history.

TokenOven compression
Active heat-baking, deterministic AST deduplication, and <|to:pinned_facts|> operational guardrails.
Smaller context
High-density context buffer ready for lightning-fast, cost-effective inference without hallucination.
See Context Compression in Action
Select a real-world trace, switch compression modes, and inspect the side-by-side prompt diff, live BakeReport, and reversible OvenHandles.
[SYSTEM] You are a senior runtime systems engineer inside Verdict PAS (Programmable Agent Swarm). Strict Policy: Never mutate registry.py directly. Acceptance gate: BCB-100 must exceed 50/100. Tool schemas: [34 distinct tools with verbose JSON definitions, 8,200 tokens] [ARCHITECT TO DIRECTOR] Evaluated 4 repair options for failure #402 at /Users/trentcarter/Artificial_Intelligence/AI_Projects/Verdict/src/core/router.py. Option A: Rewrite routing table (Rejected: breaks legacy backwards compatibility). Option B: Patch dispatch regex (Accepted). Option C: Invalidate cache keys (Rejected: causes 400ms latency spike). Option D: Full retry loop (Rejected: costly). [DIRECTOR TO PROGRAMMER] Task: Patch dispatch regex in /Users/trentcarter/Artificial_Intelligence/AI_Projects/Verdict/src/core/router.py. Hard Constraint: Keep time-to-first-token under 4.0 seconds. Benchmark history: - Run 2026-05-01: BCB-100=33/100, syntax-recovery subset +14.8pp, total gate failed by -20pp. - Run 2026-05-02: BCB-100=38/100, syntax-recovery subset +19.2pp, total gate failed by -15pp. Test failure stack trace: AssertionError: Port mismatch at /Users/trentcarter/Artificial_Intelligence/AI_Projects/Verdict/tests/test_router.py line 144. Expected 8080 got 8000. ... [420 lines of stack trace & build logs omitted] ... [USER CORRECTION - LATEST] "Do NOT touch /Users/trentcarter/Artificial_Intelligence/AI_Projects/Verdict/src/core/auth.py either, and verify port 8080 is strictly enforced."
<|to:v1 id=to_bal_01 mode=bal raw=52400 cmp=19410 sha=8fa1b2|> $ROOT=/Users/trentcarter/Artificial_Intelligence/AI_Projects/Verdict $CORE=$ROOT/src/core [SYSTEM: PROTECTED CACHED PREFIX] Runtime Systems Engineer. Gate: BCB-100 > 50/100. Pinned policy intact. [CRITICAL PINNED CONSTRAINTS] 1. Never mutate $ROOT/registry.py 2. Never mutate $CORE/auth.py 3. Port must strictly be 8080 (assertion failed at test_router.py:144) 4. TTFT budget: < 4.0s [CURRENT DIRECTIVE] Patch dispatch regex in $CORE/router.py to resolve port 8080 mismatch. <|to_mem id=bench_2026_05_02|>BCB-100=38/100; +19.2pp; prior 33/100 (+14.8pp)<|/to_mem|> <|/to:v1|>
Why This Is Not Just Summarization
Standard summarization optimizes for human reading prose and destroys machine task state. TokenOven is an active context governor designed for autonomous agent execution.
Operational Fact Guardrails
Naive summarizers casually drop file paths, error codes, and acceptance gates. TokenOven treats context as structured state: hard constraints, file paths, and identifiers are pinned and verified via <|to:pinned_facts|> fallback rescue.
OvenHandles (<|to_mem|>)
Transforms compression from destructive deletion into a tiered memory hierarchy. Raw traces are indexed into high-speed memory and replaced with lightweight recall handles that can be rehydrated on demand.
Cache-Aware Prefix Assembly
Standard compression breaks prompt caching by altering initial tokens. TokenOven keeps system instructions and tool schemas byte-static, placing compressed context strictly past the provider's cache boundary.
Deterministic Fast Compactors
Before invoking any model-based compression, TokenOven runs sub-10ms deterministic dedup, symbolic path aliasing ($ROOT=...), schema compaction, and log stripping with zero external compute cost.
Tokenizer-Aware Optimization
Different tokenizers count the same text differently. TokenOven optimizes specifically for the target model's tokenizer (o200k, Anthropic BPE, SentencePiece) to maximize verifiable token efficiency.
Governance vs. Summarization
Built for long-running agent swarms and enterprise RAG. TokenOven pins active task state, eliminates amnesia loops, and stops context rot during multi-agent handoffs.
How TokenOven, TokenTumbler & Verdict Connect
Each product stands alone with its own market interface, while recursively reinforcing one another to deliver the fastest, cheapest, and highest-IQ inference pipeline.
Verdict
The battle-tested execution environment. Uses TokenOven inside PAS agent loops (Architect → Director → Programmer → Judge) to prevent context amnesia and stop context rot.
TokenTumbler.ai
Evaluates every request, intercepts prompts ≥ 4k tokens, and calls TokenOven to compress context before tumbling requests across Mode 1 through Mode 4.
TokenOven
Stands alone as a hosted API (api.tokenoven.com) or local daemon. Ingests context, pins non-negotiable facts, generates OvenHandles, and outputs verified high-density prompts.
Deterministic Guardrail Benchmarks
Illustrative simulation: Comparing naive summarization against TokenOven ALTC fact-pinning heuristics. Operational constraints, file paths, and test metrics are pinned into <|to:pinned_facts|> to safeguard against degradation.
| BENCHMARK SUITE | RAW TOKENS | NAIVE SUMMARIZER | TOKENOVEN | UNPINNED CONSTRAINTS |
|---|---|---|---|---|
Verdict PAS Agent Handoff 50k context | 52,400 | 23,100 tok · 21.4% dropped | 19,388 tok (-63.0%) | 0 unpinned |
Constraint Retention Bench 32k context | 32,000 | 14,200 tok · 18.0% dropped | 11,808 tok (-63.1%) | 0 unpinned |
Multi-Needle Retrieval (10) 64k context | 64,000 | 26,000 tok · 30.0% dropped | 21,504 tok (-66.4%) | 0 unpinned |
Codebase & Stack Traces 40k context | 41,200 | 18,000 tok · 15.5% dropped | 15,120 tok (-63.3%) | 0 unpinned |
Enterprise RAG Bundle (20) 28k context | 28,500 | 12,100 tok · 14.0% dropped | 8,807 tok (-69.1%) | 0 unpinned |
TokenOven Tagged Context Protocol
Provider-neutral tags that pass cleanly through standard OpenAI and Anthropic endpoints without custom server modifications.
<|to:v1 id=to_0001 mode=bal raw=18420 cmp=7210 sha=9f8a31|> $ROOT=/project/root [PINNED] Port 8080 mandatory · Do not mutate auth.py [TASK] Patch dispatch regex in router.py <|/to:v1 id=to_0001|>
One Line to Slash Your Token Bill
Wrap standard OpenAI clients, route via TokenTumbler, or call the REST endpoint directly.
# pip install openai
from openai import OpenAI
# Standard OpenAI client pointing to TokenOven gateway
client = OpenAI(
base_url="https://tokenoven.com/api/v1",
api_key="sk-...", # Upstream provider key (OpenAI, DeepSeek, etc.)
default_headers={
"X-TokenOven-Compress": "true",
"X-TokenOven-Mode": "balanced"
}
)
# Use with_raw_response to access live BakeReport telemetry headers
raw_response = client.chat.completions.with_raw_response.create(
model="gpt-4o-mini",
messages=large_context_messages,
stream=False
)
headers = raw_response.headers
completion = raw_response.parse()
print(f"TokenOven Status: {headers.get('x-tokenoven-status')}")
print(f"Tokens Saved: {headers.get('x-tokenoven-savings-pct')}")
print("Response:", completion.choices[0].message.content)