IntentLayerDocsDashboard ↗
Docs/Guides
Guides

Setting up CI evals

Fetch tenant failures as evals, replay gate or agent, produce JUnit, and fail pipeline on regression.

Runner fetches tenant evals, executes them against gate or agent command, prints table, optionally writes JUnit, and exits nonzero on regression.

#Local gate run

bash
pip install -e sdk
export INTENTLAYER_BASE_URL=https://intentlayer-staging.example.com
export INTENTLAYER_API_KEY=il_...
intentlayer-evals run \
  --against gate \
  --junit artifacts/intentlayer-evals.xml

Exit codes: 0 all pass; 1 regression; 2 config, network, auth, or malformed export.

#Stable sampling

bash
intentlayer-evals run --against gate --sample 50 --seed 2026

Evals sort by ID. Same export/sample/seed selects same IDs. Muted evals are not fetched. Never randomize seed per pull request.

#GitHub Actions

yaml
jobs:
  intentlayer-evals:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: ./ci/github-action
        with:
          base-url: ${{ vars.INTENTLAYER_STAGING_URL }}
          api-key: ${{ secrets.INTENTLAYER_API_KEY }}
          junit-path: artifacts/intentlayer-evals.xml

Reference action installs bundled Python SDK and writes result table to GITHUB_STEP_SUMMARY. GitLab example exists at ci/gitlab-ci.example.yml.

#Agent command mode

bash
intentlayer-evals run \
  --against agent \
  --cmd "python my_agent.py" \
  --junit artifacts/agent-evals.xml

Runner pipes eval input plus newline to stdin. Context is not passed in v0. Shell operators are not evaluated. Failure means nonzero exit, timeout, or known textual failure marker. It does not judge semantic answer quality.

Source truthdocs/CI_GUIDE.mdsdk/intentlayer/evals_cli.pyci/github-action/action.yml