Quickstart
Set up agent-qa with one command, connect a model and run your first tests in about ten minutes.
This page takes you from an empty folder to a first run. The examples test Komazon, a small shop at https://playground.vostride.dev/shop/ that exists for this purpose. One of its pages has a deliberate bug, and one of the examples catches it.
Working with a coding agent? The agent quickstart hands this whole page to it with one prompt.
Before you start
- Node.js 24 or newer.
- A model: a Claude or ChatGPT subscription, an Anthropic, OpenAI or Gemini API key, or an OpenAI-compatible or Anthropic-compatible endpoint. Local models work through the compatible endpoints.
- Network access to
playground.vostride.devand to your model provider. - Docker, but only for tests that use hooks.
1. Set up agent-qa
Run this in the folder that will hold your tests. In an existing app, that is usually the repository root.
npx agent-qa@latest initThe command is the same for npm, pnpm, yarn and bun: init finds the project's package manager and installs with it.
In a terminal, init asks three questions:
- What platform will you test? Web is selected already. Mobile covers Android and iOS.
- Which model should agent-qa use?
- Which coding agents should agent-qa set up? Claude Code and Codex, with the ones it detects already selected.
Every question has a flag, and --yes takes every default. Setup and doctor lists the flags. The model you choose decides the model entry init writes:
--llm | Model entry it writes | Default model | Connect it with |
|---|---|---|---|
claude-code (default) | claude-code | claude-sonnet-5-5 | Claude subscription sign-in |
codex | codex | gpt-6.1-sol | ChatGPT subscription sign-in |
anthropic | anthropic | claude-sonnet-4-6 | API key |
openai | openai | gpt-5.5 | API key |
gemini | gemini | gemini-3-flash-preview | API key |
openai-compatible | openai-compatible, when --model and --base-url are both given | The one --model names | An API key, if the endpoint needs one. Without the two flags, set it up on the dashboard's model page. |
anthropic-compatible | anthropic-compatible, when --model and --base-url are both given | The one --model names | An API key or bearer token, if the endpoint needs one. Without the two flags, set it up on the dashboard's model page. |
--model <id> replaces the default model, and --base-url <url> points the model at another endpoint, such as a local model server. For example:
npx agent-qa@latest init --llm openai-compatible --model my-model --base-url http://127.0.0.1:1234/v1Then init works through its steps, in this order:
- Creates
package.json, or updates the one that is there. - Writes the scaffold: the config, the example tests and suite, and the knowledge folder.
- Installs agent-qa at an exact version with the project's package manager, and the subscription sign-in plugin when you chose a subscription.
- Downloads Chromium for web targets. agent-qa uses its own copy, which leaves your everyday browsers alone.
--no-browsersskips this step. - Installs the four skills, the MCP entries and the
AGENTS.mdblock for the coding agents you chose. Coding agents shows what it writes. - Runs
validateon the config and the tests. - In a terminal, starts the dashboard. While the model still needs a credential, the dashboard opens on its model page.
--no-dashboardskips this step.
It ends with a short list of next steps that holds only what is left to do.
On Linux, Chromium also needs some system libraries. npx agent-qa install-browsers --chromium --with-deps installs them.
init writes:
package.json, and a managed block in.gitignore;agent-qa.config.yaml;.env, which starts empty, and.env.secrets.local;hooks.yamlandscripts/examples/make-shipping-address.mjs;- three example tests under
tests/examples/, andsuites/examples.suite.yaml, which runs two of them; - the
agent-qa-knowledge/folder; - for each coding agent you chose, its skills folder and its MCP entry:
.claude/skills/and.mcp.jsonfor Claude Code,.agents/skills/and.codex/config.tomlfor Codex.
A mobile-only project gets no example tests, suite or hook script.
If the folder is not a git repository yet, make it one and commit. Later you will read what agent-qa learned as a git diff against this commit.
git init
git add .
git commit -m "Add agent-qa"The .gitignore block that init wrote keeps .agent-qa/, .env, .env.secrets.local and node_modules/ out of the commit.
2. Connect the model
init signs no model in, so connect yours before the first run.
With a subscription, sign in. Name the model entry init wrote:
npx agent-qa auth login --config claude-codeIt prints a sign-in URL and opens it in your browser. For Claude, paste the code the page shows back into the terminal. Use --config codex for a ChatGPT subscription.
With an API key, add the key on the dashboard's model page, which init opens while the model still needs one. Or save it from the terminal, naming the entry init wrote, anthropic, openai or gemini:
npx agent-qa auth set --config anthropic --type api-keyauth set asks for the key at a hidden prompt, so it never lands in your shell history. agent-qa keeps credentials in ~/.agent-qa/auth.json, outside the project. Models and credentials covers every provider.
Then check the whole setup:
npx agent-qa doctordoctor looks at Node.js, the config, the browser, Docker, your coding agents and your credentials, and sends one short request to your model. Setup and doctor lists every check.
3. Run the examples
npx agent-qa run suites/examples.suite.yamlExpect one pass, one failure and exit code 1:
- The checkout journey signs in, buys a mug and checks the order. It passes.
- The cart-total test catches the playground's deliberate bug. Two mugs should cost $53.00, and the bag shows $29.00.
The summary's first line reads Tests: 1 of 2 passed. After the verdict, agent-qa spends up to a minute analyzing the run and recording what it learned. That work never changes the exit code.
4. Look around
Open the dashboard
npx agent-qa dashboard --openIt prints Dashboard running at and a URL. Each run shows its tests, steps and evidence. Accessibility results appear here too: open a test's last step and its A11y tab. Stop the dashboard with Ctrl+C.
Read what agent-qa learned
Runs write what they learn into agent-qa-knowledge/. After the first runs every record is a new file, so ask git to include new files in the diff:
git add --intent-to-add agent-qa-knowledge
git diff -- agent-qa-knowledgeCommit the records you want to keep. memidex explains what each file means.
See the action cache
agent-qa remembers the actions a passing step took and replays them next time without asking the model to plan, as long as the screen looks the same. The step's check still runs. On your default branch it only saves when asked, so the first of these two runs passes --save-cache:
npx agent-qa run tests/examples/komazon-checkout.yaml --save-cache
npx agent-qa run tests/examples/komazon-checkout.yamlSteps that type a secret are never cached, so in this journey every step except the sign-in can replay its actions. A step whose check reads a value from the screen still reads it live, and the Cache: line in the summary counts that step as a miss. Caching has the details.
Ask your coding agent
init already set up the coding agents you chose, so ask yours to run the examples. Coding agents shows what init wrote for each one.
When something is missing
| Situation | What agent-qa prints | Fix |
|---|---|---|
| Node.js older than 24 | agent-qa needs Node.js 24 or newer. | Install Node.js 24 or newer from nodejs.org. |
| No browser | agent-qa browser support is not installed for Chromium. | npx agent-qa install-browsers --chromium |
| Subscription not signed in | Sign in to "Anthropic subscription" for the "claude-code" config | npx agent-qa auth login --config claude-code |
| Subscription plugin missing | Plugin entry subscription names @vostride/agent-qa-subscription-auth, which is not installed. Run npx agent-qa plugins add @vostride/agent-qa-subscription-auth. | npx agent-qa plugins add @vostride/agent-qa-subscription-auth |
| No API key | Save an API key for the "anthropic" config | npx agent-qa auth set --config anthropic --type api-key |
| A config error | Config validation failed, then the key | Fix or remove that key, then run npx agent-qa validate. |
| A config from v0.2 | plugins.auth was removed: ... or another ... was removed: line | Do what the line says, or follow v0.2.x to v0.3.x. |
A leftover agent-qa.local.yaml | agent-qa.local.yaml is no longer read: ... | Describe devices under registry.devices, then delete the file. |
| A config from v0.1 | This config was written for agent-qa before v2. | Follow v0.1.x to v0.2.x. |