Estimate a run

SDK platic.agents.evals.runs.estimate()

Check how many trials a suite would run and what they could cost. Send suiteId and versions; show estimatedMaxMessages and warnings to the person requesting the test before starting it. This request starts no tests, saves no changes and consumes no messages.

Example

await platic.agents.evals.runs.estimate("agent_123", { suiteId: "suite_123", versions: ["draft"] });

Path parameters

ParameterTypeDescriptionRequired
agentIdstringAgent ID✓

Request body

{
  "suiteId": "s8Kd2LmQ",
  "versions": ["draft", "published"]
}
FieldTypeDescriptionRequired
suiteIdstringThe suite.✓
versionsarray1 to 4 versions: draft, published or vN (the exact version number, for example v5).✓

Response

{
  "status": "success",
  "data": {
    "suiteId": "s8Kd2LmQ",
    "suiteHash": "sha256:9b0e…",
    "versions": [
      { "versionId": "v7", "number": 7, "requested": ["draft"] },
      { "versionId": "v5", "number": 5, "requested": ["published"] }
    ],
    "totalTrials": 12,
    "estimatedMaxMessages": 24,
    "warnings": [
      { "code": "assistance_disabled", "versionId": "v5", "scenarioIds": ["asks_for_person"] }
    ]
  }
}

Response fields

FieldDescription
suiteIdThe suite.
suiteHashFingerprint of the frozen suite: scenarios and versions.
versionsEach requested version, already resolved to its vN (versionId, number). requested says what you asked for; if two values are the same version, it has both.
totalTrialsTotal trials, adding up all versions.
estimatedMaxMessagesThe most it can cost: the agent's turns if every trial reaches its last turn (in a script, its messages; in a persona, maxTurns). Each turn is charged as an internal message. It usually costs less.
warningsWarnings to show before running. Empty if there are none.

Warnings (warnings[].code):

codeMeaningIf you run anyway
assistance_disabledVersion versionId has assistance disabled and scenarios in scenarioIds require help (assistance_requested with expected: true).Review assistance settings for the agent and its subagents. If no request is recorded, the check fails with La versión probada no tiene activada la asistencia. This is a failure, not an error.
too_many_trialsThe launch goes over the trial limit (limit, 64 by default).It does not start: it answers 429 EVAL_CAPACITY. Choose fewer versions, scenarios or trials.

Errors

Statusdetails.codeWhen
400INVALID_REQUESTThe body is not valid; for example, more than four versions.
404AGENT_NOT_FOUNDThe agent does not exist or belongs to another workspace.
404EVAL_NOT_FOUNDThe suite does not exist in your workspace.
404EVAL_VERSION_NOT_FOUNDOne of the versions does not exist; for example, v9 on an agent with five.
409EVAL_SUITE_STALEThe suite is archived or one of its scenarios no longer exists.

Notes

  • Read access to the agent is enough (with OAuth, platica:read).