judges

Create judge

Creates a judge that scores runs of one agent in the given environment against a rubric, using an LLM. With trigger_mode=automatic, it evaluates completed runs that match filter_expression, sampled at sample_rate; with manual, evaluations start only through the trigger endpoints. The judge only evaluates runs of the agent_name in the body.

Required permission: judges.create.

post/v1/projects/{project_id}/judges

Request

  • Base URL
    https://api.connic.co
  • Auth
    HTTP bearer

Path parameters

project_id, string uuid required

ID of the project the API key belongs to.

Query parameters

environment_id, string uuid required

Environment the judge belongs to

Request body

JudgeCreate required
name, string required

Display name, at most 200 characters.

agent_name, string required

Agent whose runs the judge evaluates.

model, string required

Model that scores runs, for example a connic/* model. At most 512 characters.

system_prompt, string

Extra instructions for the scoring model. At most 8,000 characters.

include_agent_system_prompt, boolean

Include the evaluated agent's system prompt in the scoring context.

criteria, JudgeCriterion[] required

Scoring rubric with 1 to 20 criteria. The combined max_score is at most 10,000 and the combined name and description length at most 20,000 characters.

filter_expression, string

Expression over the run's input, output and context that must be true for automatic evaluation. Empty matches every run.

trigger_mode, 'automatic' | 'manual'

automatic evaluates runs when they complete; manual evaluates only when triggered.

sample_rate, number

Share of matching runs evaluated automatically, from 0 to 1.

notification_threshold, number nullable

Sends a judge_score_low notification when the average score, as a share of the maximum, drops below this value (0 to 1). null disables it.

notification_window, integer nullable

Number of most recent evaluations averaged for notification_threshold (1 to 10,000). null averages all.

enabled, boolean

When false, runs are not evaluated automatically; on-demand triggers still work.

Response

Successful Response

JudgeResponse required

An LLM judge that scores one agent's runs against a rubric, with evaluation totals.

id, string uuid required
project_id, string uuid required

Project the judge belongs to.

environment_id, string uuid required

Environment whose runs the judge evaluates.

name, string required
agent_name, string required

Agent whose runs the judge evaluates.

model, string required

Model that scores runs.

system_prompt, string required

Extra instructions for the scoring model.

include_agent_system_prompt, boolean required

Whether the evaluated agent's system prompt is included in the scoring context.

criteria, JudgeCriterion[] required

Scoring rubric.

filter_expression, string required

Expression a run must match to be evaluated automatically. Empty matches every run.

trigger_mode, string required

automatic evaluates runs when they complete; manual evaluates only when triggered.

sample_rate, number required

Share of matching runs evaluated automatically, from 0 to 1.

notification_threshold, number nullable

Average score share (0 to 1) below which a judge_score_low notification is sent. null when disabled.

notification_window, integer nullable

Number of most recent evaluations averaged for notification_threshold. null averages all.

enabled, boolean required

When false, runs are not evaluated automatically.

created_at, string date-time required
updated_at, string date-time required
avg_score, number nullable

Average overall score of completed evaluations. null before the first one.

avg_max_score, number nullable

Average maximum possible score of completed evaluations. null before the first one.

total_evaluated, integer

Number of completed evaluations.

Changes

No recorded changes to this operation across all 17 revisions of this API.