Local-first browser verification runtime for AI coding agents.
Run deterministic browser flows, assert UI state, and get structured failure reports — all from your terminal.
Website · Docs · npm Package · Report a Bug · Request a Feature
Your coding agent says "fixed." Verfix checks.
AI coding agents verify their work by vibes — typecheck clean, tests green, "done!" — while the login button sits behind a modal they never saw. Verfix closes the loop: deterministic browser flows, typed failures, and structured JSON your agent can act on, all local.
The agent reads the JSON, fixes, re-runs. The loop terminates on verified browser state — not on the agent's optimism. Read more →
We measure it. The loop-closure benchmark: 8 deliberately broken apps, the agent gets only Verfix's JSON as its failure signal — no human, no extra hints.
| agent | closure rate | mean iterations |
|---|---|---|
| codex | 7/8 (88%) | 2 |
| cline | 6/8 (75%) | 2 |
| grok | 5/8 (63%) | 2 |
| null agent (does nothing) | 0/8 — enforced in CI | — |
| oracle (known-good fix) | 8/8 — enforced in CI | 2 |
Anti-cheat invariants mean deleting an assertion doesn't count as closing the loop — every failed case above was the agent getting caught fixing things the wrong way. Full per-case breakdown in benchmark/results/; run it with your own agent:
node benchmark/run.js --agent "<any command that reads JSON on stdin>".
You can — but an improvised check is the agent grading its own homework with a rubric it rewrites every iteration. Verfix inverts it:
| agent drives a browser | Verfix | |
|---|---|---|
| Check between iterations | different every time | byte-identical |
| Failure output | prose / screenshots to interpret | 8 typed failure codes + fix_hint (a versioned contract) |
| Cost per verification | LLM tokens, every time | zero tokens in strict mode |
| Agent edits the measuring stick | silent | flagged (source-guard) |
| Evidence | whatever it mentions | recorded Playwright trace, replay with verfix show |
Verfix is not a generic AI agent or chatbot wrapper. It is verification infrastructure. Reliability emerges from structured contracts, not unconstrained intelligence.
| Mode | Description |
|---|---|
| Strict | Fully deterministic. Selector-based flows, no AI. Best for CI/CD. |
| Assisted | Deterministic with AI fallback. If a selector breaks, the runtime heals it semantically. |
| Exploratory | Natural language task — AI navigates, reasons, and verifies on its own. |
- Flow Library —
verfix.config.jsonholds as many independent flows as your app needs - Structured Output — every run returns typed JSON with
passed,failures[],fix_hint, and a Playwright trace - Recorded Traces — every run captures a full Playwright trace (screenshots, network, console); open it with
verfix show - Local-first — runs entirely in-process on Node.js 20+. No Docker, no services, no cloud. Strict mode needs no AI key.
- AI Coding Agent Ready — ships with an
AGENTS.mdgenerator so Claude, Cursor, and Codex know exactly how to use it
Requirements: Node.js 20+ (that's it — no Docker)
# In your project directory
npx verfix initThe interactive wizard will:
- Detect your app's local URL
- Ask for the verification mode (default
strict— fully deterministic, no AI key) - Download Chromium if needed (~130MB, one-time, cached)
- Scaffold a
verfix.config.jsonflow library - Generate or update
AGENTS.mdfor your coding agent
# See all available flows
npx verfix flows
# Run a specific flow
npx verfix run --flow <flow-id> --output json
# Run in exploratory mode (natural language)
npx verfix run --mode exploratory --task "verify the login page loads and shows a form" --output json{
"passed": true,
"failures": [],
"timeline_url": null,
"trace_path": "/your/project/.verfix/runs/exec_abc123_trace.zip",
"show_command": "verfix show exec_abc123",
"detail_commands": {
"console": "verfix show exec_abc123 --console --output json",
"network": "verfix show exec_abc123 --network --output json"
},
"duration_ms": 3120,
"retry_count": 0,
"exit_code": 0,
"execution_id": "exec_abc123"
}Results and Playwright traces are persisted under .verfix/runs/ (newest 20 runs kept). Open a recorded trace any time:
npx verfix show exec_abc123 # or just `verfix show` for the newest runThe config is a Flow Library — add one flow per user journey you want to verify:
{
"baseUrl": "http://localhost:3000",
"mode": "assisted",
"flows": [
{
"id": "homepage-smoke",
"steps": [
{ "action": "navigate", "url": "/" }
],
"assertions": [
{ "type": "page_loaded" },
{ "type": "no_console_errors" }
]
},
{
"id": "contact-form",
"mode": "strict",
"steps": [
{ "action": "navigate", "url": "/contact" },
{ "action": "type", "selector": "[data-testid=name]", "value": "Test User" },
{ "action": "click", "selector": "[data-testid=submit]" }
],
"assertions": [
{ "type": "text_visible", "value": "Thank you" }
]
}
]
}Each flow can override the global mode — stable flows can use strict, new flows can use assisted.
npx verfix init # Interactive setup wizard (run with --yes for non-interactive mode)
npx verfix agent-setup # Output machine-readable bootstrap instructions for AI agents
npx verfix flows # List all flows in verfix.config.json
npx verfix run # Run all flows
npx verfix run --flow <id> # Run a specific flow
npx verfix show [id] # Open the Playwright trace viewer for a run
npx verfix show --console # Print a run's captured console log (--network for requests)
npx verfix probe -s "<css>" # Dry-run a selector against the last run's DOM (~1s)
npx verfix list # List recent runs
npx verfix status # Check setup health (config, browser, last run)
npx verfix doctor # Diagnose common setup issuesRun any command with --help for full option details. The Docker server runtime (API + dashboard, used by the future hosted product) is opt-in: pass --server to init, run, start, stop, status, logs, or update.
For non-interactive environments, pass the --yes (or -y) flag. The default strict mode needs zero credentials:
npx verfix init --yes --base-url http://localhost:3000To enable AI-backed modes (assisted/exploratory), supply a key:
npx verfix init --yes \
--mode assisted \
--ai-provider anthropic \
--ai-key $ANTHROPIC_API_KEY \
--base-url http://localhost:3000Alternatively, you can use environment variables:
export VERFIX_AI_KEY="your-api-key"
export VERFIX_AI_PROVIDER="anthropic" # Optional, auto-detected from key if omitted
npx verfix init --yes --mode assistedYou can preview the generated configuration as JSON without writing any files to disk by passing the --dry-run flag:
npx verfix init --yes --ai-key sk-ant-... --dry-runBy default Verfix runs everything locally in a single Node.js process — the CLI
calls the verification engine (@verfix/engine, Playwright-based) directly and
persists results + traces to .verfix/runs/:
Execution path (local mode — the default):
CLI → @verfix/engine (in-process) → Browser → .verfix/runs/<id>.json + trace
The Docker server runtime (Go API + Redis queue + containerized workers +
timeline dashboard) still exists for the future hosted CI product and is opt-in
via --server:
Execution path (server mode, --server):
CLI → API (Docker) → Redis → Worker (container) → Browser → Postgres → Dashboard
| Package | Description |
|---|---|
cli/ |
npm package verfix — runtime lifecycle + flow runner |
api/ |
Go + Fiber API — job ingestion, queue, execution state |
workers/ |
Node.js Playwright workers — browser execution engine |
dashboard/ |
Next.js execution timeline dashboard |
sdk/ |
TypeScript SDK for programmatic integrations |
docs/ |
Full documentation |
- What is Verfix?
- Getting Started
- Execution Modes
- Observability & Timeline
- Agent Integrations
- Config-First Verification
- Full CLI Reference
We welcome all contributions — bug fixes, new assertion types, CLI improvements, and docs.
See CONTRIBUTING.md for local setup, architecture overview, and the PR process.
# Quick start for contributors
git clone https://github.com/verfix-dev/verfix.git
cd verfix
npm install # workspaces: installs + live-links cli <-> workers <-> sdk- 🐛 Bug reports — GitHub Issues
- 💡 Feature requests — GitHub Discussions
- 📦 npm package — npmjs.com/package/verfix
- 🌐 Website — verfix.dev
Apache 2.0 — see LICENSE.md for details.