Flat context across 100+ turns.
Median −34% billed. Up to −89% on replay-heavy loops.
A local context and delta layer for stateless AI agents. Instead of re-sending the same files, web pages, and old tool results on every step, ToolRecall sends only what changed and tucks older reads away until needed, cutting typically 45–83%, up to −93% of prompt tokens across coding, browser, SQL, and research tasks.
pipx install toolrecall && toolrecall setup
Verify live token & dollar savings anytime: toolrecall top (live TUI) or toolrecall status
−92.5% prompt tokens, 20/20 solved in 80 steps on a live 20-task Playwright Enterprise ERP run.
−59.0% prompt tokens, 0 cache busts on a 60-bug endurance run (DeepSeek V4.1 Flash).
−19.2% real billed $ on Spider 2.0 dbt SQL/analytics tasks.
Built for agents that own their message loop.
Real token savings come from multi-turn stateless agents that inspect large state.
See it in action.
The “context snowball” kills long sessions.
LLM APIs re-transmit the entire message history on every turn. Re-reading the same file on turn 2, turn 9, and turn 14 bills you quadratically until context overflows.
Where a naive loop hits the 200k context ceiling and compaction (or a crash) kicks in.
ToolRecall's context at turn 50, still far below the ceiling: −53.4%.
Steady-state growth with ToolRecall, versus +3,220 tok/turn naive.
Cut live prompt bloat without changing agent behavior.
In stateless agent loops, every turn re-sends prior file reads and command outputs. ToolRecall caches them locally by content hash and tracks which clean reads can be safely dropped. Full per-decile charts and cross-domain evaluations live on Benchmarks.
Hash every read
Files, pages and tool outputs are cached locally in SQLite by content hash, with mtime/size checks so edits are always seen.
Send only what changed
Repeat reads come back as a short "unchanged" marker or a diff (files, accessibility trees) instead of the full payload again.
Tuck old reads away
Clean reads the agent no longer needs are evicted from the live context and stay recallable on demand, which delays compaction.
Who should not install this for token savings.
So you don't waste time benchmarking the wrong workload.
Stateful coding CLIs & short conversational tool loops
ToolRecall only saves tokens when large, quasi-static state (files, AX-trees, long articles) is re-sent across turns.
Interactive coding CLIs
Claude Code, OpenCode, Cursor, Codex CLI: measured across 193 local Claude Code sessions and OpenCode SWE-bench runs. They already manage their own context.
Short conversational APIs & one-off shell triage
−0.25% dedup on 278 tau2-bench support chats and 0.0% on 20 ITBench SRE bash runs: small, unique JSONs/commands don't repeat.
Don't route file tools through MCP (cached_read)
Exposing redundant file tools alongside native read/bash/grep is either ignored or increases cost (up to 2.4× measured on Claude Code).
FAQ
Does this replace provider prefix caching?
No, it's additive. Provider prefix caching discounts repeated prefixes, while ToolRecall shrinks what stays in the context window and delays compaction.
What if a file changes on disk?
Every read checks mtime/size and content hash via keys.py. Any edit invalidates the entry immediately and serves fresh bytes.
Does anything leave my machine?
No. ToolRecall runs 100% locally on SQLite with zero runtime dependencies and no telemetry or cloud calls.
Install in one line. Runs fully local.
Pure Python 3.11+ standard library, local SQLite, no telemetry.
pipx install toolrecall && toolrecall setup
Verify live token & dollar savings anytime: toolrecall top (live TUI) or toolrecall status