simulate scope. Simulations are paid — they run LLM calls against your dataset and bill against your workspace LLM keys.
Budget is required
Abudget is required on every run (no default — a runaway spend would be silent). Two shapes:
budgetUsd: <n>— hard USD cap.budgetMinutes: <n>+confirmUsdCeiling: <n>— time cap, plus an expected-cost ceiling the SDK confirms before starting.
budgetMinutes (with no cost ceiling) is refused — you’d have no way to abort a runaway.
Verbs
Simulations are long-running:run returns a roundId immediately and you poll for progress.
estimate
No LLM calls. Server returns projected cost and duration for the config you’d pass to run. Use this to gate — “if the projection exceeds $X, don’t run.”
run(lineageId, opts)
Kicks off a simulation. lineageId identifies which change lineage you’re testing. Returns { roundId } immediately.
get(roundId)
Full round state — progress, per-case verdicts, aggregate delta, provider errors if any. Poll until done.
remaining(roundId)
Just the count of remaining cases. Lighter than get — right for a progress bar.
requery(roundId)
Re-rank the same case results with a different scoring config. Free — no new LLM calls, just a re-scoring pass on the stored outputs. Use this to see how sensitive the “did this help?” answer is to your scoring choice.
promote(roundId)
Take a completed round and file it as an improvement proposal. It then flows into the improvement queue for a human to approve — the simulation is evidence, approval is what ships.
Common patterns
Estimate → gate → run
Poll with a progress bar
Time budget with confirmation
If you only care about wall time, pairbudgetMinutes with a cost ceiling the SDK checks against estimate before starting:
Where simulations sit in the loop
simulations (the evidence generator) and improvements (the decision queue). Making the initial improvement candidates from clusters is what the loop’s internals do — not an SDK verb. Once a candidate exists, you can re-simulate it here to refresh the evidence, then promote back into the queue.