SwiftBrowse
The AI browser for browser automation and end-to-end testing. A native engine (Rust, driving Chromium over the DevTools Protocol) with one contract across a test runner, TypeScript and Python SDKs, and an MCP server for AI agents.
npm install -g swiftbrowse # or: pip install swiftbrowse
npx playwright install chromium chromium-headless-shell
swiftbrowse doctorWhat it is
SwiftBrowse does one job three ways, with the same operations and the same results everywhere:
- An end-to-end test runner.
swiftbrowse testruns tests written as JSON files: parallel workers, retries and flaky detection, sharding, saved logins, network mocking, traces, video, and JUnit/HTML reports. - Tests in code. The TypeScript and Python SDKs expose every operation as a typed method, for use with
node:test, Vitest, Jest, pytest or unittest. - A browser for AI agents.
swiftbrowse mcpserves the Model Context Protocol. A flow an agent works out over MCP can be saved as a test unchanged.
A step in a test file, an MCP tool call and an SDK method call are the same request:
{ "op": "click", "target": "Sign in", "expect": { "type": "url_contains", "value": "/dashboard" } }await page.click('Sign in', { expect: { type: 'url_contains', value: '/dashboard' } });Why use it
- Fast. On the same 29-test suite,
swiftbrowse testfinishes in a third to a half of Playwright Test's time. New sessions attach to a warm browser in about 50 ms. See Benchmarks. - Reliable actions. Every click waits until its target is visible, enabled, not covered and not moving. The click is checked again as the mouse goes down and up, so a layout shift can't send it to the wrong element.
- Honest results. An action can verify its own outcome (
expect). Ambiguous locators are errors, never silent guesses. Every failure says what kind it is and whether retrying could help. - Evidence on failure. You get a screenshot, the page as text, console errors and failed requests. Optionally there's a trace with a live, inspectable copy of the page at every step, and a video.
- Small footprint. A single native binary, with no Node runtime needed to run JSON tests. The Python SDK uses the standard library only; the TypeScript SDK has no dependencies.
Where to go next
Platforms
Prebuilt binaries are available for Linux (x64 and arm64, glibc 2.35+), macOS (Apple Silicon and Intel) and Windows x64. They ship inside the npm and PyPI packages and as archives on the GitHub releases page. SwiftBrowse drives Chromium; other browser engines are not supported yet (see Limitations).
SwiftBrowse is young (version 0.1.2). If something breaks or the docs leave you guessing, please open an issue. Include the output of
swiftbrowse doctor.