Agent Evals
Agent Evals release gate for GitHub Actions
The workflow runs your agent fixture on each pull request, fails the job when a required assertion fails, and writes a redacted report to the job summary. It needs no secrets and no model calls.
Updated 2026-11-22. Examples use the synthetic editorial fixture in examples/agent-evals/editorial.
The workflow
The repository's .github/workflows/agent-evals.yml is the reference. The core of the gate job:
on:
pull_request:
permissions:
contents: read
jobs:
gate:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
# install and build the CLI here
- name: Use the reviewed suite from the base branch
env:
BASE_REF: ${{ github.base_ref }}
run: git show "origin/$BASE_REF:agent-evals/suite.json" > "$RUNNER_TEMP/suite.json"
- name: Fresh run
run: >
promptflow agent eval "$RUNNER_TEMP/suite.json"
--runner agent-evals/runner.json
--summary --report report.jsonWhat reviewers see
- A job summary with the mode, a table of cases, each failed assertion with expected and observed behavior, and the flagged steps in the timeline.
- An error annotation per failed assertion, for example
Agent Evals publish-before-approval/approval-before-publish. - A non-zero exit code, so the check stays failed.
- A command to reproduce the run locally.
The summary is built from the redacted report. Values from traces are escaped, so trace content cannot inject Markdown, HTML, links or mentions.
Fork pull requests and untrusted input
- Use the
pull_requestevent, notpull_request_target. Fork pull requests then run with a read-only token and no secrets. - Set
permissions: contents: readandpersist-credentials: false. - Pass pull-request values to scripts through
env, never through${{ }}insiderun. - The runner starts without a shell and without inherited secrets.
Where the suite, baseline and evaluator must come from
A pull request that edits its own suite could delete the check that would fail it. Read the suite and baseline from the base branch, as the workflow above does, so changes to them take effect only after review and merge.
- Protect the suite, baseline, runner config and workflow file with CODEOWNERS.
- Pin the evaluator: use a reviewed commit or version of the CLI, not code from the pull request.
- The agent code is the thing under test, so it does come from the pull request.
Make it a required check
- Merge the workflow to your default branch and let it run once.
- In the repository settings, open Rules (or Branches) for the default branch.
- Require status checks to pass, and add the gate job by name.
- Leave the workflow's
pathsfilter off if the check is required, or a pull request that does not match the filter will wait forever.