For long-horizon agentic workflows

Optimize how your
agents run.

LeanTokens routes each sub-task to the right model, harness, tools, and context. It verifies before failures cascade. It learns from every run. Three objectives, tuned together, not three separate tools.

harness agnostic model agnostic verified self-host or managed benchmarked on DeepSWE
§ 01 . the control panel

Every run is a set of decisions.

For each subtask, LeanTokens selects an approved execution setup: agent, model, reasoning effort, tools, skills, and context. It then verifies the result and records the decision.

fig 01 . control surface
LeanTokens control flow A prompt is planned into three configured sub-tasks, verified, returned as output, and used to update the policy for later runs. Prompt from any agent framework Planner decompose · assign t1 · extract Luna context 2k tokens tools off t2 · classify Luna context 1k tokens tools off t3 · summarize Sonnet context 8k tokens skill doc Verifier check · retry Output tokens · latency · cost LEARNING LOOP · POLICY UPDATE
one prompt in, N sub-tasks configured, one verified output
policy updates after each run ↑
§ 02 . what it optimizes

Optimize for cost, speed,
and quality.

01
COST
Only the tokens you need.

Route each sub-task to the smallest capable model. Size context to the step. Skip redundant passes. Cache and reuse where valid.

02
LATENCY
Parallel by default.

Independent steps run in parallel. Long chains collapse where they can. Verifier retries are bounded, not open-ended.

03
QUALITY GATE
A floor you set.

You set an accuracy floor. Cost and latency optimizations only ship if outputs still pass the verifier and your regression checks.

where leantokens sits

Keep your agent stack. Add a control layer.

fig 02 . positioning
concern
model routers
prompt frameworks
Harnesses
leantokens
Model routing per sub-task
Prompt + context sizing
Agent execution + tools
Verifier-guarded outputs
Joint quality + tokens + latency
Learns per workload
the bet
“Agent stacks are getting more complicated, not less. Someone has to turn the dials so you don't have to.”
§ 03 . how a run looks

Plan, configure, verify, learn.

fig 03 . one run
leantokens . orchestrate.log ● LIVE
$ leantokens run "extract + summarize"
 
plan │ 3 sub-tasks . parallel: 2
config│ t1 extract Luna . context 2k
│ t2 classify Luna . context 1k
│ t3 summarize Sonnet . context 8k
verify│ t1 ok t2 ok t3 retryok
learn │ Luna @ extract, saved 62% tokens
────────────────────────
done │ q 0.94 tokens 11.2k t 3.8s
§ 04 . what changes over time

Every run makes the next run cheaper and better.

For each run, LeanTokens records what it selected, why it was allowed, what it used, what it cost when known, and whether verification passed.

fig 04 . run history . illustrative
run
settings
tokens
latency
$ cost
001
Sonnet · 8k · verify off
24k
6.1s
$0.42
008
Sonnet · 4k · pair-check
18k
5.2s
$0.32
022
Luna@extract · Sonnet@sum
14k
4.4s
$0.24
037
Luna · 2k · parallel × 2
12k
4s
$0.19
050
Luna · 2k · retry × 1
11.2k
3.8s
$0.14
tokens per run
−54%
time per task
−37%
§ 05 . fits your stack

Built around the tools you already use.

Harnesses
Codex · Claude Code · Cursor · Pi · Your internal agent
Models
GPT-5 · Claude Sonnet · Claude Opus · Gemini · Approved internal models
Controls
Per-run cost caps, latency targets, minimum accuracy, maximum retries.
reports
Every run is reproducible, diffable, and explains why it chose what it chose.