Skip to main content
Plurai Simulation works natively with the observability platform your team already uses: LangSmith, Langfuse, Arize and Braintrust. There is no proxy to deploy and no code to add to your agent. The plugin and the SDK talk to the platform directly from your machine, in three ways:
  • Analyze production traces to ground the mock environment, scenarios and evals in how your agent really behaves and how your users really talk. This is the optional Ground stage (/analyze-traces). See Ground in production traces.
  • Replay real conversations from where they broke. A production conversation becomes a scenario that resumes at the failing turn, so the failure reproduces and gets a fix. See Replay production conversations.
  • Record Runs as experiments, one record per scenario with the eval scores as feedback, so simulation results sit next to your production traces. See Record Runs.
Your platform credentials stay on your machine in every direction. The SDK reads the traces locally and never writes the keys to disk or uploads them. “Through an adapter” means you run /author-trace-adapter once to teach the converter the export’s format. See Teach the converter a new format.

From traces to fixes

Every path ends in the same place: a confirmed gap, traced to your code, with a fix.
1

Connect

Point the plugin at your platform and project. Credentials come from your environment or the plugin asks.
2

Analyze

/analyze-traces exports the traces locally and writes a trace brief: your agent’s capabilities, anomalies, how your users talk, and the failures worth testing. The suite is built grounded in it.
3

Replay

The failures in the brief become scenarios that resume at the turn where each one broke.
4

Run and fix

/simulation-run plays them with the rest of the suite. /simulation-fixes traces each failure to the code and proposes a fix, and an accepted fix is kept as a regression.
5

Record

Each Run can be recorded back to your platform as an experiment, so you can compare it with production.

Analyze production traces

Run the Ground stage and say where your traces are:
Or in chat: “Ground the simulation in our LangSmith traces from the billing-prod project, only failed runs.” The plugin builds a source config for the SDK, runs plurai ingest-traces locally, and uploads the exported traces under your workspace’s anonymization posture. You approve the command before it runs. See Ground in production traces.
Install the extra in the SDK’s virtual environment: plurai[langsmith].Credentials. The plugin reads LANGSMITH_API_KEY from your environment when it is set, or asks you.Source config (--source-kind langsmith):
An export that finds zero traces stops with an error naming the config keys it used, so a wrong project, filter or key is caught before anything is uploaded. For other trace formats (a session log, an in-house exporter’s JSON), /author-trace-adapter teaches the converter your format.

Replay conversations

/trace-to-scenarios turns a conversation into a scenario that resumes where it broke. It reads:
  • LangSmith: thread exports from LangGraph agents, including the files /analyze-traces exported. This is the default format.
  • Arize: OpenInference span trees, the spans an OpenInference-instrumented agent emits. Export them from Arize or Phoenix as JSON, either as a bare list of spans or as a {trace_id, spans} object, and pass --source-format openinference.
  • Anything else: run /author-trace-adapter first, then pass the adapter’s name with --source-format.
Langfuse traces can’t be replayed yet. See Replay production conversations for the whole flow.

Record Runs

Recording is opt-in. A Run records nothing unless you declare it, even when platform keys are set: /simulation-run asks whether to record the Run as an experiment. Then pick one platform: exactly one <SINK>__ENABLED flag may be set, and enabling two fails at startup.
Install plurai[langsmith], then set:
The scenario set is uploaded as a dataset before the Run starts.
Reading traces and recording Runs use different variable names. Trace export reads the platform’s usual one-underscore names (LANGSMITH_API_KEY, LANGFUSE_PUBLIC_KEY). Recording a Run reads only the two-underscore names above (LANGSMITH__API_KEY, LANGFUSE__PUBLIC_KEY).
Where you leave a two-underscore credential unset, the vendor’s own client may still read its usual one-underscore variable. A missing package or a platform error never breaks a Run: the recording is best-effort. After a Run, when you correct an eval’s verdict, plurai correct-scores overwrites that eval’s score on Langfuse or LangSmith. See SDK CLI.

Next steps

Ground in production traces

The Ground stage, step by step.

Replay production conversations

Resume a real conversation at the turn where it broke.

Data and privacy

What leaves your machine, and the anonymization posture.