AI CONTEXT COMPRESSION · ALTC ENGINECritical Fact Loss = 0TokenTumbler & Verdict Ready

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.

Launch The Oven Simulator
TokenOven chip oven with glowing heated token tiles
40–80%
Smaller Context icon
Token savings on long-running agent & RAG traces
0.00%
Cleaner Inputs icon
Critical loss — paths, constraints & numbers intact
< 8ms
Lower Costs icon
Fast compactor — deterministic dedupe & aliasing
100%
Better Outputs icon
Prefix cache hit — static system/tool prefix protected
01 / PROCESS ARCHITECTURE

Raw tokens in. Refined intelligence out.

How TokenOven transforms massive, redundant multi-turn agent context into compact, deterministic signal before model inference.

logs.txt{ schema }/src/api/*trace_turn_8

Large, noisy context

Bloated logs, repetitive code ASTs, multi-file RAG chunks, and accumulating conversation history.

→
TokenOven compression core

TokenOven compression

Active heat-baking, deterministic AST deduplication, and <|to:pinned_facts|> operational guardrails.

→
</> Pinned Specs (100%)
{ State Aliases }
Signal Buffer

Smaller context

High-density context buffer ready for lightning-fast, cost-effective inference without hallucination.

SMALLER CONTEXT
CLEANER INPUTS
LOWER COSTS
BETTER OUTPUTS
BUILT FOR DEVS
PRIVACY FIRST
INTERACTIVE OVEN SIMULATORIllustrative Simulation · Reference Trace Heuristics

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.

SELECT TRACE
TARGET MODEL
COMPRESSION MODE
Raw Input
52,400
Input tokens
Baked Context
19,410
Saved 62.96%
Fact Guardrail
Active Pinning
6 operational constraints pinned
Cost Delta
-$0.099
per request saved
Prefill Speedup
+264ms
faster time to first token
Raw Uncompressed Context52,400 tokens
[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."
⚠ Bloated with redundant schemas, repeating paths & logs · Unoptimized
TokenOven High-Density Context
19,410 tokens
<|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|>
Fidelity Verifier: Operational constraints pinned & verifiedGuardrail Status: Active
PINNED CONSTRAINTS
Never mutate registry.py directlyDo not touch auth.pyEnforce port 8080 strictlyBCB-100 gate > 50/100TTFT latency < 4.0sTarget file: src/core/router.py
CONTEXT GOVERNANCE PILLARS

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.

01 · Deterministic Fact Pinning

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.

Architectural Guardrail
02 · Reversible Memory

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.

Active TTCP Tagging
03 · Prefix-Cache Aligned

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.

Prompt-Cache Preserving
04 · < 10ms Latency

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.

Zero External Compute
05 · BPE & SentencePiece

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.

Multi-Tokenizer Heuristics
06 · Agent Multi-Turn

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.

Agent State Governance
THE TRI-SYSTEM ARCHITECTURE

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.

FLAGSHIP ENVIRONMENT

Verdict

Autonomous Coding & Swarm Platform

The battle-tested execution environment. Uses TokenOven inside PAS agent loops (Architect → Director → Programmer → Judge) to prevent context amnesia and stop context rot.

Exclusive, unlimited TokenOven compression ships natively with Verdict Enterprise tiers.
PAS · VAK · SAM · Crucible
BROKER & ROUTER

TokenTumbler.ai

Smart Orchestration Broker

Evaluates every request, intercepts prompts ≥ 4k tokens, and calls TokenOven to compress context before tumbling requests across Mode 1 through Mode 4.

“Tokens in, smarter answers out.” Compressing first cuts Mode 3 costs from $5.31 to under $2.00 per 1k tasks.
tokentumbler.aiMode 1–4
CORE ENGINE

TokenOven

Active LLM Token Compression

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.

TTCP Tagged Context Protocol passes seamlessly through standard OpenAI & Anthropic interfaces.
ALTC · TTCP · OvenBenchv0.1-alpha
Client Prompt→TokenTumbler Broker→TokenOven ALTC Engine→Model Ladder (1–4)→Claude / GPT-4o / DeepSeek→BakeReport Telemetry
Mode 1 · Local Qwen 2.5 Coder — $0.00 / LAN
Mode 2 · Selective Rescue — failed assertions
Mode 3 · Frontier-Lite — peak ROI hybrid
Mode 4 · Premium Apex — consensus swarm
ILLUSTRATIVE SIMULATION · OVENBENCH HEURISTICS

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 SUITERAW TOKENSNAIVE SUMMARIZERTOKENOVENUNPINNED CONSTRAINTS
Verdict PAS Agent Handoff
50k context
52,40023,100 tok · 21.4% dropped19,388 tok (-63.0%)0 unpinned
Constraint Retention Bench
32k context
32,00014,200 tok · 18.0% dropped11,808 tok (-63.1%)0 unpinned
Multi-Needle Retrieval (10)
64k context
64,00026,000 tok · 30.0% dropped21,504 tok (-66.4%)0 unpinned
Codebase & Stack Traces
40k context
41,20018,000 tok · 15.5% dropped15,120 tok (-63.3%)0 unpinned
Enterprise RAG Bundle (20)
28k context
28,50012,100 tok · 14.0% dropped8,807 tok (-69.1%)0 unpinned
*Illustrative simulation based on reference agent trace structures. Empirical results require execution of reproducible benchmark harness (scripts/test_tokenoven_endpoints.py). Fact pinning preserves extracted constraints and does not imply complete semantic preservation.
TTCP SPECIFICATION

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|>
Adds only ~10 tokens overhead per compressed block · RFC-TTCP-v1 Draft
DROP-IN INTEGRATION

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)
Available on PyPI and npm · Zero breaking changes · v0.1.0-alpha