Skip to main content
sengol gate runs your evaluators over a dataset, signs one evaluation-run record, and tells CI whether the agent passed. The run record carries a signed result for each row.

1. Write a golden dataset

One JSON object per line. Each row needs prompt (or input) and at least one of response or expected. All rows must name the same agent and version.
golden.jsonl
Optional keys: policies, context_docs (grounding text for LLM judges), id, and metadata.

2. Configure the suite

A dataset run must not contain a sample_input block:
sengol.yaml
Evaluators are listed by class name and built with default settings. To pass constructor arguments, use - name: <Class> with an args: mapping. Each name may appear once. To attach LLM judges and thresholds, point suite.controlbook at a ControlBook.

3. Run it locally

The first run registers the dataset by its SHA-256. Later runs with the same content reuse that registration. Add a regression and the gate fails:

How the verdict is decided

  • With a ControlBook, its thresholds decide.
  • Without one, the pass rate must be at least 95%.

Exit codes

Useful flags

4. Run it in GitHub Actions

Use sengol-io/sengol-github-action. It installs sengol with pip, runs the gate, and posts a sticky comment on the pull request.
.github/workflows/sengol.yml
  • The runner must reach your appliance and a package index that serves sengol. Set PIP_INDEX_URL or PIP_EXTRA_INDEX_URL if you host it privately.
  • fail-on-gate-failure defaults to true in the action.
  • Outputs: passed ("true"/"false"), score, report_url, regression.
  • OIDC: the appliance must set SENGOL_GITHUB_OIDC_AUDIENCE (for example sengol). Without it the exchange returns 503 and the action falls back to SENGOL_API_TOKEN. Every exchange is logged with the repository, ref, commit and run id.
  • Allowlist (from the 2026-10-07 sengol release): set SENGOL_CI_OIDC_ALLOWED_REPOSITORIES to the repositories that may exchange, for example acme/service or acme/*. Unset or empty admits none, and the exchange returns 401. Earlier releases ignore the variable.
  • LLM judges from a ControlBook need ANTHROPIC_API_KEY in the step env. Without it they are skipped.

Other CI systems

The gate is a CLI command. In any CI:
  1. Install sengol.
  2. Set SENGOL_API_URL, SENGOL_TENANT_ID and SENGOL_API_TOKEN.
  3. Run sengol gate --config sengol.yaml --dataset-path golden.jsonl --fail-on-gate-failure --output junit > eval-results.xml.
  4. Publish eval-results.xml as a test report.
For OIDC from other CI providers, the appliance lists trusted issuers in SENGOL_CI_OIDC_ISSUERS and the job sets SENGOL_CI_OIDC_TOKEN_URL. The repository allowlist applies to these issuers too, and an unprefixed entry covers GitHub Actions only. Add each repository or project as <issuer>=<repository>, for example https://issuer.example=group/project. An issuer whose token has no repository claim is matched on the token’s sub, exactly. Without an entry the exchange returns 401.