ab-tests

Get A/B test

Get one A/B test with its configuration, status, and run counts.

Required permission: ab_tests.view. With judges.view, the response also includes judge names.

get/v1/projects/{project_id}/ab-tests/{test_id}

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.

test_id, string uuid required

A/B test ID from GET /ab-tests.

Response

Successful Response

ABTestResponse required

An A/B test that routes part of an agent's traffic to a variant, with run totals per arm.

id, string uuid required
project_id, string uuid required

Project the test belongs to.

environment_id, string uuid required

Environment the test runs in.

agent_name, string required

Base (control) agent.

test_name, string required

Variant suffix.

variant_agent_name, string required

Variant agent name, {agent_name}-test-{test_name}.

traffic_percentage, integer required

Percentage of the agent's traffic routed to the variant.

status, 'draft' | 'running' | 'paused' | 'concluded' | 'rolled_back' | 'failed' required

Lifecycle state. Unless the test is running, all traffic goes to the base agent.

analysis_mode, 'exploratory' | 'confidence'

How results are analyzed. Fixed once the test leaves draft.

analysis_plan, ABTestAnalysisPlanResponse nullable

Statistical plan of a confidence-mode A/B test, locked when the test first starts.

min_sample_size, integer required

Completed runs needed in each group before the comparison reports enough data.

auto_rollback_enabled, boolean required

Whether the failure guardrail is on.

rollback_threshold, number required

Variant failure rate (0 to 1) above which the failure guardrail pauses the test.

rollback_window, integer required

Number of most recent finished variant runs the failure guardrail evaluates.

quality_guardrail_enabled, boolean

Whether the quality guardrail is on.

quality_judge_id, string uuid nullable

Judge for the quality guardrail. null when unset or without judges.view.

quality_threshold, number

Lowest acceptable average normalized score (0 to 1) for the variant.

quality_window, integer

Number of most recent evaluated variant runs the quality guardrail averages.

quality_min_evaluations, integer

Evaluations needed before the quality guardrail can act.

winner, 'control' | 'variant' nullable

Manually chosen winner of an exploratory test. null when none.

recommendation, 'collecting' | 'continue' | 'variant_recommended' | 'control_recommended' | 'inconclusive' | 'invalid_srm' | 'safety_stopped' nullable

Test verdict: collecting before the first planned look, continue after a look without a decision, variant_recommended or control_recommended when a boundary was crossed, inconclusive, invalid_srm after a sample-ratio mismatch, or safety_stopped when the test was stopped automatically.

recommendation_reason, string nullable

Explanation of recommendation.

error, string nullable

Why the test was stopped automatically. Cleared when the test resumes.

stop_reason, 'manual' | 'failure_guardrail' | 'quality_guardrail' | 'efficacy' | 'futility' | 'srm' | 'analysis_error' | 'variant_unavailable' nullable

Why a test stopped: manual, a guardrail (failure_guardrail, quality_guardrail), a planned look (efficacy when a boundary was crossed, futility when the final look was inconclusive), srm (sample-ratio mismatch), analysis_error (metric judge evaluations failed), or variant_unavailable.

stop_details, object

Details for stop_reason, such as the observed failure rate and window for failure_guardrail.

created_at, string date-time required
updated_at, string date-time required
started_at, string date-time nullable

When the test first started. null for drafts.

stopped_at, string date-time nullable

When the test was last paused or stopped. Cleared when it resumes.

concluded_at, string date-time nullable

When the test was concluded.

control_runs, integer

Completed control runs. Confidence tests exclude forced runs.

variant_runs, integer

Completed variant runs. Confidence tests exclude forced runs.

control_avg_cost, number nullable

Always null. Cost statistics are returned by the comparison endpoint.

variant_avg_cost, number nullable

Always null. Cost statistics are returned by the comparison endpoint.

control_avg_duration, number nullable

Average duration of completed control runs, in milliseconds.

variant_avg_duration, number nullable

Average duration of completed variant runs, in milliseconds.

control_avg_score, number nullable

Average normalized judge score (0 to 1) of control runs, from the metric or quality judge when set. null without evaluations.

variant_avg_score, number nullable

Average normalized judge score (0 to 1) of variant runs, from the metric or quality judge when set. null without evaluations.

Changes

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