Agent token use optimiser

Use
less
tokens.

Tokenless is a six-phase pipeline that gives AI agents 60–92% token savings on a wide range of agentic tasks — without losing the information that matters. Free and open source.

Live savings estimate Running
Loaded
0%
Avoided
0%
0
tokens avoided
0%
avoidance rate
SCAN
LOCATE
ZOOM
EXTRACT
ACT
DISCARD
How it works

Six phases.
One goal.

Every call runs the same deterministic pipeline. Token budgets are enforced at each phase — no overruns, no surprises.

01
Scan
5% of budget
Detect content type. Build a ranked region index without loading the full document.
02
Locate
3% of budget
Rank regions by relevance to your query. Deduplicate overlapping sections.
03
Zoom
35% of budget
Extract windowed content from top-ranked regions only. The rest is never read.
04
Extract
12% of budget
Parse fields, bullets, and tables from zoomed content into structured output.
05
Act
45% of budget
Your agent takes action using the compact result — not the raw document.
06
Discard
~0
Raw content is collapsed from session memory. Nothing lingers in context.
Benchmarks

Real numbers.
Real documents.

Content Type Input Tokens Avoidance
0%
average token avoidance across all content types
10
content types auto-detected — no configuration required
100%
recall across all benchmark fixtures — information preserved
Installation

Up in sixty
seconds.

Terminal
# Install the package
npm install tokenless

# (Optional) Set up Claude Code integration
tokenless init --global --hooks
Usage
import { pipeline } from 'tokenless'

const result = await pipeline(content, query, {
  tokenBudget: 4000,
  topN: 3,
})

// result.economy.avoidanceRate  → 0.88
// result.bullets                → key facts
// result.fields                 → structured data
// result.economy.tokensAvoided  → e.g. 9,429