world-model-optimizer
Build continually improving models on your agent traces by distilling frontier open models
What is it?
What it is
A Python command‑line tool that turns collected agent traces into smaller, open‑source models, optimizes routing between a frontier of large models and those smaller models, and serves the resulting policy or distilled model via HTTP or a platform API.
Why it exists
To enable continuous improvement of agent performance by automatically building, evaluating, and deploying optimized routing policies or distilled models, reducing cost while maintaining frontier quality.
Who should use it
ML engineers, AI researchers, and developers building LLM-based agents who want to reduce costs, improve performance, and continuously optimize models using their own traces.
Who should avoid it
Beginners with little experience in machine learning, LLMs, or agent-based systems, and users seeking a simple plug-and-play API without optimization workflows.
How it works
A quick walkthrough in plain English
How world-model-optimizer works
Step 1 of 3
You interact with it
Open world-model-optimizer, send a request, or connect it to your stack.
Features
Advantages
- 27% cost reduction at frontier quality (RouterBench benchmark)
- Continuous improvement: rerun pipeline as new agent traces arrive
- Optional closed-loop simulation for robust training
- Cost savings through intelligent routing between model tiers
- Full ownership and iterative improvement of custom models
- Flexible multi-provider support via dynamic model registration
- OpenTelemetry trace integration for data-driven routing decisions
- Quantifiable savings reporting against user-specified baselines
- Hosted platform eliminates credential management for cloud runs
- Secure agent execution in E2B sandboxes with isolated environments
- World models enable safe, repeatable environment simulation for testing
- Opt-in workspace upload preserves concurrent edits during live-sync
- Streamlined development with pre-configured tooling (uv, ruff, ty, just)
Disadvantages
Installation
cloud
Create an account at platform.experientiallabs.ai, then authenticate the CLI with: wmo login
native
pip install world-model-optimizer pip install "world-model-optimizer[e2b]"
FAQ
What does the `wmo optimize route` command do?
It allows you to build a router that directs requests between frontier models and smaller, cheaper models. By using your own traces, you can create a policy (e.g., using k-nearest neighbors) that maintains high quality while significantly reducing costs.
How can I use E2B sandboxes for evaluation?
To evaluate local optimizations in E2B, install the extra package using `pip install "world-model-optimizer[e2b]"` and provide your `E2B_API_KEY`. This allows you to run agents in isolated sandboxes while the world model provides the environment.
Can I use the world model as an API?
Yes. You can use the `wmo` Python library to load world models for simulation, or interact with them over HTTP using the `/world_models` endpoints to manage sessions and steps.
How do I run an agent hosted on the platform?
First, authenticate using `wmo login`. Once logged in, you can run a hosted agent by using the command `wmo run <agent-id>`. You can also use the `-u` flag to enable workspace upload for live-syncing changes.
Does the tool collect sensitive data through telemetry?
No. WMO uses anonymous usage telemetry to track volume, but it strictly excludes prompts, traces, actions, observations, file paths, model names, provider credentials, or any raw user content.
Featured in Videos
YouTube tutorials and walkthroughs for world-model-optimizer
Alternatives
Similar projects ranked by category, topics, and text overlap.