Node.js 22.12 or newer. On Windows, run everything inside WSL.
Run your first test
1
Scaffold
In your app’s directory, with the dev server on Accept the defaults: Web (Playwright), the Vercel AI Gateway, and the
coding-agent skill. A target names the engine that drives it, and the engine declares the app:
a URL for a browser, a bundle id on a device.
http://localhost:3000:init adds @e2edev/e2e, @e2edev/playwright,
playwright, and ai to devDependencies, a test:e2e script, and
.gitignore entries, and writes the config, an example test, and the skill
files. It never overwrites a file that exists.e2e.config.ts
tests/example.e2e.ts
2
Install
3
Run
agent fixture..e2e/report.json. The exit code says what went wrong: 1 is
a test failure, 2 is configuration, 3 is infrastructure.
Add an agent step
The scaffold’s example file ends with a commented-out agent test. Give it a goal your app can satisfy, or write a new file next to it:tests/agent.e2e.ts
act. Real values travel through params, not through the
instruction. The final expect costs no model calls and cannot vary. There
are no sleeps anywhere: queries poll, actions wait, assertions retry.
This run needs a key. The scaffold’s model is gateway('openai/gpt-5.6-luna')
from the Vercel AI Gateway, which reads AI_GATEWAY_API_KEY:
Notes
Config and test files are ES modules. e2e loads.ts files as ESM whatever
the nearest package.json says, so a CommonJS project keeps its module type.
A tsconfig.json is optional; add one for editor completions.
For a mobile app, choose Mobile (iOS/Android) in init and follow
Testing iOS and Android.
Next
Writing tests
Goals, checks, extraction, and the deterministic APIs.
Starting your app
Let the runner start the dev server and its dependencies.
Signing in
Sign in once with a secret the model never sees.
Continuous integration
The one workflow you need.
