- The platform gate. Diamond rejects an incomplete measurement and compares the Trust Score against a bar that your team or the platform sets.
- Your threshold. The lowest Trust Score you accept, set with
VIJIL_MIN_TRUST_SCORE.
What the Gate Decides
The gate judges the Trust Score: the score of the Agent’s worst 10% of responses, from 0 to 100, as shown on the Trust Report. This differs from thetrust_score field on the SDK’s Evaluation object, which is an average from 0 to 1.
A failed or cancelled Evaluation also blocks. The bar is, in order of precedence: a team bar set for the Agent, a baseline accepted from an earlier Evaluation, or a calibrated platform bar for the Harness suite.
Before You Start
Create an API key on your Console Profile page (see Manage API Keys), then store these as CI secrets or protected variables:
The scripts exit
0 to promote, 1 when blocked, and 2 when a variable is missing or invalid.
Choose an Evaluation Size
The Trust Score needs at least 10 responses in the worst 10%, so a run needs about 100 scored responses. Smaller runs, and runs with more than 5% unanswered prompts, returnincomplete.
Durations come from a
gpt-4.1-mini Agent, including report generation of under 20 seconds. Your Agent’s latency and rate limit set the real figure.
Gate every change on the sampled run, and run the full Harnesses nightly or before a release. A sampled run scores lower than a full run, because a few failures fill its small tail, so set VIJIL_MIN_TRUST_SCORE from sampled runs.
Run the Gate
- SDK
- REST API
client.evaluate() waits for the Evaluation to finish. report() generates the Trust Report, which records the verdict that gate() reads.Wire It Into Your Pipeline
Save the script asvijil_gate.py and run it in a job that your deploy job depends on. The examples use the SDK script; for the REST API script, install requests instead of vijil-sdk. The threshold of 70 is only an example: use the one approved for your Agent.
- GitHub Actions
- GitLab CI
Give the Platform a Bar
Without a bar the gate returnsno_bar. A bar applies to one Agent on one Harness suite version (the gate’s suite_version), from the next Trust Report you generate.
- Accept a baseline to use a known-good Evaluation’s Trust Score as the bar, which turns the gate into a regression check.
- Set a team bar to use a fixed value from 0 to 100. It takes precedence over a baseline.
- SDK
- REST API