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
curl "https://api.platic.ai/v1/agents/$AGENT_ID/evals/compare?suiteId=$SUITE_ID&versions=v2,v3" \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.evals.compare("agent_123", { suiteId: "suite_123", versions: ["v2", "v3"] }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent ID | ✓ |
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
suiteId | string | The suite. | ✓ |
versions | string | Two 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
| Field | Description |
|---|---|
suiteId | The suite. |
comparable | true if all versions have a finished run of the same frozen suite (same suiteHash). |
versions | One 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. |
warnings | Warnings. versionIds says which versions each one applies to and message explains it for people. |
scenarios[].scenarioId | The scenario. |
scenarios[].results | One 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[].passHatK | Probability that k trials in a row all pass, for several k. It measures how consistent the version is. |
scenarios[].change | The last version against the first: improved, regressed, unchanged or incomparable (the scenario changed between runs or is missing from one). |
Warnings (warnings[].code):
code | Meaning |
|---|---|
missing_run | A version has no finished run of that suite. |
suite_changed | The runs did not run the same frozen suite. |
knowledge_changed | The agent's files changed between runs. |
errored_trials | A run had trials with a technical error; they were left out of the comparison. |
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | suiteId or versions is missing, or versions does not have two to four valid versions. |
404 | AGENT_NOT_FOUND | The 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.