Skip to content
Docs
qmpass.ai Become a design partner
Reference

Agent commands

qmpass-agent commands, options, environment variables and exit codes.

qmpass-agent is the test agent’s command. To install one and connect it to a project, follow Agents; this page is the reference.

Terminal window
pipx install qmpass-test-agent
pipx upgrade qmpass-test-agent

Needs Python 3.10 or newer, and Node.js 18 or newer for browser runbooks. Add-ons are installed the same way, only if your runbooks use them: "qmpass-test-agent[postgres]", "qmpass-test-agent[mysql]" or "qmpass-test-agent[rpa]".

Command What it does
qmpass-agent setup One-time setup: installs the browser runbooks use.
qmpass-agent doctor Checks this machine, QMPASS_TOKEN and QMPASS_URL, that Qmpass.ai can be reached and that the token is accepted, with a fix for each problem. It doesn’t start a session, so it’s safe while an agent is running.
qmpass-agent run Connects to Qmpass.ai and runs the jobs it’s given until you stop it.
qmpass-agent version Prints the installed version. --version does the same.
qmpass-agent --help Lists every command.
Option Default
--worker N 1 How many jobs run at once, up to 5. Also --workers or --concurrency.

These go before the command, for example qmpass-agent --log-format json run.

Option Environment variable
--log-level QMPASS_AGENT_LOG_LEVEL DEBUG, INFO (default), WARNING or ERROR.
--log-file PATH QMPASS_AGENT_LOG_FILE Also write logs to a file, rotated at 10 MB, keeping 5.
--log-format QMPASS_AGENT_LOG_FORMAT text (default) or json, one object per line.
Variable
QMPASS_TOKEN The agent’s token, from Project settings › Qmpass.ai › Agents. Required.
QMPASS_URL Where the agent connects. Defaults to https://api.qmpass.ai; leave it unset.
QMPASS_AGENT_UPDATE_CHECK Set to 0 to stop the agent checking for a newer version at startup.

The agent never updates itself. When a newer version is out, run says so in one line at startup and doctor shows it.

The image runs qmpass-agent run. Pass the same environment variables:

Terminal window
docker run --rm -e QMPASS_TOKEN="qmp_agent_…" public.ecr.aws/qmpass/test-agent:1.0

The browser is built into the image, so there’s no setup step, and the update check is off: pull a newer image tag to update.

Code Meaning
0 Stopped normally.
2 Configuration error.
3 Refused by Qmpass.ai: an invalid or expired token, or the agent is disabled. The log says which.
4 The agent is too old. Run pipx upgrade qmpass-test-agent.
5 A prerequisite is missing, such as Node.js. Run qmpass-agent setup.