Skip to main content

Command Reference

This page documents every command in the container, listed alphabetically. If you have not run a test of your own yet, start with Write Your First Test — it walks through the commands you need in the order you need them.

Commands​

The container provides the following commands to help you run web tests.

CommandUsage
check-test-resultCheck test results
config-agentConfigure AI provider, browser permissions, and access to a test website deployed on the host machine
config-ai-providerApply an AI provider and model without interactive prompts
delete-builtin-skillsDelete built-in skill folders by name
delete-test-skillsDelete user-loaded skills by name or all
display-ai-configShow the effective AI provider, model, and token mode
display-test-skillsList installed skills or print a skill's SKILL.md
enable-test-on-hostEnable testing against a web app on the host machine
generate-rerun-configCompose a rerun-config.json document on stdout
get-failure-detailGet failure details
get-test-reportReport the full run and every rerun under it as one JSON document
load-test-skillsLoad a skill into the agent as a SKILL.md
manage-global-constantsManage global constants
manage-test-filesManage markdown test task files
output-context-variablesOutput user-scoped context values from the latest run
preset-contextManage preset context variables and test flow
rerun-testsReplay a subset of tasks from the last run's checkpoints
reset-test-configDelete test tasks and/or instruction files to reset state
run-qaRun QA tasks
set-domain-permissionSet the browser domain allowlist from a domain list
stop-qaStop current QA run
stop-rerunStop the current rerun, leaving a run-qa run alone
upload-instruction-fileUpload an instruction or config file into the agent
upload-test-taskUpload a markdown test task into the agent

Running the Commands​

Every command below runs inside the container. From your host machine, prepend docker exec -it waterwheel-agent:

Execute run-qa on host machine
docker exec -it waterwheel-agent run-qa

Each command's synopsis is shown in its in-container form (the signature), while the Examples are written as ready-to-paste docker exec commands.

Which docker exec flags to use
SituationFlagsExample
Normal command-itdocker exec -it waterwheel-agent run-qa
Piping content from the host into the container-i onlycat ./login.md | docker exec -i waterwheel-agent upload-test-task login.md
Passing an environment variable-e before the container namedocker exec -e SKILLS_DIR=/tmp/skills -it waterwheel-agent display-test-skills

Adding -t while piping from the host allocates a TTY, which corrupts the piped input. Use plain -i for the upload-* and load-test-skills commands.

Silence Docker CLI hint messages

Docker prints occasional hint messages above your command's output, which is noisy when you are reading test results or piping output into another tool. Set DOCKER_CLI_HINTS to false in the shell you run these commands from:

export DOCKER_CLI_HINTS=false

This lasts only for the current terminal session. To make it permanent, add the line to your shell profile (~/.zshrc, ~/.bashrc, or your PowerShell profile).

Using Docker Compose

If you brought the agent up with Docker Compose, replace docker exec ... waterwheel-agent with docker compose exec ... waterwheel-agent in every example. The command and its arguments are otherwise identical.

check-test-result Command​

since 1.1.0

check-test-result prints the overall outcome of the latest run, or reports the current run status if a test is still in progress. It is a helper command for code agent integration.

check-test-result [-r|--rerun [name]]

Options​

OptionDescription
-r, --rerun [name](1.5.0+) Read a rerun's results instead of the full run's. With no name, reads the most recent rerun
-h, --help, h, helpShow usage help

An unrecognized option is rejected with exit 1 rather than ignored, so a mistyped selector can never quietly print the full run's results in place of a rerun's.

Output​

ConditionOutput
run-qa or rerun-tests is currently activeA message indicating testing is in progress, naming the mode and the orchestrator PID
Test results existThe exit condition summarizing the run outcome
test-results.json missing, agent.log missingℹ️ No test results found.
test-results.json missing, agent.log existsℹ️ No test results found. followed by the full content of agent.log

With --rerun, every path above resolves inside the selected /agent/outputs/rerun-<name>/ folder, and the "no test results" case additionally prints the top-level /agent/outputs/agent.log. The folder being read is named on stderr, so stdout carries exactly what it does without the selector. See Reading rerun results.

Examples​

# Check results after a run
docker exec -it waterwheel-agent check-test-result

# Check the most recent rerun's results
docker exec -it waterwheel-agent check-test-result --rerun

# Check a named rerun's results
docker exec -it waterwheel-agent check-test-result --rerun "login flow"

config-agent Command​

since 1.1.0

The config-agent command allows users to configure the AI provider, browser permissions, and access to a test website deployed on the host machine.

config-agent

config-agent is interactive, so the -t flag is required:

docker exec -it waterwheel-agent config-agent

First Run (no mode configured)​

If no AI provider mode has been set yet, the script skips the main menu and goes directly into AI provider mode selection. The user must choose and confirm a mode before the main menu appears.

Returning Runs​

========================================
Waterwheel Agent Configuration
========================================

Select an item to configure:

1. AI provider mode [Anthropic Default Mode]
2. Config domain permissions
3. Test web app on host [disabled]
0. Exit

----------------------------------------
Choice:

The current state of option 1 (active mode name) and option 3 (enabled/disabled) is shown inline. Enter the number and press Enter.


Option 1 — AI Provider Mode​

Selects the AI provider and model the agent uses. The AI provider must match the provider of your AI API key. When no provider mode is configured, the script enters initial mode automatically. Once a provider mode is set, the menu only shows modes belonging to the same provider as the current mode. The Manual customized mode is not shown.

Option 2 — Config Domain Permissions​

This option allows users to configure the agent's domain access permissions. If the agent tries to access any URLs not whitelisted through domain permissions, the test fails immediately.

See the URL Permissions section for full details on configuring allowed domains.

Option 3 — Test Web App on Host​

If the website under test is hosted on your local machine, for example at http://localhost:8080, enable this option so the agent in the Docker container can interact with it.

config-ai-provider Command​

since 1.3.0

config-ai-provider applies an AI provider and model without the interactive prompts of config-agent. It is the scripting-friendly way to set up the AI provider, for example in CI or a one-off setup command.

config-ai-provider --provider <provider> --model <model> --mode <default|efficiency>

Options​

OptionDescription
--provider <value>AI provider to use (for example, anthropic or openai). Must match the provider of your AI API key
--model <value>Model name to use
--mode <value>default for the standard prompt mode, or efficiency for the token-efficiency mode

Behavior​

  • The provider must match the provider of your AI API key.
  • Provider locking applies: once a provider is configured, switching to a different provider requires a new container.
  • For provider-specific extras (such as a custom base URL or a localized system prompt), use the interactive config-agent command instead.

Examples​

# Apply Anthropic default mode with an explicit model
docker exec -it waterwheel-agent \
config-ai-provider --provider anthropic --model claude-sonnet-4-6 --mode default

# Apply OpenAI token-efficiency mode
docker exec -it waterwheel-agent \
config-ai-provider --provider openai --model gpt-5.4 --mode efficiency

delete-builtin-skills Command​

since 1.4.0

delete-builtin-skills removes built-in skill folders that ship with the image, under $AGENT_PATH/builtin-skills. It deletes a comma-delimited list of skill names (-n), removing each exactly-matched folder. Unlike delete-test-skills, there is no -a/--all option — built-in skills can only be removed by exact name. A leading ww: prefix on a name is ignored, so ww:foo targets the folder foo.

delete-builtin-skills -n <name1,name2,...>

Options​

OptionDescription
-n, --names <names>Comma-delimited built-in skill folder names to delete
-h, --help, h, helpShow usage help

Behavior​

  • -n is required; there is no bulk-delete option.
  • Built-in skills live at $AGENT_PATH/builtin-skills (this location is not configurable via $SKILLS_DIR).
  • A leading ww: prefix is stripped from each name before matching, so ww:foo and foo are equivalent.
  • Each name is trimmed of surrounding whitespace, so -n 'a, b' works as expected.
  • A matching folder <builtin-skills>/<name> is removed recursively; a name with no matching folder is reported and skipped (the command still exits 0).
  • Any name containing a path separator (or ./.., evaluated after the ww: prefix is stripped) is rejected and the command exits non-zero before deleting anything further.
  • On completion it prints a summary of how many skills were deleted and skipped.

Examples​

# Delete a single built-in skill
docker exec -it waterwheel-agent delete-builtin-skills -n login-flow

# Delete several built-in skills at once
docker exec -it waterwheel-agent delete-builtin-skills -n login-flow,checkout-flow

# A "ww:" prefix targets the unprefixed skill name
docker exec -it waterwheel-agent delete-builtin-skills -n ww:login-flow

delete-test-skills Command​

since 1.4.0

delete-test-skills removes skill folders that were loaded via load-test-skills. It either deletes a comma-delimited list of skill names (-n) or clears every user-defined skill (-a), removing each matching folder under the skills directory. The skills directory is $SKILLS_DIR when set, otherwise $AGENT_PATH/skills. Only user-loaded skills are affected — built-in skills under $AGENT_PATH/builtin-skills are never touched.

delete-test-skills -n <name1,name2,...>
delete-test-skills -a

Options​

OptionDescription
-n, --names <names>Comma-delimited skill folder names to delete
-a, --allDelete all user-defined skills under the skills directory (mutually exclusive with -n)
-h, --help, h, helpShow usage help

Behavior​

  • Exactly one of -n or -a is required; supplying both exits non-zero.
  • With -a, every immediate subfolder of the skills directory is deleted; if the directory is missing or empty, the command still exits 0.
  • Each name is trimmed of surrounding whitespace, so -names 'a, b' works as expected.
  • A matching folder <skills-dir>/<name> is removed recursively; a name with no matching folder is reported and skipped (the command still exits 0).
  • $SKILLS_DIR overrides the default $AGENT_PATH/skills location.
  • Any name containing a path separator (or ./..) is rejected and the command exits non-zero before deleting anything further.
  • On completion it prints a summary of how many skills were deleted and skipped.

Examples​

# Delete a single skill
docker exec -it waterwheel-agent delete-test-skills -n login-flow

# Delete several skills at once
docker exec -it waterwheel-agent delete-test-skills -n login-flow,checkout-flow

# Delete all user-defined skills
docker exec -it waterwheel-agent delete-test-skills -a

# Use a custom skills directory (pass the variable with docker exec -e)
docker exec -e SKILLS_DIR=/tmp/skills -it waterwheel-agent \
delete-test-skills -n login-flow

display-ai-config Command​

since 1.3.0

display-ai-config prints the effective AI runtime settings as JSON. Use it to confirm which provider, model, and token mode the agent will use before running tests.

display-ai-config

Output​

Returns a JSON object with exactly these keys:

KeyDescription
aiProviderThe active AI provider
aiModelThe active model
tokenModedefault for the standard prompt mode, or efficiency for the token-efficiency mode. Empty when not configured

Example​

docker exec -it waterwheel-agent display-ai-config

display-test-skills Command​

since 1.4.0

display-test-skills lists installed skills, or prints a single skill's SKILL.md. Skills are read from two locations: $AGENT_PATH/builtin-skills (shipped with the image) and the user skills directory — $SKILLS_DIR when set, otherwise $AGENT_PATH/skills (loaded via load-test-skills). Without arguments it lists every skill in both, tagging built-in skills with (built-in). With --show <skill-name> it prints that skill's SKILL.md, preferring a user skill over a built-in one of the same name, and prints No skill is matched. when neither exists.

display-test-skills [--show|-s <skill-name>]

Options​

OptionDescription
-s, --show <skill-name>Print the named skill's SKILL.md instead of listing
-h, --help, h, helpShow usage help

Behavior​

  • List mode enumerates skill folders under builtin-skills/ (marked (built-in)) then the user skills directory; if neither has any, it prints No skills installed..
  • Show mode looks up <skills-dir>/<name>/SKILL.md first, then builtin-skills/<name>/SKILL.md, so a user skill shadows a built-in of the same name.
  • $SKILLS_DIR overrides the default $AGENT_PATH/skills location for the user skills directory.
  • A skill name containing a path separator (or ./..) is rejected.
  • When the named skill is not found in either location, it prints No skill is matched. and exits 0.

Examples​

# List all installed skills (built-in and user)
docker exec -it waterwheel-agent display-test-skills

# Print a specific skill's SKILL.md
docker exec -it waterwheel-agent display-test-skills --show login-flow

# Short flag form of --show
docker exec -it waterwheel-agent display-test-skills -s login-flow

enable-test-on-host Command​

since 1.3.0

enable-test-on-host enables testing against a web app deployed on your host machine, mirroring the Test web app on host action in config-agent. Use it when the website under test is hosted on your local machine, for example at http://localhost:8080, so the agent inside the Docker container can reach it.

When enabled, the command:

  • Instructs the agent to rewrite localhost to host.docker.internal during test runs.
  • Rewrites localhost to host.docker.internal in your domain allowlist.
  • Rewrites every localhost value in your global constants to host.docker.internal.
enable-test-on-host

Behavior​

  • Re-running is idempotent: host testing is not enabled twice if it is already enabled.
  • The domain allowlist and global constants are only rewritten if they exist and contain localhost.

Example​

docker exec -it waterwheel-agent enable-test-on-host

generate-rerun-config Command​

since 1.5.0

Composes a rerun-config.json document and prints it to stdout. It writes nothing to disk — pipe it to upload-instruction-file to install it. It is the write-side counterpart to get-test-report --list-tests, which lists the task filenames a flow can hold.

generate-rerun-config [-ap <agent-path>] -f <task-file> [-f <task-file> ...]
[--name <rerun-name>] [--data KEY=value,...] [--data-file <path>]

stdout is always JSON and nothing else. Every diagnostic — errors, the duplicate-file warning, the existing-folder warning, and the resolved-folder notice — goes to stderr, so no diagnostic can corrupt a piped document.

Options​

OptionDescription
-f, --file <name>Task file to replay. Repeatable; the order given is the execution order. At least one is required
--name <rerun-name>Name the rerun, and with it its output folder. Omitted from the document when not given
--data KEY=value,...Context overrides merged into data. Repeatable. Dotted keys nest: user.name=Ada → {"user":{"name":"Ada"}}
--data-file <path>A JSON file whose top-level object is merged into data. Repeatable. Use it for values that are not strings
-ap <path>Override the agent path (default: /agent)
-h, --help, h, helpShow usage help

An unrecognized option is rejected with exit 1 rather than ignored, and a value-taking flag rejects a following flag (-f --name x) instead of swallowing it as its value.

name and data are omitted rather than emitted empty. Both are optional to the agent, and "data": {} would misrepresent a config that overrides nothing.

A pipe does not stop on failure — the upload does

On a validation error this command exits non-zero with empty stdout, but a pipeline reports its last command's exit status. upload-instruction-file therefore rejects empty stdin and leaves any existing file untouched, so a failed generation cannot blank a working config. The pipeline still reports the upload's status, so capture the document first when you want the generator's own — see the last example below.

Validation​

Every task filename is checked against /agent/tasks before anything is emitted. That is the point of the command: rerun-tests only pre-flights whether the config file exists, so an unknown file, an illegal name, or an occupied output folder otherwise surfaces from the agent after the virtual display and both MCP services have started.

ConditionstdoutExit
No -f given— (flow may not be empty)1
A -f value is not a file in /agent/tasks— (the error names it and lists the available files)1
A -f value contains /— (flow entries are matched by basename)1
--name is blank, or normalizes to empty or to a plain number— (mirrors the agent's own two rules)1
--data-file is missing, unparseable, or is not exactly one JSON object—1
A -f value is repeatedthe document, with the repeat kept0 (warning on stderr)
outputs/rerun-<normalized>/ already existsthe document0 (warning on stderr)
Otherwise{"name"?: …, "flow": [ … ], "data"?: { … }}0

A repeated -f is kept because replaying one task twice in a flow is legal; it warns because a repeat is more often a typo. An existing rerun folder is fatal to rerun-tests but only a warning here — you may be about to remove it, and this command's exit status does not depend on output state it does not own.

--name is normalized by the agent to form the folder name: lower-cased, whitespace runs collapsed to _, and every other character stripped. --name "Login Flow" writes "name": "Login Flow" — the raw value, verbatim — but produces /agent/outputs/rerun-login_flow/. Because that is lossy, the resolved folder is reported on stderr. A name that normalizes to nothing ("!!!") or to a plain number ("12", which would collide in form with the auto-numbered rerun-N scheme) is rejected here rather than by the agent. A name beginning with - cannot be passed at all, since every value-taking flag rejects a --prefixed value; write such a config by hand if you need one. See Reading rerun results for how the two forms are used afterwards.

data precedence​

Sources are applied in this order, so the command line wins over a file: every --data-file first, in the order given, then every --data. Repeating either flag accumulates, with later occurrences overriding earlier ones.

--data values are always strings. Use --data-file for numbers, booleans, arrays, or nested objects — data values are unvalidated by the agent, so any JSON is legal. Key parsing matches preset-context variables set exactly: case-sensitive, comma-delimited, values optionally double-quoted, dotted keys consolidated into nested objects.

--data-file paths are container paths

The file is read inside the container, not on your host. Push it in first — for example with upload-instruction-file overrides.json — and then point at /agent/instructions/overrides.json.

Examples​

The generator writes to stdout, so run it without -t; the upload reads stdin, so it takes -i only:

# Preview a minimal config without installing it
docker exec waterwheel-agent generate-rerun-config -f test-2.md

# Which task filenames are available for a flow
docker exec waterwheel-agent get-test-report --list-tests | jq -r '.[].file'

# Named rerun, two tasks in order, with a context override
docker exec waterwheel-agent generate-rerun-config -f test-2.md -f test-5.md \
--name "login flow" --data user_email=qa+rerun@example.com

# Generate and install in one pipeline, then replay
docker exec waterwheel-agent generate-rerun-config -f test-2.md -f test-5.md --name "login flow" | \
docker exec -i waterwheel-agent upload-instruction-file rerun-config.json
docker exec -it waterwheel-agent rerun-tests

# Capture first when you want the generator's own exit status
cfg=$(docker exec waterwheel-agent generate-rerun-config -f test-2.md --name nightly) \
&& printf '%s\n' "$cfg" | \
docker exec -i waterwheel-agent upload-instruction-file rerun-config.json

get-failure-detail Command​

since 1.1.0

When a test failure is reported by a previous run, this command prints a full diagnostic report for the first failed test found in $AGENT_PATH/outputs/test-results.json. If a test run is still in progress, it reports that instead. It is another helper command for code agent integration.

get-failure-detail [-d] [-r|--rerun [name]]

Options​

OptionDescription
-dInclude API log (/agent/outputs/api-log.json) at the end of the report if file exists
-r, --rerun [name](1.5.0+) Read a rerun's results instead of the full run's. With no name, reads the most recent rerun
-h, --help, h, helpShow usage help

An unrecognized option is rejected with exit 1 rather than ignored.

Output when a failed test is found​

Each section is printed in order. Missing files are reported inline and do not abort the output.

SectionSource
Failed Test SummaryThe failed test JSON object from test-results.json
Test Detail/agent/tasks/<test-file>
Test Steps/agent/outputs/<test-file-stem>_log.json
Test Context/agent/outputs/test-context.json
Agent Log/agent/outputs/agent.log
Pre-rerun Startup Log (only with --rerun, only if file exists)/agent/outputs/agent.log
API Log (only with -d, only if file exists)/agent/outputs/api-log.json

With --rerun, every /agent/outputs path above resolves inside the selected /agent/outputs/rerun-<name>/ folder instead — except Test Detail, which reads /agent/tasks/<test-file>: task files live outside outputs/ and are the same ones a rerun replays. See Reading rerun results.

Output when no failure​

ConditionOutput
run-qa or rerun-tests is currently activeA message indicating testing is in progress, naming the mode and the orchestrator PID
test-results.json missing, agent.log missingℹ️ No test results found.
test-results.json missing, agent.log existsℹ️ No test results found. followed by the full content of agent.log
Run did not complete⚠️ Run did not complete: followed by the exit condition
Test results exist, no failed tests✅ No failed tests found in test results.

Examples​

# Print the diagnostic report for the first failed test
docker exec -it waterwheel-agent get-failure-detail

# Include the API log in the report
docker exec -it waterwheel-agent get-failure-detail -d

# Print the report for a named rerun's first failure
docker exec -it waterwheel-agent get-failure-detail --rerun "login flow"

get-test-report Command​

since 1.5.0

Prints the full run's results together with every rerun's results as a single JSON document. The other reader commands each read one folder at a time, selected with --rerun; this one reads them all, so it is the command to reach for when a code agent needs the whole picture — or needs to discover which reruns exist at all.

get-test-report [--list-tests | --list-results]

stdout is always JSON and nothing else. Every diagnostic — the in-progress error, the not-available error, and per-rerun skip warnings — goes to stderr, so get-test-report | jq … and get-test-report > report.json are safe.

Options​

OptionDescription
--list-testsInstead of the full report, list only the name and file of each test in the run's results. Rerun folders are not read
--list-resultsInstead of the full report, list only test_name, test_type, status, and exit_condition for the run and for each rerun
-h, --help, h, helpShow usage help

--list-tests and --list-results are mutually exclusive; supplying both exits 1. Repeating the same flag is accepted. An unrecognized option is rejected with exit 1 rather than ignored.

Output​

{
"test_run": { "results": [ ... ], "status": "complete", "exit_condition": "1 test failed",
"test_type": "regular" },
"reruns": [
{ "name": "login_flow", "test_result": { ... } },
{ "name": "1", "test_result": { ... } }
]
}
ConditionstdoutExit
run-qa or rerun-tests is currently active— (message on stderr, naming the mode and PID)1
test-results.json missing, empty, or not exactly one JSON object— (ERROR: test report isn't available. on stderr)1
Results exist, no rerun folders{"test_run": …}, with no reruns key0
Results exist, reruns present{"test_run": …, "reruns": [ … ]}0
A rerun folder has no or unreadable resultsthat rerun is omitted, with a ⚠️ warning on stderr0

reruns is ordered oldest to newest by folder modification time, and is omitted entirely rather than emitted empty. Each name is the folder's basename without its rerun- prefix — exactly the value check-test-result --rerun accepts, which makes the report an index into the other readers. See Reading rerun results.

name is not test_name

The name this command reports is derived from the folder (rerun-login_flow → login_flow) and is what the --rerun selector takes. The test_name inside test-results.json is the rerun's human-readable identity: the raw, un-normalized name from rerun-config.json (login flow, space included), or the folder basename with its prefix (rerun-1) when the config supplied none. A full run has no test_name at all.

Simplified output​

Both flags exist so a code agent can assemble a rerun-config.json without parsing the full report.

--list-tests reads only the run's results. file is the field a rerun config needs — a flow entry accepts file and nothing else:

[
{ "name": "Test Wikipedia English Language Banner", "file": "test-wikipedia-english.md" },
{ "name": "Login flow", "file": "test-2.md" }
]

--list-results emits one object per run — the full run first, then each rerun oldest first — carrying only the four run-level fields. No results array from any run is included, and keys absent from the source stay absent rather than being emitted as null:

[
{ "status": "complete", "exit_condition": "1 test failed", "test_type": "regular" },
{ "status": "complete", "exit_condition": "all tests passed",
"test_type": "rerun", "test_name": "login flow" }
]

The status here is the run-level complete/incomplete, not a test's pass/fail — per-test status lives in the results array, which this mode never reads.

Examples​

# The full combined report
docker exec -it waterwheel-agent get-test-report

# Which reruns exist, by the name --rerun accepts
docker exec -it waterwheel-agent get-test-report | jq -r '.reruns[].name'

# The task filenames available for a rerun-config flow
docker exec -it waterwheel-agent get-test-report --list-tests | jq -r '.[].file'

# How the run and each rerun ended
docker exec -it waterwheel-agent get-test-report --list-results

# Save the report; warnings stay on stderr and out of the file
docker exec waterwheel-agent get-test-report > report.json

load-test-skills Command​

since 1.4.0

load-test-skills creates a skill folder named <skill-name> under the agent's skills directory and writes content read from stdin into a SKILL.md inside it. This lets you push a skill into the agent without editing files in place. An existing skill is left untouched unless you pass --force. For what belongs in a SKILL.md, see Create Test Skills.

load-test-skills -name <skill-name> [--force]

Behavior​

  • Content is read from stdin and written to the skill's SKILL.md.
  • A skill name containing a path separator (or ./..) is rejected.
  • An existing skill folder is skipped unless --force (-f) is given.
  • Missing parent directories are created automatically.

Examples​

Content is piped in from the host, so use docker exec -i without -t:

# Create a skill from a file on the host
cat ./SKILL.md | docker exec -i waterwheel-agent load-test-skills -name login-flow

# Overwrite an existing skill
cat ./SKILL.md | docker exec -i waterwheel-agent load-test-skills -name login-flow --force

# Write a skill inline without a local file
printf '# Login flow\n\nSteps...\n' | \
docker exec -i waterwheel-agent load-test-skills -name login-flow

manage-global-constants Command​

since 1.1.0

The manage-global-constants command provides a simple entry point to configure global context environment variables used by tests.

manage-global-constants <operation> [args]

Operations​

OperationArgumentsDescription
list—Display all current values, or a message if none are set
setKEY=value,...Set one or more key/value pairs (comma-delimited)
deleteKEY,...Delete one or more keys by name (comma-delimited)
clear—Delete the entire context file
help / h—Show usage

Examples​

# List all values
docker exec -it waterwheel-agent manage-global-constants list

# Set multiple values (quoted and unquoted)
docker exec -it waterwheel-agent manage-global-constants \
set BASE_URL="https://staging.example.com",TENANT=acme,SUPPORT_EMAIL=qa@example.com

# Set nested values with dotted keys
docker exec -it waterwheel-agent manage-global-constants \
set user.username=qa_user,user.password=secret

# Overwrite an existing key
docker exec -it waterwheel-agent manage-global-constants set TENANT=newcorp

# Delete specific keys (unknown keys produce a warning, known keys are still deleted)
docker exec -it waterwheel-agent manage-global-constants delete BASE_URL,TENANT

# Remove all values (also deletes the file)
docker exec -it waterwheel-agent manage-global-constants clear
Operation Rules
  • Key names are case-sensitive. We recommend using uppercase names.
  • Values may be quoted or unquoted.
  • Dotted keys create nested objects (for example, user.username=qa_user becomes { "user": { "username": "qa_user" } }).
  • Unknown key names in delete print a warning but do not cause an error; any found keys are still deleted.

manage-test-files Command​

since 1.2.0

The manage-test-files command manages the markdown test task files the agent runs. Use it to add, list, and remove .md task files without copying files into the container by hand.

manage-test-files <operation> [args]

Operations​

OperationArgumentsDescription
list—List .md task files with 1-based indexes
addpath1,path2,...Add markdown files from file paths and direct directory children; non-markdown files are ignored
deleteselector1,selector2,...Delete by 1-based index or exact filename (basename only), best effort
clear—Delete all markdown test files
help / h—Show usage

Examples​

# List current markdown test files
docker exec -it waterwheel-agent manage-test-files list

# Delete by index
docker exec -it waterwheel-agent manage-test-files delete 1,3

# Delete by filename and index in one call
docker exec -it waterwheel-agent manage-test-files delete login-flow.md,2

# Clear all markdown test files
docker exec -it waterwheel-agent manage-test-files clear

The add operation resolves its paths inside the container, so it is only useful when the files are already there — for example under a volume you mounted with Docker Compose:

# Add two markdown files that exist inside the container
docker exec -it waterwheel-agent \
manage-test-files add /agent/import/test-a.md,/agent/import/test-b.md

# Add all direct markdown files from a container directory (subdirectories are ignored)
docker exec -it waterwheel-agent manage-test-files add /agent/import
Adding a task from the host

If you started the container without volume mounts, add cannot see your host files. Pipe the task in with upload-test-task instead:

cat ./test-a.md | docker exec -i waterwheel-agent upload-test-task test-a.md
Operation Rules
  • Only .md files are listed and managed.
  • add overwrites an existing file with the same destination name silently.
  • Directory import includes only direct child files, not subdirectories.
  • delete is best effort: invalid selectors print warnings while valid selectors are still deleted.
  • Source paths passed to add are resolved inside the container, not on the host machine. Make sure the files are reachable inside the container (for example, under a mounted volume) before referencing them, or use upload-test-task to push a file in from the host.

output-context-variables Command​

since 1.3.0

output-context-variables prints context values produced by the latest run as a flat JSON object. Tests store values such as AI-generated usernames and passwords in /agent/outputs/test-context.json; this command extracts those entries so you can reuse them outside the container (for example, to log in with a freshly registered account).

output-context-variables [-r|--rerun [name]]

Options​

OptionDescription
-r, --rerun [name](1.5.0+) Read a rerun's context instead of the full run's. With no name, reads the most recent rerun
-h, --help, h, helpShow usage help

An unrecognized option is rejected with exit 1 rather than ignored. With --rerun, the folder being read is named on stderr only, so stdout stays pure JSON — see Reading rerun results.

Errors​

ConditionResult
run-qa or rerun-tests is currently activePrints an error that exporting context variables while testing is in progress isn't supported, and exits non-zero
test-context.json is missingPrints an error that no test-context.json was found, and exits non-zero

Examples​

# Context values from the latest full run
docker exec -it waterwheel-agent output-context-variables

# Context values from the most recent rerun
docker exec -it waterwheel-agent output-context-variables --rerun

It prints:

{
"testuser": {
"username": "test.user21",
"password": "123456789Ab#",
"email": "test.user21@enduser1.com"
},
"tag": "news"
}

preset-context Command​

since 1.2.0

The preset-context command configures preset context, which supplies per-run variable overrides on top of the global context and controls the test flow. It exposes two mutually exclusive families:

  • variables manages the seed values used before any task runs.
  • flow lists, imports, or clears the test execution flow (the order and dependencies between tasks).

A single command call may use only one family. Mixed invocations are rejected.

preset-context <family> [args]

variables Operations​

OperationArgumentsDescription
list—Display all current values, or a message if none are set
setkey=value,...Set one or more key/value pairs (comma-delimited)
deletekey,...Delete one or more keys by name (supports dotted paths)
clear—Clear all preset values; the flow is preserved
help / h—Show usage

flow Usage​

ArgumentsDescription
listDisplay the current flow entries, or a message if none are set
flow.jsonImport a JSON file whose top-level object contains a flow array; other properties are ignored and the existing flow is replaced
clearClear the existing flow; preset values are preserved

See the Define Test Flow section for full details on authoring the flow file.

Examples​

# List all preset values
docker exec -it waterwheel-agent preset-context variables list

# Set preset overrides
docker exec -it waterwheel-agent preset-context variables \
set username=admin,password=123456789

# Set nested values with dotted keys
docker exec -it waterwheel-agent preset-context variables \
set user.username=admin,user.password=123456789

# Remove keys (supports dotted keys)
docker exec -it waterwheel-agent preset-context variables \
delete username,user.password

# Clear preset values (flow is preserved)
docker exec -it waterwheel-agent preset-context variables clear

# Import the test flow from a JSON file inside the container
docker exec -it waterwheel-agent preset-context flow /agent/import/preset-flow.json

# Clear the flow (preset values are preserved)
docker exec -it waterwheel-agent preset-context flow clear

# List current flow entries
docker exec -it waterwheel-agent preset-context flow list
Importing a flow file from the host

preset-context flow <file> resolves its path inside the container. Without a mounted volume, push the file in first with upload-instruction-file, then import it:

cat ./preset-flow.json | \
docker exec -i waterwheel-agent upload-instruction-file preset-flow.json
docker exec -it waterwheel-agent preset-context flow /agent/instructions/preset-flow.json
Operation Rules
  • Key names are case-sensitive. We recommend using lowercase or camelCase names.
  • Values may be quoted or unquoted.
  • Dotted keys create nested objects (for example, user.username=admin becomes { "user": { "username": "admin" } }).
  • variables and flow are mutually exclusive in a single call.
  • flow list displays the entries currently stored in preset-context.json; if none are set, a message is shown.
  • When importing a flow file, the JSON must contain a top-level flow array; extra properties are ignored.
  • The flow file path is resolved inside the container, not on the host machine. Make sure the file is reachable from a mapped volume (for example, under /agent) before referencing it.
  • Unknown key names in delete print a warning but do not cause an error; any found keys are still deleted.

rerun-tests Command​

since 1.5.0

rerun-tests replays a chosen subset of tasks instead of the whole suite. It starts the same services as run-qa, then restores the context captured during the most recent full run and runs the selected tasks against it. That is what makes a partial run possible: a task that depends on an account registered earlier in the suite can be replayed on its own, without re-running the tests that produced the account.

rerun-tests

It takes no options.

Prerequisites​

  1. A completed run-qa run. Every full run writes a context checkpoint to /agent/outputs/checkpoints/<taskId>.json immediately before each task executes, and its test-results.json records the order the tasks actually ran in. A rerun reads both, so it is only meaningful after a full run has produced them.
  2. A rerun config file at rerun-config.json naming the task files to replay, in execution order. rerun-tests exits 1 before starting any service if the file is missing.

Upload the config with upload-instruction-file:

printf '{"name":"login flow","flow":[{"file":"test-2.md"},{"file":"test-5.md"}]}' | \
docker exec -i waterwheel-agent upload-instruction-file rerun-config.json

Or let generate-rerun-config compose the document for you. It checks every task filename against /agent/tasks and applies the agent's own name rules before emitting anything, so a mistake fails there rather than after rerun-tests has started the display and the MCP services:

docker exec waterwheel-agent generate-rerun-config -f test-2.md -f test-5.md --name "login flow" | \
docker exec -i waterwheel-agent upload-instruction-file rerun-config.json
PropertyRequiredDescription
flowyesThe task files to replay, in execution order
namenoNames the output folder — results land in /agent/outputs/rerun-<name>/. Without it the folder is auto-numbered rerun-N
datanoContext values that override the ones restored from the checkpoint

The config location comes from the RERUN_CONFIG_PATH agent parameter: the process environment first, then the default in /agent/config/agent-config.json, and finally ./instructions/rerun-config.json. Relative paths resolve against /agent.

How the context is seeded​

A rerun restores context once, from a single checkpoint — not once per task. The seed is the checkpoint of whichever selected task ran earliest in the original full run, which is read from that run's test-results.json, not from the order of your flow array. Your flow order controls only this rerun's execution order; it never changes which checkpoint seeds it.

From there the rerun behaves like a normal run: the tasks execute in flow order, each one continuing from the context the previous one left behind. So a two-task rerun starts the first task from the seed state and the second from whatever the first produced — it does not re-seed in between.

Three consequences worth knowing:

  • A checkpoint is the state before its task ran, so seeding from task A's checkpoint replays A from the same starting point the full run gave it.
  • Only user.* context values are checkpointed (ephemeral ones included). Run-scoped values are not, and are re-established by the rerun itself.
  • data overrides are applied after the restore, so a value in rerun-config.json always wins over the checkpointed one.
Two tasks a rerun cannot replay

A task that is absent from the last full run's test-results.json — one added since that run — aborts the rerun: there is no way to know where it would have fallen in the order. And a task that was skipped or aborted in that run never executed, so it has no checkpoint file; if it is the earliest selected task, the rerun fails when the restore cannot find it. In both cases the fix is a fresh run-qa.

Output handling​

Unlike run-qa, rerun-tests never clears /agent/outputs — that is where it reads the checkpoints and the previous run's results from. Each invocation writes to its own /agent/outputs/rerun-<name>/ subfolder and leaves the original run's results untouched.

The next full run clears the reruns too

run-qa wipes /agent/outputs as its first step, removing both the checkpoints and every rerun-* folder. Checkpoints only ever belong to the most recent full run.

Reading rerun results​

A rerun folder holds the same files as a full run's /agent/outputs — test-results.json, test-context.json, agent.log, api-log.json, and the per-test <test-name>_log.json — written by the same agent code in the same format. Only checkpoints/ is absent. So the three reader commands read a rerun through a -r / --rerun selector rather than through separate commands:

InvocationReads
check-test-result/agent/outputs/ — the full run, unchanged
check-test-result --rerunthe most recently modified /agent/outputs/rerun-*/
check-test-result --rerun "login flow"/agent/outputs/rerun-login_flow/

The same selector works on get-failure-detail and output-context-variables.

To read the full run and every rerun at once instead of selecting one, use get-test-report, which emits them as a single JSON document and keys each rerun by the name this selector accepts. It is also the only way to discover which reruns exist without listing the output folder yourself.

Names are normalized the way the agent normalizes them when it creates the folder: lower-cased, whitespace runs collapsed to a single _, and every other character stripped. So "login flow", "Login Flow", and login_flow all select rerun-login_flow. Underscores you type are preserved — login__flow selects rerun-login__flow, a different folder.

You can also paste a folder name straight from a directory listing: if rerun-<name> does not exist and <name> itself begins with rerun-, that prefix is dropped and the lookup retried. This is strictly a fallback — the literal name always wins, so a rerun genuinely named rerun-login_flow (folder rerun-rerun-login_flow) is never shadowed by an unrelated rerun named login flow.

The most recent rerun is chosen by modification time, not by number. An auto-numbered suffix is the lowest free integer rather than a sequence — deleting rerun-2 makes the next unnamed rerun reuse it — and named folders carry no number at all.

If the requested folder does not exist (or no rerun-* folder exists at all), the command exits non-zero and says so. It deliberately does not fall back to /agent/outputs: reporting the full run's result as though it were the rerun's is the failure this selector exists to remove.

Two caveats worth knowing
  1. A rerun that fails before running any task writes no test-results.json at all. A full run records an incomplete result in that case; a rerun does not. So --rerun with no name can resolve to an older rerun folder and report its result as current. If you have just run rerun-tests and the output looks stale, check the timestamps under /agent/outputs. To remove the ambiguity, give each rerun a name in rerun-config.json and select it explicitly.
  2. A rerun's agent.log is split across two folders. The rerun redirects its logger only after loading config and skills, so those startup lines land in the top-level /agent/outputs/agent.log. check-test-result --rerun (when no results file is found) and get-failure-detail --rerun therefore also print that file, labeled as pre-rerun startup output — it is where an early rerun failure is actually recorded.

Relationship to run-qa​

rerun-tests and run-qa share one single-instance lock and one session record, because both drive the same virtual display and the same MCP services. They can never run at the same time: whichever starts second exits and names the stop command for the session that is already active — stop-qa or stop-rerun.

Examples​

# 1. A full run first, to produce the checkpoints
docker exec -it waterwheel-agent run-qa

# 2. Name the tasks to replay
printf '{"name":"login flow","flow":[{"file":"test-2.md"}]}' | \
docker exec -i waterwheel-agent upload-instruction-file rerun-config.json

# 3. Replay them — results land in /agent/outputs/rerun-login_flow/
docker exec -it waterwheel-agent rerun-tests

# 4. Read the rerun's results
docker exec -it waterwheel-agent check-test-result --rerun "login flow"

# If a previous rerun session is still active, stop it first
docker exec -it waterwheel-agent stop-rerun
docker exec -it waterwheel-agent rerun-tests

reset-test-config Command​

since 1.3.0

reset-test-config deletes test task files and/or instruction files to return the agent to a clean state.

reset-test-config [-t] [-i]

Options​

OptionDescription
-tDelete all markdown test task files
-iDelete all instruction files except email-permissions.yaml

Behavior​

  • When neither -t nor -i is provided, both operations are performed.
  • email-permissions.yaml is always preserved when resetting instructions.
  • Resetting instructions also turns off host testing, keeping the agent's reported state consistent.
  • Missing directories are reported but do not cause an error.

Examples​

# Reset both tasks and instructions
docker exec -it waterwheel-agent reset-test-config

# Reset task files only
docker exec -it waterwheel-agent reset-test-config -t

# Reset instruction files only
docker exec -it waterwheel-agent reset-test-config -i

run-qa Command​

since 1.0.0

run-qa executes all tests found under the /agent/tasks folder. It performs the following steps in order:

  1. Clear outputs from any previous run
  2. Restart the preinstalled MCP servers and reload any changed permissions
  3. Start the AI agent to run tests and write results
run-qa

Only one run-qa process can run at a time, and it shares that single-instance lock with rerun-tests. If either is already active, the command exits and names the stop command for that session — stop-qa or stop-rerun.

From the host
docker exec -it waterwheel-agent run-qa

Dry Run Mode​

run-qa supports a --dry-run flag to help identify configuration issues without making any API calls.

docker exec -it waterwheel-agent run-qa --dry-run

In dry run mode, the command performs the following steps in order:

  1. Clear outputs from any previous run
  2. Restart the preinstalled MCP servers and reload any changed permissions
  3. Start the AI agent to record the active configuration and prompts
  4. Parse all test files under /agent/tasks and build a test plan

Where the dry run results go​

Only the orchestrator's progress lines are printed to the terminal, ending with 🧪 Dry-run mode enabled. The configuration, prompts, and test summary are written to files, not to stdout:

OutputLocationContents
Configuration and prompts/agent/outputs/agent.logThe full system prompt and agent instructions the run would use, the resolved global variables, and a [DryRun] N task(s) discovered. line
Test plan/agent/outputs/test-plan.jsonOne entry per discovered task — its name, source file, id, and a status of queued

Read them after the dry run completes:

# The parsed test plan
docker exec -it waterwheel-agent cat /agent/outputs/test-plan.json

# The task count the agent discovered
docker exec -it waterwheel-agent grep DryRun /agent/outputs/agent.log
test-plan.json
{
"results": [
{
"name": "Test Wikipedia English Language Banner",
"file": "test-wikipedia-english.md",
"id": "3",
"status": "queued"
}
],
"generated_at": "2026-07-29T07:26:20.005Z"
}
Each run clears the previous outputs

Step 1 wipes /agent/outputs, so test-plan.json from a dry run is removed the next time you call run-qa. Read it before starting the real run.

Inputs​

The agent requires at least one test file under /agent/tasks. All test files must be text files with the .md extension.

Sample Test Task
1. Navigate to https://www.wikipedia.org
2. Click the English language link on the Wikipedia main page.
3. Confirm the banner text "Welcome to Wikipedia" is displayed on the English Wikipedia homepage.

See the Manage Test Tasks section for full details on authoring test files.

Only file extension matters

There is no required Markdown format for test file structure. Tasks are executed as long as the file extension is .md.

Outputs​

After each run, the agent writes the following files to /agent/outputs.

FileDescription
agent.logAI agent execution log
api-log.jsonLLM API call records and token usage. Only written when ENABLE_API_LOGGING is true
test-results.jsonSummary of all test results for the run
test-context.jsonAll context values stored at the end of the run, such as AI-generated usernames and passwords
<test-name>_log.jsonPer-test step log recording all AI-decided steps and tool calls
<test-name>_audit.jsonPer-test audit log recording the tool calls the AI actually performed
checkpoints/<task-id>.jsonPer-task context checkpoint, used to seed a rerun
playwright.logPlaywright MCP stdout log
playwright.errPlaywright MCP stderr log
firewall.logPlaywright firewall log. Only written when FIREWALL_DEBUG is true
email-mcp.logEmail MCP stdout log
email-mcp.errEmail MCP stderr log

set-domain-permission Command​

since 1.3.0

set-domain-permission generates the browser domain allowlist from a comma-delimited list of domains. The agent can only navigate to whitelisted domains; if it tries to reach any other URL, the test fails immediately. This is the scripting-friendly alternative to configuring domain permissions through config-agent.

set-domain-permission [-l] <domain1,domain2,...>

Options​

OptionDescription
-lRewrite every localhost in the domains to host.docker.internal, useful when targeting a local dev server from inside Docker

Behavior​

  • Domains are separated by commas. Quote any entry containing shell-special characters, for example "https://*.wikipedia.org".
  • Leading and trailing whitespace around each entry is trimmed.
  • Empty entries are ignored.
  • The allowlist is overwritten on each run.

Examples​

# Set the allowlist from a list of domains
docker exec -it waterwheel-agent set-domain-permission \
https://www.google.com,"https://*.wikipedia.org","http://localhost:8080"

# Rewrite localhost to host.docker.internal with -l
docker exec -it waterwheel-agent set-domain-permission \
-l "http://localhost:8080","http://localhost:8025"
Quoting

The quotes are consumed by your host shell before the argument reaches the container. Keep any entry containing *, ?, or other shell-special characters quoted, exactly as shown above.

See the URL Permissions section for full details on configuring allowed domains.

stop-qa Command​

since 1.1.0

stop-qa stops the currently tracked orchestrator process tree, including the launched agent subprocess, if one exists. Because only one orchestrator can run in a container, stop-qa is the universal stopper: it ends a run-qa session or a rerun-tests session, whichever is active. It is also the only command that clears a stale lock left behind by an orphaned process.

Each recorded process ID is validated against its start time first, so a stale record is discarded rather than acted on.

stop-qa

To stop only a rerun — and be told to leave a run-qa session alone — use stop-rerun.

Example​

docker exec -it waterwheel-agent stop-qa

stop-rerun Command​

since 1.5.0

stop-rerun stops an active rerun-tests session. It is scoped to reruns on purpose: because run-qa and rerun-tests share one session record, this command checks the mode recorded in it and refuses to terminate a run-qa session.

stop-rerun
SituationBehaviorExit code
A rerun-tests session is activeStops the agent process tree, then the orchestrator, and clears the session record0
A run-qa session is activeStops nothing; reports the active session and points at stop-qa1
The record is staleStops nothing; reports the record as stale, discards it, and points at stop-qa0
Nothing is trackedReports that no rerun was found, and points at stop-qa for stale-lock recovery0

A session whose recorded mode is missing or unrecognized is treated as run-qa, so stop-rerun never terminates a process tree it cannot positively identify as a rerun. It also does not duplicate stop-qa's orphaned-lock recovery: a lock with no session record carries no mode information, so that recovery lives only in stop-qa.

Examples​

# Stop the current rerun session, if any
docker exec -it waterwheel-agent stop-rerun

# Restart a rerun from scratch
docker exec -it waterwheel-agent stop-rerun
docker exec -it waterwheel-agent rerun-tests

upload-instruction-file Command​

since 1.3.0

upload-instruction-file creates or replaces an instruction or config file (for example allowed-domains.yaml, email-permissions.yaml, or extra-instructions.md) using content read from stdin. This lets you push instruction files into the agent without editing files in place.

upload-instruction-file [--allow-empty] <filename>

Behavior​

  • Content is read from stdin and written to the named instruction file.
  • Missing parent directories are created automatically, and are removed again if the upload is rejected.
  • An existing file is replaced, and a warning is printed when it is.
  • Empty stdin is rejected and any existing file is left untouched, so a producing command that failed earlier in a pipe cannot silently blank a working file. Pass --allow-empty to write a zero-byte file deliberately.

Examples​

Content is piped in from the host, so use docker exec -i without -t:

# Create or replace allowed-domains.yaml from stdin
printf 'allowed:\n - http://host.docker.internal:8080\n' | \
docker exec -i waterwheel-agent upload-instruction-file allowed-domains.yaml

# Pipe a local file into the instructions folder
cat ./extra-instructions.md | \
docker exec -i waterwheel-agent upload-instruction-file extra-instructions.md

upload-test-task Command​

since 1.3.0

upload-test-task creates or replaces a markdown test task using content read from stdin. Only markdown files are accepted — the filename must end with .md.

upload-test-task <filename.md>

Behavior​

  • Content is read from stdin and written to the named task file.
  • The filename must end with .md, otherwise the command fails.
  • Missing parent directories are created automatically.
  • An existing file is replaced, and a warning is printed when it is.

Examples​

Content is piped in from the host, so use docker exec -i without -t:

# Create or replace a test task from stdin
printf '# Login test\n' | docker exec -i waterwheel-agent upload-test-task login.md

# Pipe a local file into the tasks folder
cat ./checkout.md | docker exec -i waterwheel-agent upload-test-task checkout.md

# Confirm the agent picked it up
docker exec -it waterwheel-agent manage-test-files list