Runtime
Agents use the real interface. Counterworld owns the state behind it.
The runtime serves software-compatible interfaces, applies valid mutations and keeps every system and actor on one shared state.
The agent boundary stays production-shaped
An existing agent connects through the interface it already uses: a product API, its SDK configured with another base URL, or MCP tools matching the production surface.
Mutations enforce software behavior
The runtime does more than return schema-valid responses. It checks permissions, preconditions, invariants and side effects before committing a change.
Agent actions and world control are separate
The agent can operate the software. The test harness controls the simulation. Keeping these surfaces separate prevents an agent from resetting mistakes, inspecting hidden state or moving time.
| Surface | Used by | Responsibilities |
|---|---|---|
| Agent interface | Agent or harness | Read and mutate the represented software through allowed APIs or tools. |
| Control interface | Evaluation runner | Create, pause, checkpoint, restore, fork and advance a world. |
| Inspection interface | Evaluator | Read privileged state, events, diffs and invariant results. |
Control a running world with the SDK
const world = await counterworld.worlds.get("world_01J...");
await world.pause();
const checkpoint = await world.checkpoints.create({
name: "before-policy-change",
});
await world.resume();
await world.clock.advance({ days: 14, mode: "until-idle" });
const branch = await world.forks.create({
from: checkpoint.id,
name: "new-policy",
});
Only the runner receives this control client. The agent receives credentials created by world.interfaces.connect().
A world has an explicit lifecycle
Definitions create instances. Instances can run, pause and create immutable checkpoints. Checkpoints can restore the same instance or begin independent forks.