Chengjun023/agent-smith
Token 超支?快给史密斯打电话! Better Call Smith. Adaptive model routing, a glassy Codex usage monitor, and reproducible benchmarks with receipts.
What it solves
Agent Smith reduces the cost of using Large Language Models (LLMs) by preventing the over-use of expensive, high-end models for simple tasks. It ensures that routine work is handled by lighter, cheaper models while reserving "heavy hitters" for complex cases, thereby optimizing token spend without sacrificing quality.
How it works
The project consists of two primary components:
- Adaptive Router: A local model selection system that uses a heuristic difficulty score (1.0–10.0) to route independent work blocks to the most appropriate model. It considers user preferences (quality, balance, cost, or speed) and uses evidence-backed acceptance to decide which model to use. It can discover new model entries from models.dev and manages a local registry of capabilities and prices.
- Codex Float: A native macOS floating window that provides real-time visibility into LLM usage. It monitors reasoning effort, task difficulty, token counts, and estimated cost savings, using a local SQLite ledger to track usage across restarts.
Who it–s for
Developers and power users of Codex who want to monitor their token expenditure and automatically optimize which model handles specific parts of a task to save money and reduce latency.
Highlights
- Cost-Optimization: Demonstrated an 86.89% reduction in reference costs in pilot benchmarks compared to using a fixed high-end model.
- Coded Evidence: Uses explicit
accepted,rejected, andunknownsemantics for model dispatch and acceptance. - Native Monitoring: Includes a macOS-native floating window for transparent, real-time usage and cost tracking.
- Reproducible Benchmarks: Features a deterministic grading system to verify that routing strategies maintain task success rates.
Related
- Project
- Project
- Project
- Project