Eval calls are real conversations with
origin: "eval". Hide them from your call lists with is_eval=false (see Conversations).
Run an eval
1
Create a judge
Start from one of Clarity’s judge prompts. The response is
GET /eval-judges/templates returns them with their name, description and template; full is the recommended one.201 with { "judge": {...} }. Keep judge.id.2
Create a suite
201 with { "suite": {...} }. Keep suite.id.3
Create the submission
201 with { "submission": {...} }. The submission is created paused: nothing runs yet.4
Start it
202 with the submission, now status: "active". Clarity places the calls and judges each one as it ends.5
Wait for it to finish
progress breakdown, trimmed here. Poll every 15 to 30 seconds until state is completed or failed.Submission states
status is what is stored: paused or active. state is the one to act on:
A submission pauses itself when it finishes, so a
completed submission reads status: "paused".
Read the results
Paths are under
/v1/projects/{projectId}. If you only have the submission id, GET /eval-submissions/{id} and GET /eval-submissions/{id}/verdicts work without the agent id.
verdictispassed,failed,not_relevant(the test case did not apply to this call),not_sure, orerror(the judge could not score it; seeerror).sourceisscenariofor a scenario’s own test case andcommonfor one of the suite’s common test cases.- Narrow the list with
?test_case_id=or?call_id=. On a large run the unfiltered list is big. call_idis the eval call. Its transcript and recording are in its conversation; see Conversations.
pass_rate counts passed out of passed + failed. pass_rate_wide also counts not_sure and error against the agent.
Reference
Judges
string
required
Up to 256 characters.
string
required
The judge model. It must be a model of the judge provider your Clarity deployment uses, for example
gemini-2.5-flash. An unsupported model is refused with 422.string
required
The grading prompt. It must contain the placeholders
{name}, {when_relevant}, {success_criteria}, {failure_criteria} and {conversation_text}, or it is refused with 422. Start from a template.number
default:"0"
From 0 to 2.
string
Free text.
Suites
string
required
Up to 256 characters.
array
required
1 to 20 entries. Each is either
{ "scenario_id": "…" } to reuse an existing scenario, or a new scenario:name(required),description.simulator_config.prompt(required): the instructions for the synthetic caller, written to the caller.simulator_config.max_turns(required): 1 to 100.simulator_config.close_instruction: when the caller should hang up. Absent means the caller hangs up only as a last resort.test_cases(required): 1 to 50 entries.silence_modes: any ofoff,always,flexible. Whether the caller may stay silent while the agent works, for example during a slow lookup. The scenario is run under each mode you list, so two modes double its calls.field_overrides: values for the agent’s prompt variables during this scenario.
array
Up to 50 test cases checked on every scenario’s calls.
object
Values for the agent’s prompt variables on every call of the suite. A scenario’s own value wins. When the agent declares which variables its prompt may use, a name it does not declare is refused when you create the submission.
{ "test_case_id": "…" } or a new one with name, when_relevant, success_criteria and failure_criteria (all required) and an optional description.
Edit a suite with PATCH /eval-suites/{id} using the same fields. Scenarios and test cases are only created and changed through suites; the scenario and test-case endpoints are read-only.
Submissions
string
required
Unique per agent. Reusing a name answers
409 submission_name_already_exists_for_agent, so add a timestamp.string
required
The suite to run. It must have at least one scenario.
string
required
The judge that grades the calls.
integer
default:"1"
1 to 10. More runs give a steadier pass rate.
integer
default:"2"
1 to 10 calls at the same time.
boolean
default:"false"
Test the agent’s draft instead of its published version.
string
Test a specific version. Cannot be combined with
use_draft.string[]
Up to 50 more test cases to check on every call of this run.
string[]
Up to 50 of the suite’s common test cases to skip in this run.
integer
default:"5"
1 to 50 calls judged at the same time.
integer
default:"3"
0 to 10.
Synthetic caller settings
Synthetic caller settings
The platform picks the synthetic caller’s speech and language models from the agent’s language. You can override them with
simulator_audio_stack, simulator_llm, simulator_silence_mode and simulator_model_config. Which values work depends on your deployment: a value it cannot run is refused with 422 rather than replaced. Leave them out unless Clarity support has told you which to use.422.
Which version runs. The version is fixed when you create the submission: the published version by default, the draft with use_draft, or the one you name with agent_version_id. Publishing while a run is in progress does not change it. An agent with no published version answers 409 no_published_version; pass use_draft: true to test its draft. use_draft on an agent with no draft answers 409.
Changing a run. PATCH …/eval-submissions/{id} works only while the submission is paused. POST …/{id}/pause pauses an active run; POST …/{id}/run resumes it. DELETE …/{id} removes the submission. To run the same suite again, create a new submission.