Regressionbot Developer Docs
Welcome to the Regressionbot documentation. The most efficient way to use Regressionbot is via Agentic Workflows (MCP), allowing AI agents to autonomously manage your visual testing lifecycle.
Agentic Workflows (MCP)
Connect Regressionbot directly to your AI agent (Gemini, Windsurf, Cursor, or MCP in Agentic IDE). This is the optimal workflow for modern development—letting your agent run tests, interpret AI Summaries, and approve changes autonomously.
# Simply ask your agent to run the test
> compare my preview URL https://pr-123.myapp.com against production
# The agent uses the MCP tool to start the job
[run_regression_job] → job_7x9kLm2p
[get_job_status] → COMPLETED ✓
# The agent reviews the AI summary and decides to approve
"I found 1 intentional change: the 'Signup' button is now blue. Approving."
[approve_job] → Success.Learn how to set up your agent in the MCP Documentation.
Node.js SDK
Integrate visual regression tests deeply into your automated test suites, scripts, or deployment pipelines using our strongly-typed Node.js SDK.
import { Visual } from 'regressionbot';
const visual = new Visual(process.env.REGRESSIONBOT_API_KEY);
const job = await visual.test('https://preview.myapp.com')
.against('https://myapp.com')
.run();
await job.waitForCompletion();
const summary = await job.getSummary();
console.log(summary.overallScore);CLI Usage
Install the CLI directly or start a test from your terminal. Regressionbot CLI makes it trivial to check an environment or hook it into CI quickly.
# Run a quick test against your preview URL
npx regressionbot@latest https://preview.myapp.com \
--against https://myapp.comAPI Reference
Direct access to the underlying REST API that powers the SDKs, CLI, and Agentic Workflows.
Base URL: https://api.regressionbot.com
/crawlStart a visual regression job
Triggers a new visual regression job for a single URL or a sitemap.
Request Body
{
"project": "string",
"testOrigin": "string",
"url": "string",
"sitemapUrl": "string",
"baseOrigin": "string",
"devices": [
"string"
],
"paths": [
{
"path": "string",
"label": "string"
}
],
"scans": [
{
"pattern": "string",
"options": null
}
],
"masks": [
"string"
],
"concurrency": 0
}Responses
{
"message": "Visual regression job started",
"jobId": "550e8400-e29b-41d4-a716-446655440000"
}/job/{jobId}Get job status
Retrieve the current status and progress of a visual regression job.
Responses
{
"jobId": "string",
"status": "string",
"progress": {
"total": 0,
"completed": 0,
"percent": "50.00"
},
"executionTime": 0,
"results": [
{
"url": "string",
"status": "string",
"diffCount": 0,
"diffPercentage": 0,
"currentKey": "string",
"baselineKey": "string",
"diffKey": "string",
"regressionbotSummary": "string"
}
],
"collageKey": "string",
"createdAt": "string"
}/job/{jobId}/summaryGet job summary with signed URLs
Retrieve a summary of the completed job, including pre-signed URLs for diff images.
Responses
{
"jobId": "string",
"status": "string",
"totalUrls": 0,
"completedCount": 0,
"overallScore": 98.5,
"executionTime": 0,
"regressionCount": 0,
"matchCount": 0,
"newBaselineCount": 0,
"errorCount": 0,
"collageUrl": "string",
"regressions": [
{
"url": "string",
"variantName": "Desktop Chrome",
"diffCount": 0,
"baselineUrl": "string",
"currentUrl": "string",
"diffUrl": "string",
"regressionbotSummary": "string"
}
],
"matches": [
{
"url": "string",
"variantName": "string",
"baselineUrl": "string",
"currentUrl": "string"
}
],
"newBaselines": [
{
"url": "string",
"variantName": "string"
}
],
"errors": [
{
"url": "string",
"errorMessage": "string"
}
]
}/job/{jobId}/collageGenerate and get regression collage
On-demand generation of a single collage image containing all detected regressions.
Responses
{
"jobId": "string",
"collageKey": "string",
"collageUrl": "string",
"regressionCount": 0
}/approveApprove job baselines
Promote the current screenshots of a job to be the new baselines.
Request Body
{
"jobId": "string"
}Responses
{
"message": "Job baseline approved",
"jobId": "string",
"approvedUrlsCount": 0
}