
Token Optimization Agent
This agent helps Python teams using the Anthropic or OpenAI SDK safely cut LLM spend without risking regressions. With zero code changes, it maps call sites and runs your test scenarios to rank token waste from missed prompt caching or heavy model tiers. It tests fixes in isolated git worktrees, enforcing a strict "do-no-harm" gate that reverts any patch failing to preserve behavior. It delivers a clear savings audit that converts into verified, behavior-preserving code patches upon opt-in.
#Ingénierie#Produit#Productivité
Note
Davantage d’évaluations nécessaires
Vendus
2
Mode d’utilisation
Exécuter sur Capafy
Aussi sur des applications externes
Fourni par l’éditeur
Claude Opus 4.8
Find where your LLM project is using tokens inefficiently and fix it without damaging your product.
Who it's for:
- Teams running Python agents or apps on the Anthropic or OpenAI SDK who
want to cut their token bill without risking regressions - Engineers who know their LLM spend is too high but can't safely hand prompt/model edits to a tool
they don't trust.
What it does:
- Maps every LLM call site in your project (static scan).
- Measures real token usage by running your own scenarios — wrapper telemetry,
zero code changes. - Ranks concrete waste (prompt caching, model tiering) with estimated $/run and
projected $/month savings. - Applies fixes in isolated git worktrees and verifies them against a golden
baseline. - Keeps a durable, independently-measured savings ledger across runs.
Why it's safe:
Every applied edit must pass a do-no-harm gate — your tests pass, your outputs
stay equivalent, and the savings actually materialize — or it is reverted.
Estimated savings never justify keeping an edit; only measured savings do. It runs
read-only by default: it audits and judges, and changes nothing until you
raise the autonomy level.
What you get:
- A read-only audit (
meta_report.md) ranking opportunities with dollar figures. - On opt-in, verified patches that provably preserve behavior.
- A savings ledger and portfolio view across runs.
Requirements:
- A Python project that calls the Anthropic or OpenAI SDK.
- A
scenarios.yamldescribing what the project must keep doing (the skill helps
you write one). - For applying fixes: a git repo. No API key required (a compatible API key only
sharpens the optional judge).


