Visual and snapshot testing for AI agents

VisualCI checks the PDFs, screenshots and snapshots your tests produce. Changes don’t fail the build. Your agent reads each one over MCP, checks it against the code, then approves it. Or it fixes the code and pushes again.

CI providers that accept any visual change

VisualCI integrates with a wide range of continuous integration systems. Teams using GitHub Actions, CircleCI, Buildkite, Blacksmith, Depot, GitLab CI, Jenkins, Bitbucket, Semaphore, TeamCity, Bitrise or Travis CI can all connect the service. The platform sits alongside existing CI workflows rather than replacing them.

Side-by-side diffing for browser screenshots

When a snapshot changes during a pull request, nobody on the team needs to open a screenshot file manually. VisualCI lists the changed items, shows the base image, head image and diff, and reads any text or JSON differences. The agent then decides: approve the change as the new baseline, or fix the code and push again. Every approval is recorded on the build, creating a permanent record of what the agent accepted.

Upload works with screenshots from Playwright, Cypress or Capybara tests, or any image file. VisualCI highlights every region that changed since the approved baseline. View the comparison side by side, as a pure diff or with a before-after slider, then approve or fix the code from the same interface.

visualci upload --platform chrome-linux tmp/screenshots

PDF review page by page

PDFs receive the same treatment as images, but with content-aware page matching. A document that gains a new page shows exactly one inserted page rather than shifting every subsequent page. Inserted and removed pages appear next to empty slots, making it clear when a new page entered the sequence.

Each page’s text gets extracted and displayed as a diff. Lines added or removed appear plainly, and the clearest signal of a page-break bug is when the same line moves to another page. Example from a recent run:

  • Item 45: Replacement filter cartridge page 2 → page 3
  • Subtotal page 2 → page 3

Because the renderer matches pages by content rather than position, a document that grows adds only the new page to the review, keeping the rest of the baseline intact.

Consistent rendering across different machines

A persistent challenge in visual testing is that a Mac and a Linux CI machine rasterize the same PDF differently. Font rendering varies, antialiasing differs and the resulting pixels can diverge even from the same source file. VisualCI solves this by rendering PDFs itself on a single pinned Linux image with its own font set. A run on a developer’s laptop and a run in CI both produce the same baseline, eliminating platform-specific drift.

One upload for every test artifact

The VisualCI CLI fingerprints each file before uploading. If the service has already seen an identical file, it skips the upload entirely. This means a large test suite with many unchanged snapshots costs almost nothing in bandwidth or credits. The same upload endpoint handles browser screenshots, mobile app screenshots from iOS, Android, React Native and Flutter tests, PDFs, plain images, and JSON, HTML or text snapshots. All of these artifact types land in one build, with the platform tag on mobile and browser screenshots ensuring each keeps its own baseline.

Matching rules exact by default

By default, document-level comparisons use exact pixel matching. For screenshots, a colour threshold allows minor variations that would otherwise break the build over unrelated factors. This distinction means text-heavy documents stay strict while pixel-level screenshot differences can be tolerated within a configured range.

Approved snapshots power a gallery

When an agent approves a visual change, the image can be published to a gallery and used on the project’s homepage or in documentation. The same approved image serves both as a test baseline and as content for the public site. Teams can also choose from pre-existing galleries, including ones curated by VisualCI and Fleetlayer.

Checks that wait for a human decision

VisualCI posts a GitHub check on every commit. If no visual changes occurred, the check passes immediately. When something changed, the check stays pending until the agent approves the change or fixes the code and pushes again. Three modes control the blocking behavior:

  • review – the default. CI passes, and the check blocks the merge until the agent approves the change.
  • strict – CI fails on any change nobody has approved. Useful for parity suites where a change signals a bug.
  • wait – the CI job waits for the agent to approve or reject, then passes or fails.

Credit pricing for visual test suites

Builds consume credits at different rates: 1 credit for each snapshot checked, 5 for a text diff, 10 for an image diff and 20 for a PDF page rendered. Pages that VisualCI has already drawn in a previous run are never re-drawn; in a large suite where most snapshots haven’t changed, each group costs only 1 credit.

Monthly credit allowances start at 25,000 on the Free tier. The Team plan costs $29 per month for 1,000,000 credits, with additional blocks at $15 for 500,000. Public open source projects receive 1,000,000 credits monthly at no cost.

Open source server and self-hostable renderers

The server, CLI and fingerprint library are all open source under the Apache-2.0 license, housed in a single repository. Self-hosting requires a Postgres database, an S3-compatible bucket for storage and a machine dedicated to the renderers. Those renderer processes run sandboxed with no network access, keeping the build environment isolated.