Choose the suites on publish
SDK platic.agents.evals.onPublish.set()
Choose up to 10 suites to test the agent after each publication. Send the complete list in suiteIds; it replaces the previous list. Send [] to remove all suites.
Tests run against the version that is already published. If they fail, that version stays published.
Example
curl -X PUT "https://api.platic.ai/v1/agents/$AGENT_ID/evals/on-publish" \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"suiteIds": ["s8Kd2LmQ"]
}' await platic.agents.evals.onPublish.set("agent_123", { suiteIds: ["suite_123"] }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent ID | ✓ |
Request body
{
"suiteIds": ["s8Kd2LmQ"]
} | Field | Type | Description | Required |
|---|---|---|---|
suiteIds | array | Up to 10 suites, each one once. An empty list disconnects all of them: none runs on publish. | ✓ |
Note
Before saving, Platica checks that every suite exists and is active. A missing or archived suite returns 409 EVAL_SUITE_STALE, and the change is not saved.
Response
200 with the new list:
{
"status": "success",
"data": {
"suiteIds": ["s8Kd2LmQ"],
"updatedAt": "2026-11-01T10:20:31.000Z"
}
} Response fields
The same as in Get the suites on publish.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | The body is not valid; for example, more than 10 suites. |
404 | AGENT_NOT_FOUND | The agent does not exist or belongs to another workspace. |
409 | EVAL_SUITE_STALE | One of the suites does not exist or is archived. Nothing is saved. |
409 | CONFLICT | Someone else changed this at the same time. Try again. |
Notes
- Saving the list does not run anything: the suites run on the next publish.
- They do not block publishing. They run after the publication is confirmed, as the person who published. If a run fails, the version stays published.
- Their runs appear in List runs with
trigger: "on_publish". - They cost like any run: they use the agent's real tools and each agent turn is charged as an internal message.
- This list belongs to the agent, but it is not part of its versions: it changes immediately, without publishing.
- It requires permission to edit the agent, the same as to publish.
If a suite cannot start
- If there is no capacity on publish (
EVAL_CAPACITY) or the service does not respond, the suite can retry up to 10 times. The delay starts at 30 seconds and doubles up to a maximum of 1 hour. Retrying is triggered by the next interaction with the agent: publishing, returning to a previous version, or reading its runs or launches. A suite with this problem does not stop the others. - If a suite can never run (for example, it was archived, one of its scenarios no longer exists or its profile does not exist), or the 10 retries are used up, it is marked as failed with its error code and is not retried.