Catch agent regressions before they ship — no eval cases required.
Part of DecimalAI — most users want decimal-labs/decimalai-python, the SDK this Action pairs with.
When you open a PR with an agent change (renamed tool, rewritten prompt, swapped model), this Action computes the structural blast radius against your last 30 days of production traces and posts a per-PR impact report:
Example report — the numbers above are illustrative (they come from the demo's seeded reference agent, not customer traffic). Run it yourself to get your own.
DecimalAI uses your production traffic as the implicit test set. You don't need to write or maintain eval cases for the Action to catch regressions.
Want to see a report before wiring up CI? The demo runs the same check against a seeded reference agent — its numbers are illustrative, run it yourself:
pip install decimalai && decimalai demo regression # ~2 min; needs a free API key (app.decimal.ai/settings)pip install "decimalai[langchain]" # or your framework's extrafrom decimalai.langchain import agent_config # or your framework's agent_config()
support = agent_config("support-agent") # reads DECIMAL_API_KEY; traces each run under this name
# create_agent(..., middleware=[support.middleware])That name is the agent-name the Action takes. Frameworks has each framework's agent_config().
# scripts/init_for_decimal.py
"""Registers this PR's candidate manifest for DecimalAI's regression check."""
import decimalai
from myapp.agent import build_agent # your existing agent factory
if __name__ == "__main__":
decimalai.init() # DECIMAL_API_KEY + DECIMALAI_MODE=manifest_only, from the workflow
result = decimalai.flush_manifest_for_ci(
agent_name="support-agent", # the Action's `agent-name`
chain=build_agent(), # LangChain/LangGraph: reads its tools, prompts and models
)
print(f"Manifest registered: {result['manifest_id']}")flush_manifest_for_ci() is the call that uploads the candidate manifest and writes its id
(decimal_manifest_id) for the next step: building the agent alone registers nothing. No LLM call
is made under DECIMALAI_MODE=manifest_only. If your factory doesn't return a LangChain/LangGraph
object, drop chain= and pass tools=[...], prompts={...} and models={...} instead, as the
guide shows.
# .github/workflows/decimal.yml
name: Agent Regression Check
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # to post the impact report comment
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install -e .
- name: Manifest extraction
id: manifest # required: the next step reads this step's output
env:
DECIMALAI_MODE: manifest_only
PYTHONPATH: . # `python scripts/x.py` puts scripts/ on sys.path, not the repo root
DECIMAL_API_KEY: ${{ secrets.DECIMAL_API_KEY }}
OPENAI_API_KEY: dummy # placeholder, never called in manifest_only mode
run: python scripts/init_for_decimal.py
- name: Agent Regression Check
uses: decimal-labs/regression-check@v1
with:
api-key: ${{ secrets.DECIMAL_API_KEY }}
agent-name: support-agent
candidate-manifest-id: ${{ steps.manifest.outputs.decimal_manifest_id }}$GITHUB_OUTPUT is per step: the id the extraction step wrote is not in the Action step's own
$GITHUB_OUTPUT, only in steps.manifest.outputs. That is why the extraction step needs id:
and the Action takes candidate-manifest-id explicitly.
In Settings → Secrets and variables → Actions, add:
DECIMAL_API_KEY: your key from app.decimal.ai/settings
That's it. Open a PR and the impact report shows up as a comment within ~30 seconds.
Run the Action with no api-key and it renders a committed sample report — the seeded demo agent from
the two-minute demo: six manifest changes, 120
traces, 2 high-risk — and posts exactly the comment above, with a first line saying it is sample data.
No API call, no signup, and the job never fails. Eight lines in .github/workflows/agent-check.yml:
on: pull_request
permissions:
pull-requests: write
jobs:
agent-check:
runs-on: ubuntu-latest
steps:
- uses: decimal-labs/regression-check@v1When you want it against your own agent, add api-key: ${{ secrets.DECIMAL_API_KEY }} (free key at
app.decimal.ai/settings) and an agent-name, and follow the
setup below.
| Name | Required | Default | Description |
|---|---|---|---|
api-key |
no | — | DecimalAI API key. Pull from GitHub Secrets. Omit it to run in fixture mode (see above): no API call, the committed sample report is rendered, the job never fails. |
agent-name |
no (yes for a live run) | — | The DecimalAI agent your production traces are filed under: the name passed to agent_config(...) (or to decimalai.init(agent_name=...) / DECIMAL_AGENT_NAME when no agent config names it). Required whenever api-key is set; in fixture mode it only labels the comment. |
github-token |
no | ${{ github.token }} |
Token used to post / update the PR impact comment. Defaults to the automatic per-job token, so the comment works out of the box once the workflow grants pull-requests: write. Override only for a different token (e.g. a PAT to comment on forked PRs). Falls back to the GITHUB_TOKEN / GH_TOKEN env vars if set empty. |
candidate-manifest-id |
no (yes for a live run in a workflow) | (auto) | The id decimalai.flush_manifest_for_ci() wrote in an earlier step: pass ${{ steps.<id>.outputs.decimal_manifest_id }}. If omitted, the Action looks in its own step's $GITHUB_OUTPUT and in ./decimal_manifest_id.txt. An earlier step's $GITHUB_OUTPUT is not visible there, so in a workflow the fallback finds an id only when the script wrote the file, with flush_manifest_for_ci(..., output_path="decimal_manifest_id.txt"). |
base-url |
no | https://api.decimal.ai |
DecimalAI API base URL. Defaults to production. Override only if DecimalAI directs you to a different API host. |
fail-on |
no | high |
When to fail the workflow: high (any HIGH RISK), medium (any MEDIUM+), or none (warn only). The unverified verdict is ranked by the severity of the manifest diff, so fail-on: high still fails a PR that deletes a tool on an agent with no traffic. |
on-error |
no | warn |
What to do when the check could not RUN — a DecimalAI outage or 5xx, a network error, a timeout, or your plan's monthly regression-check quota (429). warn posts a "check did not run" comment and exits 0; fail reds the job. Misconfiguration (401/403 bad key, 400/404 unknown agent or manifest) is always fatal under both. |
comment-mode |
no | update |
update (single comment, updated per push) or new (post fresh per push). |
trace-window-days |
no | 30 |
How far back to look for affected traces. |
behavioral-check |
no | off |
Behavioral verification for model swaps (preview). Only runs when the diff contains a model change. off skips it; mock counts how many recorded model calls are eligible to replay but spends no tokens (free); real re-issues a representative recorded call per affected trace against the candidate model and LLM-judges the outputs (spends tokens). |
| Name | Description |
|---|---|
mode |
live when the check ran against DecimalAI, fixture when no api-key was supplied and the sample report was rendered. |
verdict |
One of: high_risk, medium_risk, low_risk, no_change, unverified, first_run — or unavailable when the check could not run and on-error is warn. |
high-risk-count |
Number of HIGH RISK traces in the report. |
medium-risk-count |
Number of MEDIUM RISK traces. |
low-risk-count |
Number of LOW RISK traces. |
regression-check-id |
DecimalAI persisted regression check ID (for deep linking). |
report-url |
URL to the full report on the DecimalAI dashboard. |
-
The previous CI step (
scripts/init_for_decimal.py) runs your agent's existing initialization inmanifest_onlymode. The DecimalAI SDK captures tools, prompts, and models from runtime objects and uploads the manifest as a candidate. -
This Action reads the candidate manifest ID and posts to
POST /api/v1/regression-check. The DecimalAI backend:- Computes the structural diff against your agent's baseline manifest
- For each changed surface, queries for historical production traces that depended on it
- Classifies severity (HIGH / MEDIUM / LOW) per the impact
-
The Action formats the impact report as a markdown PR comment and upserts it on the PR.
-
Action exit code is 1 if the verdict meets the
fail-onthreshold; otherwise 0.
The impact report answers "which of your recorded production traces depended on
what you just changed". That question has no answer if the agent has no traces
in the window — a brand-new agent, an agent you haven't instrumented yet, or
traffic older than trace-window-days.
In that case the verdict is unverified, not no_change. The two are
different claims:
| Verdict | What it means |
|---|---|
no_change |
We looked at real production traffic and this change touches none of it. |
unverified |
The manifest changed and there was no traffic to check it against. Nothing was verified. |
unverified inherits the severity of the manifest diff, so a deleted tool
fails under the default fail-on: high while a low-severity change only warns.
To turn unverified into a real verdict, connect the production agent with its
framework's agent_config(), which traces every run, or widen trace-window-days.
No agent execution. We don't run your code in CI. We only diff manifests and query the trace store. See docs.decimal.ai/guides/regression-check for the architectural detail.
The workflow needs pull-requests: write permission to post / update the impact comment (see the permissions: block in the quick start workflow). The Action authenticates with the automatic per-job ${{ github.token }} by default — you don't need to pass a token manually. Without the pull-requests: write permission, the Action runs successfully but skips the comment (everything is still in outputs + logs).
To comment on PRs from forks, or otherwise use a different identity, pass an explicit token via the github-token input (e.g. github-token: ${{ secrets.MY_PAT }}).
The first PR you open after installation has nothing to diff against. The Action records your candidate manifest as the baseline and posts a friendly comment:
✓ FIRST RUN — baseline recorded
Future PRs will diff against this manifest.
Subsequent PRs get real impact reports.
The Action found no candidate manifest id. Check that:
- The Action step passes
candidate-manifest-id: ${{ steps.<id>.outputs.decimal_manifest_id }}, and the extraction step has thatid:.$GITHUB_OUTPUTis per step, so without them the Action cannot see what the extraction step wrote. - Your init script calls
decimalai.flush_manifest_for_ci(...). Building the agent alone registers nothing. DECIMALAI_MODE=manifest_onlyis set when running the init script- The init step succeeded (check the step logs for errors)
Your init script raised an exception. This is usually a setup issue — your build_agent() might require resources unavailable in CI (database, network services). Stub or mock those for the manifest_only path.
The baseline isn't being persisted. Make sure your production deployment is also instrumented with the SDK so it registers manifests under normal mode (not manifest_only).
npm install
npm run lint # tsc --noEmit
npm test
npm run build # generates dist/index.js (committed for Marketplace)Run these yourself before opening a PR. CI runs the same four, and additionally fails if dist/ is stale — so commit the rebuild along with your source change.
DecimalAI · Docs · Skills Registry · Python SDK · agentversion · skillevaluation · [email protected]
