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.
Important
Runs use the agent’s real tools. Each agent turn consumes one internal message.
Example
curl -X POST "https://api.platic.ai/v1/agents/$AGENT_ID/evals/runs/estimate" \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"suiteId": "s8Kd2LmQ",
"versions": ["draft", "published"]
}' await platic.agents.evals.runs.estimate("agent_123", { suiteId: "suite_123", versions: ["draft"] }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent ID | ✓ |
Request body
{
"suiteId": "s8Kd2LmQ",
"versions": ["draft", "published"]
} | Field | Type | Description | Required |
|---|---|---|---|
suiteId | string | The suite. | ✓ |
versions | array | 1 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
| Field | Description |
|---|---|
suiteId | The suite. |
suiteHash | Fingerprint of the frozen suite: scenarios and versions. |
versions | Each 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. |
totalTrials | Total trials, adding up all versions. |
estimatedMaxMessages | The 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. |
warnings | Warnings to show before running. Empty if there are none. |
Warnings (warnings[].code):
code | Meaning | If you run anyway |
|---|---|---|
assistance_disabled | Version 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_trials | The 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
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | The body is not valid; for example, more than four versions. |
404 | AGENT_NOT_FOUND | The agent does not exist or belongs to another workspace. |
404 | EVAL_NOT_FOUND | The suite does not exist in your workspace. |
404 | EVAL_VERSION_NOT_FOUND | One of the versions does not exist; for example, v9 on an agent with five. |
409 | EVAL_SUITE_STALE | The suite is archived or one of its scenarios no longer exists. |
Notes
- Read access to the agent is enough (with OAuth,
platica:read).