world-model-optimizer logo

world-model-optimizer

Build continually improving models on your agent traces by distilling frontier open models

Developer ToolsAI AgentsPython 283 32Health 62
Website GitHub

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

wmo optimize: converts agent traces into smaller open-source models using Tinker API with optional closed-loop simulation training
wmo serve: provides HTTP endpoint for routing requests between frontier and smaller models
Provider registration: `wmo providers set` to discover and register models from backends (e.g., OpenRouter)
Router tuning: build, sweep, and fit routing policies from OTel traces
Model serving: deploy tuned router with `wmo serve`
Performance reporting: compare against baseline models with `wmo optimize route report`
Model distillation: create custom small models via `wmo optimize distill`
Single-model pinning: serve one model without routing via `wmo optimize route pin`
Agent harness optimization: build and tune agent components with `wmo optimize harness`
Hosted platform integration: login, run agents, and manage credentials via Experiential Labs platform
E2B backend support: execute agents and optimizations in isolated sandboxes
World model API: programmable (Python) and HTTP interface for environment simulation
Workspace upload: opt-in live-syncing of local changes with platform
Development toolchain: managed setup with uv, ruff, ty, and just

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.

    Loading documentation…
    View on GitHub

    Featured in Videos

    YouTube tutorials and walkthroughs for world-model-optimizer

    Alternatives

    Similar projects ranked by category, topics, and text overlap.

    Compare
    world-model-optimizer | MushyBook