The command line and AI agents
You can do everything the interface does from the qcw command line, which connects to the same workbench service. Scripts and AI agents use it with --json, which makes each command print JSON.
Run one job and wait
Section titled “Run one job and wait”uv run qcw run examples/water-opt-freq.tomlThe command starts the service if it is not running, submits the job and waits for the result. Add --json to print the result as one JSON document.
Write an input file
Section titled “Write an input file”An input file is TOML. Each [[molecule]] block is one job, and the jobs of one file form a job set:
[calculation]task = "single-point"
[[molecule]]name = "methanol"smiles = "CO"
[[molecule]]name = "formaldehyde"smiles = "C=O"If a file names no method, its jobs use the default method, r2SCAN-3c, which stays provisional until a chemist collaborator reviews it. uv run qcw methods lists the methods and their defaults, with the source of each.
Submit a batch and follow it
Section titled “Submit a batch and follow it”-
Submit without waiting:
Terminal window uv run qcw submit batch.toml --project "First steps" --set-name "single points" --json--start-at 2026-12-01T20:00delays the start, for example to run overnight. -
List the jobs:
uv run qcw jobs list --project "First steps". -
Wait for them:
uv run qcw jobs wait <job id> <job id>. -
Read a result:
uv run qcw jobs result <job id>, adding--jsonfor JSON. -
Show the set:
uv run qcw sets show <set id>.
Exit codes
Section titled “Exit codes”Scripts can act on the exit code.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Internal error |
| 2 | Input or usage error |
| 3 | A job failed |
| 4 | Engine unavailable |
| 5 | Service unavailable |
| 6 | Timed out |
| 7 | Disk full |
| 8 | Settings file or keyring error |
| 130 | Interrupted |
With --json, an error prints a qcw.error.v1 document. uv run qcw schemas lists every published schema.
AI agents
Section titled “AI agents”An AI agent is a program, driven by a language model, that runs qcw commands for you.
- Have the agent read the guide written for it:
uv run qcw guide. - Give its jobs an actor label with
QCW_ACTOR=my-agentor--actor. The workbench saves the label with every job the agent submits. - Set approval limits on the Approvals page, for example the largest number of atoms allowed in one molecule. Jobs above a limit wait there until you approve them in the browser. The command line cannot approve jobs or change the limits.
A cloud-hosted agent sends the molecules and results it reads to its model provider. For unpublished or restricted work, use an agent that runs a local model.
Edit a structure from the command line
Section titled “Edit a structure from the command line”uv run qcw edit run methanol.xyz -c "distance 2, 6, 0.97" -c "pointgroup" --out methanol-edited.xyzuv run qcw edit commands lists the 3D editor’s commands, which work here as they do in the browser.
An open-source project on GitHub. Built by Graham Morley.