Run agents, build world models from traces, and optimize agent harnesses.
Project description
World Model Optimizer
wmo is an open-source project for running and building continuously improving agents. It
includes a flexible agent runtime, a world model that simulates tool calls, and an optimizer that
builds task-specific harnesses for stronger performance at lower cost.
Getting started
Local setup
Install WMO, choose the model provider for the built-in runtime agent, and start a local run:
pip install world-model-optimizer
wmo providers set
wmo run --task "Inspect this repository and explain it"
Build a named world model from collected traces:
wmo build --file traces.jsonl --name my-environment
Then optimize an agent harness against that model and a set of tasks:
wmo optimize harness my-agent my-environment --tasks tasks.jsonl
Hosted platform
Create an account at platform.experientiallabs.ai, then authenticate the CLI:
wmo login
Copy an agent ID from the platform and run its current champion harness:
wmo run <agent-id>
E2B backend
Hosted agents already run in platform-managed E2B sandboxes. To evaluate a local optimization in E2B, install the extra and provide an E2B key:
pip install "world-model-optimizer[e2b]"
export E2B_API_KEY=...
wmo optimize harness my-agent my-environment --tasks tasks.jsonl --backend e2b
Use a world model as an API
from wmo import Action, ActionKind
from wmo.config.store import WorldModelStore
from wmo.engine.loader import load_world_model
model_dir = WorldModelStore(".wmo").resolve("airline")
wm, _provider = load_world_model(model_dir)
session = wm.new_session(task="check out the cart")
obs = wm.step(session.id, Action(kind=ActionKind.TOOL_CALL, name="add_to_cart",
arguments={"sku": "A1"}))
print(obs.content)
Or over HTTP (same code path), namespaced by model name: GET /world_models, then POST /world_models/{name}/sessions and POST /world_models/{name}/sessions/{id}/step.
Run after platform login
After wmo login, the same wmo run command can open a hosted world model or run an agent's
current champion harness in E2B. The platform manages model and sandbox credentials, so hosted
runs do not need local API keys.
wmo login
wmo run <world-model-or-agent-id>
wmo run <agent-id> -u . --task "fix the failing tests"
Workspace upload is opt-in with -u: WMO live-syncs changes and preserves concurrent local edits.
Long-running agents can detach, continue in the platform, and be messaged or reattached later.
wmo run <agent-id> -u . --detach
wmo run --send "Now run the full test suite"
wmo run --attach
wmo run --end
Runtime agents and optimizers in E2B sandboxes
WMO can run the real pi worker inside isolated E2B sandboxes while the world model supplies the environment. Optimization and evaluation rollouts run in parallel, and model credentials stay outside the sandbox.
wmo optimize harness my-agent my-environment --tasks tasks.jsonl --backend e2b
wmo eval tasks.jsonl --mode closed-loop --harness my-agent --harness-backend e2b
The optimizer can change prompts, tools, policies, skills, and runtime code. Every candidate is measured against the same simulated tasks, and only changes that pass the evaluation gates become the new versioned champion harness.
Development
Managed with uv; linting/formatting with ruff; type checking with ty. Conventions live in AGENTS.md.
uv sync --extra dev # env + dev tools
uv run ruff check . # lint
uv run ruff format . # format
uv run ty check # type check
uv run pytest -q # tests
Usage telemetry
wmo uses anonymous usage telemetry to track the volume of usage.
Telemetry is strictly metadata. It never includes prompts, traces, actions, observations, file paths,
model names, provider credentials, or raw user content.
Telemetry is enabled by default. To opt out for a project:
uv run wmo config telemetry disable
This writes .wmo/settings.toml. You can re-enable it with uv run wmo config telemetry enable,
check the current setting with uv run wmo config telemetry status, or disable it for a process
with DO_NOT_TRACK=1 or WMO_TELEMETRY=0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file world_model_optimizer-0.2.0.tar.gz.
File metadata
- Download URL: world_model_optimizer-0.2.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e9e285033411bcd3f4438184ddc3521ae6933b0b37cc37480058824bcde9e3
|
|
| MD5 |
a63da339977b6c775bad3f28e888835c
|
|
| BLAKE2b-256 |
87d8501b2fec743816180fbb8a18863c149aff52c24eacfedfcee97e57c3f401
|
File details
Details for the file world_model_optimizer-0.2.0-py3-none-any.whl.
File metadata
- Download URL: world_model_optimizer-0.2.0-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbe299bfde1baf1b9e74f12b611293550120724ae1c96d78910b75f655dca5d7
|
|
| MD5 |
3407fca7bf332eb2b781cc5336ff2875
|
|
| BLAKE2b-256 |
6b5fd6e7490a0a80004f7b7b6c85ed91c243152a22597ad968198198afe1d4a1
|