Compare versions

SDK platic.agents.evals.compare()

Compare how two to four versions replied in the same suite. Send suiteId and versions; read scenarios[].change to see improvements or regressions. This uses each version’s latest completed run and starts no new tests.

Example

await platic.agents.evals.compare("agent_123", { suiteId: "suite_123", versions: ["v2", "v3"] });

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent ID✓

Query parameters

ParameterTypeDescriptionRequired
suiteIdstringThe suite.✓
versionsstringTwo to four versions separated by commas: draft, published or vN (v5,v7).✓

Response

{
  "status": "success",
  "data": {
    "suiteId": "s8Kd2LmQ",
    "comparable": true,
    "versions": [
      { "versionId": "v5", "runId": "run_b2c4", "launchId": "lch_2c9f41", "suiteHash": "sha256:9b0e…", "knowledgeFingerprint": "sha256:77aa…", "pass1": 0.5, "passed": false, "finishedAt": "2026-11-01T15:31:40.000Z" },
      { "versionId": "v7", "runId": "run_a1f3", "launchId": "lch_2c9f41", "suiteHash": "sha256:9b0e…", "knowledgeFingerprint": "sha256:77aa…", "pass1": 1, "passed": true, "finishedAt": "2026-11-01T15:30:12.000Z" }
    ],
    "warnings": [
      { "code": "errored_trials", "message": "Some trials of v5 ended in an error and were left out", "versionIds": ["v5"] }
    ],
    "scenarios": [
      {
        "scenarioId": "asks_for_person",
        "results": [
          { "trials": 2, "passedTrials": 0, "pass1": 0, "passHatK": { "2": 0 } },
          { "trials": 3, "passedTrials": 3, "pass1": 1, "passHatK": { "2": 1, "3": 1 } }
        ],
        "change": "improved"
      }
    ]
  }
}

Response fields

FieldDescription
suiteIdThe suite.
comparabletrue if all versions have a finished run of the same frozen suite (same suiteHash).
versionsOne per requested version, in the same order, with the run that was used: runId, launchId, suiteHash, knowledgeFingerprint (fingerprint of the agent's files in that run), pass1, passed and finishedAt. Without a run, those fields are null.
warningsWarnings. versionIds says which versions each one applies to and message explains it for people.
scenarios[].scenarioIdThe scenario.
scenarios[].resultsOne entry per version, in the order of versions; null if that run does not have the scenario. It has trials, passedTrials, pass1 and passHatK. It only counts valid trials: those with error or cancelled are left out.
scenarios[].results[].passHatKProbability that k trials in a row all pass, for several k. It measures how consistent the version is.
scenarios[].changeThe last version against the first: improved, regressed, unchanged or incomparable (the scenario changed between runs or is missing from one).

Warnings (warnings[].code):

codeMeaning
missing_runA version has no finished run of that suite.
suite_changedThe runs did not run the same frozen suite.
knowledge_changedThe agent's files changed between runs.
errored_trialsA run had trials with a technical error; they were left out of the comparison.

Errors

Statusdetails.codeWhen
400INVALID_REQUESTsuiteId or versions is missing, or versions does not have two to four valid versions.
404AGENT_NOT_FOUNDThe agent does not exist or belongs to another workspace.

A version without a run is not an error: the response arrives with the missing_run warning and comparable: false.

Notes

  • To compare with fresh results, start a run with all the versions (that way they run the same frozen suite in a single launch) and compare when it finishes.
  • How trials are counted is in Results.
  • Read access to the agent is enough.