Counterworld platform

FORKa living software world. RUNan agent. COMPAREoutcomes.

Counterworld combines stateful software, grounded simulated users and controllable time in one runtime. Run current and candidate agents under identical conditions, then compare the business state each one creates.

RUN / compare-agents Illustrative run
fork(cp_day_00)
agent@v17complete
horizon
30d
events
identical
output
world_a
agent@v18complete
horizon
30d
events
identical
output
world_b
comparisoncandidate leads
invariants18 / 18 pass
artifactworld.diff.json

01 / How it works

One controlled run from starting state to business outcome.

The agent operates through normal interfaces. Counterworld controls the world, its clock and the experiment around it.

PIPELINE / release-evalIllustrative · 6 / 6 complete
  1. 01 / CREATEdone
    worlds.create(definition)→ world_8f2
  2. 02 / CONNECTdone
    agent.connect(scoped_endpoint)→ credential_agent
  3. 03 / RUNdone
    world.run(agent@v17)→ trajectory_a
  4. 04 / ADVANCEdone
    clock.advance({ days: 30 })→ checkpoint_day_30
  5. 05 / FORKdone
    world.fork(checkpoint_day_00)→ world_candidate
  6. 06 / EVALUATEdone
    compare(world_a, world_b)→ report.json

02 / Inside a world

Complete interfaces. Exhaustive behavior.

For every workflow in scope, the API surface, business rules and mutations are fully executable—not generated call by call.

01 / API surface

Production-shaped interfaces

Endpoints, schemas, authentication, pagination and error contracts.

02 / Business semantics

Every valid consequence

Permissions, lifecycle rules, invariants and cross-system side effects.

03 / Failure behavior

The unhappy paths too

Idempotency, retries, timeouts, rate limits, partial failures and 4xx/500 responses.

WORLD INSPECTOR / commerce-opsIllustrative · clock running
State / entities
EntityRecords
customers5,749
orders125,204
payments128,901
fulfilments119,442
tickets1,496
Event stream / latest
  1. 09:41:02

    checkout.submitted
    Order #8421 enters mutation gate

  2. 09:41:03

    payment.captured
    Payment P-81 commits $128

  3. 09:41:03

    inventory.reserved
    SKU-91 available 18 → 16

  4. 09:42:10

    buyer.message
    Customer C-204 requests an update

Population / active
  • Buyer / C-204Maya ChenWaiting on split fulfilment
  • Admin / A-17Dev Patel3 approvals due today
  • Operator / O-04Leah GrantWarehouse shift ends 18:00
History / 3 yearsDAY 11 · 09:42:10

03 / Controlled comparison

Change the agent, not the conditions.

Forking creates two futures from the same checkpoint. Both agents face the same history, users, permissions, schedules, failures and external events.

EXPERIMENT / agent-releaseIllustrative comparison
checkpointcp_day_00
seedsim_042
horizon30 days
workloadidentical
Baseline

Current agent

complete
model: large-v4
prompt: support-17
memory: retrieval-v2
policy: refunds-4
SLA91%
Refund errors2
LedgerPASS
Candidate

Agent under review

complete
model: small-v7
prompt: support-18
memory: retrieval-v3
policy: refunds-4
SLA96%
Refund errors0
LedgerPASS

04 / Evaluation output

Grade the world, not only the final response.

Every run produces evidence at the task, business, state and trajectory levels so teams can see whether an agent improved—and what it broke along the way.

REPORT / world_a..world_bIllustrative report
Business outcomes
MetricCurrentCandidateDelta
Resolution SLA91%96%+5 pt
Open backlog184142−42
Duplicate refunds20−2
Human interventions3831−7
Compute cost1.00×0.71×−29%
Invariant checks
  • refund_total ≤ capturedPASS
  • inventory.available ≥ 0PASS
  • ledger.debits = creditsPASS
  • notification.sent_oncePASS
  • role.can_mutate(resource)PASS
world.diff / order_8421
- refund.status: "pending_review"
+ refund.status: "approved_partial"
+ refund.amount: 42.67
+ audit.policy: "refunds-4"
  ledger.balanced: true

05 / Integration

Control the experiment without changing the agent.

Use the Counterworld SDK to create and operate worlds. Give the agent only a production-shaped endpoint and scoped credentials for its instance.

Agent plane

Production-shaped access

API, SDK, MCP and tool interfaces with role-specific permissions.

Control plane

Privileged experiment access

World creation, clock control, checkpoints, forks, full-state inspection and evaluators.

experiment.ts
const world = await counterworld.worlds.create({
  systems: [
    catalog.shopify(),
    catalog.stripe(),
  ],
  history: { years: 3 },
  population: [buyers(), storeAdmins()],
  evaluators: [
    noDuplicateRefunds(),
    balancedLedger(),
  ],
})

const start = await world.checkpoint()
const current = await world.run(currentAgent, {
  days: 30,
})

const candidateWorld = await world.fork(start)
const candidate = await candidateWorld.run(
  candidateAgent,
  { days: 30 },
)

const report = await compare(current, candidate)

06 / Trust and boundaries

Controlled rehearsal, with explicit limits.

Counterworld provides isolated, inspectable worlds for experimentation. It does not require production access by default or claim that simulated behavior predicts real human conversion.

Start with one workflow

Define the world required to judge the outcome.

Choose a consequential workflow, identify the state and actors that affect it, then run current and candidate agents under the same conditions.

World isolation
Separate state, credentials, clock and lifecycle for every run.
Data source
Synthetic histories and populations by default; production data is not required.
Replay
Reproducible when starting state, seeds and future workload are fixed.
Evaluation access
Privileged state inspection remains outside the agent boundary.
Interface fidelity
Coverage is explicit for every modeled API, SDK, MCP or tool surface.
UI fidelity
API fidelity does not automatically imply a faithful browser interface.
Interpretation
Behavioral parameters define controlled test conditions, not human forecasts.
Production role
Simulation supports release decisions; it does not replace production monitoring.