Fail a build when AI agents can no longer read your site
One step after your deploy crawls the live site with Surfacedd's agent readiness rules and fails the job when the score drops under your threshold. It costs $0 and stores nothing.
By the Surfacedd teamUpdated 3 min readMarkdown
On this page
Short answer
To run Surfacedd in CI, add surfacedd agent-readiness check <url> --fail-under N after your deploy step. It crawls up to 50 pages, scores Reach, Understand and Act, and exits 5 under N. With a URL it needs no database, licence or keys. Today the runner must be a Mac or Windows machine with Surfacedd installed.
This is the reference recipe. For why and when to run it, how to choose a threshold, and what usually breaks agent access between releases, read the guide Run an agent readiness check in CI.
What the step does
surfacedd agent-readiness check <url> crawls the site now (50 pages by default, robots.txt respected) and runs the same agent readiness rules as a Surfacedd site audit. It scores Reach, Understand and Act from 0 to 100 and prints the failing rules with their evidence and fixes. With a URL it needs no database, licence or API keys, makes no AI calls, costs nothing and stores nothing.
| Option | Default | Effect |
|---|---|---|
--fail-under 0-100 | none | Exit 5 when the overall score is under the number, or when there is no score |
--max-pages 1-500 | 50 | Pages to crawl |
--json | on in CI | The JSON document, with data.passed, data.fail_under, data.scores and data.problems[].fix |
It refuses private and local addresses, so it can't check a dev server on localhost. Point it at a preview deployment or production.
Which runner to use
For the agent-readiness check, use the free standalone checker, surfacedd-check. It runs on hosted runners such as ubuntu-latest, macos-latest and windows-latest, needs no licence or app, and gives the same scores and exit codes as surfacedd agent-readiness check. On GitHub, the surfacedd/agent-readiness-action@v1 action installs it, writes a job summary and fails the job under your threshold. Both ship with the first release.
The recipe below uses the full surfacedd command, which ships inside the desktop app. Use it on a self-hosted runner, a Mac or Windows machine with Surfacedd installed and the command added from Settings › AI assistants & CLI › Install command-line tool, when you also want other commands in the same job. The URL form of the check needs no licence on that machine.
GitHub Actions
name: Agent readiness
on: [pull_request]
jobs:
agent-readiness:
runs-on: [self-hosted, macOS]
steps:
- name: Check the preview site for AI agents
run: surfacedd agent-readiness check "$PREVIEW_URL" --fail-under 70 --max-pages 50 --json > agent-readiness.json
env:
PREVIEW_URL: https://staging.example.com
- if: always()
uses: actions/upload-artifact@v7
with:
name: agent-readiness
path: agent-readiness.json
This is the recipe from the CLI's own notes, with the runner set to a self-hosted Mac and the current major version of upload-artifact. If your preview URL comes from a deploy job, add needs: deploy and read the URL from that job's outputs. if: always() keeps the report when the check fails, which is when you need it.
GitLab CI
agent-readiness:
stage: test
needs: [deploy]
tags: [macos]
script:
- surfacedd agent-readiness check "$SITE_URL" --fail-under 70 --json > agent-readiness.json
artifacts:
when: always
paths: [agent-readiness.json]
Use your own runner's tag in tags.
Reading a failure
A failing job prints the scores and the rules behind them, then the verdict. This run was against a small local test site, using a development-only allowance for local addresses:
$ surfacedd agent-readiness check http://127.0.0.1:8765/ --max-pages 5 --fail-under 80
Checking http://127.0.0.1:8765/ for AI agents (up to 5 pages, robots.txt respected, nothing stored).
Checking agent access…
http://127.0.0.1:8765/ · checked 2026-11-19 09:53 · 2 pages
Overall 72/100
Reach 94/100
Understand 50/100
Act not scored (no rule applies)
WEIGHT AREA RULE FINDING
2 understand understand.organization-schema The home page has no Organization markup.
2 understand understand.landmarks 1 of 2 pages lack a main or navigation landmark.
1 reach reach.sitemap No sitemap found in robots.txt or at /sitemap.xml.
7 informational findings on emerging agent protocols are never scored (see --json).
Failed (overall 72 against --fail-under 80)
surfacedd: Agent readiness 72/100 is under --fail-under 80.
That exits with code 5. Code 1 means the check itself didn't run, for example because the URL didn't load; don't count it as a score. See exit codes.
Informational findings cover emerging agent protocols. They are shown but never scored, so they can't fail a build.
Let Claude Code write it
With the Surfacedd plugin for Claude Code, ask "add an agent readiness check to our deploy workflow". The ci-agent-readiness skill finds your pipeline, runs the check once to suggest a threshold, and proposes the change as a diff for you to approve.
Sources
Keep reading
- GuidesRun an agent readiness check in CI, so a release can't quietly lock AI agents outAI crawlers and agents lose access to sites through ordinary changes: a robots.txt rule, a firewall setting, a page that moves to client-side rendering. A check after each deploy catches the regression the day it ships, not weeks later in your visibility numbers.Read
- DocsWhat each surfacedd exit code means, and how to handle it in a scriptSix exit codes cover every outcome, so a script or CI job can tell a broken check from a failing site, and a refused payment from an error.Read
- ProductMake sure AI agents can read your site and act on itAgent readiness checks whether AI crawlers and browsing agents can get to your pages, tell what they offer and use your forms, then shows the evidence and the fix for each problem.Read
- IntegrationsAsk Claude Code which prompts you lose, then fix the pages in the same sessionThe Surfacedd plugin gives Claude Code your stored AI answers, competitors, cited pages, Search Console data and agent readiness issues, plus skills that turn them into reviewed diffs in your repository.Read
How we research, write and correct pages: read our editorial policy.