Hi HN, we built world-model-optimizer, an open source tool to continually improve a specialized model for an agent.
It does this by simulating production tool responses through text world modeling (similar to QwenAgentWorld, summary here https://x.com/silennai/status/2073887455884058814).
We can then use this to train a router for frontier, OS, and local models (use defaults or pick which ones to optimize against).
wmo ingests agent traces, builds the simulation, embeds the traces, runs different models you choose against the simulation scenarios, and then uses a KNN for model selection (similar to https://arxiv.org/abs/2505.19797).
- Cache aware: cache is taken into account for the effective price in routing.
- Confidence gated: we don't deviate from the best fit model when paired evidence over retrieved neighbors is below 0.5 standard errors or on queries unlike anything in the fit set.
- Optimize for cost or quality: train a balanced, cost max, or quality max router.
Usage
`wmo build` creates the simulation (or add your own benchmark)
`wmo optimize` tunes the router
`wmo serve` starts the server and can run everything fully locally. The simulation and router can update over time as more agent traces are gathered and new models are added.
Router results vs Fable
- RouterBench: -66.5% cost, -1.7% performance, -24.7% latency p50. 77.5% of traffic to Sonnet 5, 16.1% Fable 5.
- TauBench: -44.5% cost, +6.3% performance, -20% latency. 83% to Opus 5, 17% to Kimi-K2.6 (over K3).
- Terminal Bench 2: -64% cost, +8% performance, -50.6% latency. Sonnet 5 is fully along the pareto front. Training a specialized router per task isn't cheap. In sparse data regimes the value can be "here's the best model".
We're working on sample effiient continual learning for agent specific models at experientiallabs.ai"
Not sure I get it. The model you're improving is local? If so how do you even calculate cost compared to an API
Interesting approach. What does the cold-start phase look like for a new agent? How many traces or runs do you typically need before the router has enough signal to safely offload tasks from the frontier model??
The title is misleading. This is model routing, not distillation.
The absolute best way to prove this works is by releasing a model that was fine-tuned with this method and then showing benchmarks depicting the improvement delta between the base model and the fine tuned one.
The work is not done. Then release it to the masses and wait a few days for the actual real world anecdotes.
Until then, this is noise.
[flagged]
Local models need to be tuned to work well so this looks useful. Seems to be for general purpose model serving. I’ve been using https://github.com/adrianco/retort to run experiments for coding models across 13 different programming languages to see which frontier and local models work.