Plurai Simulation replays failing agent turns with restored sandbox state
Plurai Simulation creates isolated tool and record sandboxes from agent code to reproduce failing turns. Its evaluations check backend state instead of relying on an agent's claim that an action succeeded.

TL;DR
- Failing agent turns can be replayed with conversation history and sandbox records restored, as the replay description explains.
- Refund evaluations check simulated billing records alongside the agent's response, according to the billing-agent example.
- Plurai Simulation is live and free to start, according to launch coverage.
Plurai's replay account includes an agent authorized to refund $200 offering a customer $550. Its architecture post describes a tool-routing mode that executes real calls. And despite early coverage listing Cursor, the installation docs say Cursor support is coming soon.
Replay from the failing turn
Replay imports a production trace containing messages, tool calls and tool results. The clever boundary is around the model: Plurai freezes the conversation and surrounding world while generating the response again.
The replay write-up describes three pieces:
- History: earlier turns are supplied exactly as recorded, without regenerating them.
- World state: mocked tools and their backing records are reconstructed to the moment immediately before failure.
- Failing turn: the agent generates it again, normally across three trials to distinguish consistent failures from intermittent ones.
The model remains nondeterministic. Prompt edits, model swaps and tool changes can face the same frozen starting point, and the replay can become a regression scenario.
In Plurai's reported billing-agent case, six trials repeated the prohibited refund offer. Two continuations reached an actual refund-tool call before the tool's limit blocked it, exposing behavior beyond where the original production trace ended.
Refunds checked against records
A refund promise can sound successful while leaving the billing system unchanged, the failure illustrated in the billing-agent example. Plurai gives each scenario shared state across its mocked tools.
Its architecture requires three things to agree:
- Customer story: an order mentioned by the simulated user exists with the charges they describe.
- Tool state: a
refund_chargewrite becomes visible to the nextget_ordercall. - Expected outcome: the evaluator checks the resulting records against what should have happened.
The architecture post's example goes beyond detecting a missing call: refunding both charges instead of only the duplicate would fail, with the two refunded rows included as evidence.
Scan, simulate, fix
Plurai launched on November 11. Its documented plugin surfaces are Claude Code, Codex CLI and GitHub Copilot CLI, with a Python SDK underneath.
The coding agent handles the six-step loop described in a walkthrough made with the team:
- Read the agent: scan code, prompts, tools and policies with
/simulation-scan-agent. - Map the rules: build a world graph of entities, tool reads and writes, flows and constraints. Conflicting sources are flagged, with code taking precedence over traces, then the generated PRD.
- Generate scenarios:
/simulation-generate-suitebuilds the mock world, user scenarios and evaluation criteria together. - Run conversations:
/simulation-runstarts a separate agent process and mock session per scenario, with scenarios running in parallel. - Grade behavior: code checks inspect final world state; LLM judges handle criteria requiring judgment.
- Propose fixes:
/simulation-fixesidentifies failures and proposes file-and-line changes. Code changes require acceptance.
The scan creates plurai_sim/ beside the agent, including configuration, a plain-language PRD, scenario variables and a generated simulate.py harness. The docs also expose /simulation-fixes --verify to rerun the suite and mark fixes as resolved or still failing.
Mock, real, observe
A tool combining reads and writes prompted a question about how the scan chooses which calls stay live. Plurai's architecture post documents three modes, selected per external system:
mock: route calls to the simulated world.real: execute the agent's own tool code against scenario-seeded data.observe: execute the real tool and report its result to the simulated world.
The scan proposes boundaries for approval. Plurai gives mocked payments and email alongside a live read-only knowledge base as an example; the post does not detail separate routing for reads and writes inside one mixed-purpose tool.
Local runner, hosted world
The agent runs locally, but the simulation has a hosted backend. Plurai splits the architecture into three components:
- Plugin: reads the repository and writes the harness through the coding agent; communicates with the backend over MCP.
- SDK: starts the local agent and drives turns; communicates over REST.
- Backend: builds the world graph, mock environment, scenarios and evaluations, then hosts the simulation services.
According to Plurai's architecture post, model keys and tool credentials remain on the local machine. The backend receives the plurai_sim/ folder, optional sources selected for inclusion and simulated conversations during runs.
Knowledge-base coverage also depends on those optional inputs: without a supplied knowledge source, Plurai says the knowledge base goes untested.