Getting started

First run — the control window

Launch PharmAutomate from the Start Menu. The control window is where an operator starts, stops, and tunes the agent on that machine.

Activating the device

If the device was never activated — or the key landed in another Windows profile — the identity panel shows dashes and a Note row reading "Update the API key.", and Start is disabled.

Click Update API Key, paste the sk-pharmalytics-… key, and click Save & Validate. The backend address is fixed and deliberately not editable.

If a device is started from the command line with no saved key, a separate activation window appears instead: heading "Activate this device", field DEVICE API KEY, buttons Activate and Cancel.

If activation fails

MessageWhat it meansWhat to do
"Invalid or inactive API key. Double-check you pasted the exact activation key for THIS device (it may have been rotated or belong to a different device)."Mistyped, rotated, or the device was deactivated.Copy it again from the portal, or rotate for a fresh key.
"This activation key is already in use on another computer. Each key works on ONE computer only. Ask your Skypond administrator to issue a new key for this computer."One key binds to one machine. Common after a VM is re-imaged or a workstation is swapped.Rotate API key on that device in the portal, then paste the new key here.
"Could not reach the backend at … Check the machine's internet connection."No internet, or HTTPS is blocked.Allow outbound HTTPS to *.pharmalytics.skypondtech.com.
"The backend returned a server error at … Try again shortly; if it persists the service may be down."Temporary service issue.Wait a minute and retry.

Status badge

BadgeMeaning
● StoppedIdle. Nothing runs until someone clicks Start.
● StartingPreflight checks in progress.
● RunningWorking the queue.
● StoppingFinishing the current document, then stopping.
● PausedAlive but blocked — most often QS1 is not open, sometimes the cloud is unreachable. It resumes on its own once the obstacle clears. Nothing processes meanwhile.
● ErrorHit a fault it could not recover from and stopped.
● Sleeping — next check Mon 08:00Queue was drained; it is waiting for the next scheduled check. This is normal and healthy.

Important: Paused is the state to know. It usually means someone closed QS1 or was signed out. The agent damages nothing and leaves the document untouched, but it processes nothing until a person signs back in. If alerts are configured you will be emailed about it.

Identity panel

Five rows. Check the first three match what you registered in the portal.

RowShows
DeviceThe Agent ID, e.g. counter-pc-01 (active)
OrgYour organisation
LocationThe branch this computer belongs to
ScheduleThe run windows currently in effect, synced from the portal — e.g. Cancel Rx: mon–fri 07:00–19:00, every 5 min. Reads local config when no schedule has been pulled yet.
NoteBlank normally; "Update the API key." when the stored key is not valid

The header also shows the running build version, e.g. v1.0.1.x.

Buttons

Left to right:

ButtonWhat it doesAvailable when
StartRuns preflight checks and starts working the queue. Also opens a live log window.Activated, and Stopped or Error
StopFinishes the current document, then stops.Running, Paused, Starting, or Sleeping
RefreshRe-pulls settings and schedules from the portal now.Activated
UpdateChecks for a newer agent build; reads Update to 1.0.2.0 when one is waiting, then downloads, verifies, installs, and offers to restart.Activated, and stopped
Update API KeyPaste a new activation key.Stopped or Error
SettingsOpens Worker Settings — see below.Stopped or Error
Match ThresholdPer-machine recognition tuning.Always
SpeedPer-machine pauses between actions.Always
WorkflowsPer-workflow folder and per-Start document limit.Always
Clear Auto-RunsRemoves leftover Windows scheduled tasks from older builds.Always
CloseCloses the window. Warns if the agent is still running.Always

Below the buttons, a single footer line reports the last thing that happened — Refreshing configs from server…, Configs refreshed at 14:02:11, Started agent — folder: Triage, workflows: …, and so on.

Note: There is no QS1 sign-in button. Automating the QS1 sign-on was tried and deliberately removed — a person signs in to QS1 and leaves it open.

The four settings dialogs

What v1.1 of this guide called "Settings" is now four separate dialogs.

Settings → Worker Settings

  • Enable full workflow (execute QS1 / submit; off = dry-run) — on by default.
  • Close DocuTrack when agent stops — off by default.
  • Enable scheduled worker — off by default, and inert in this build.
  • Applications — for DocuTrack and QS1/PrimeCare: window title, Exe path with a Browse… button, and a launch wait in seconds. Setting the exe paths lets the agent bring each application up if it is closed; it still cannot sign in for you, and it will never restart QS1.
  • Schedules (per workflow) — the same fields as the portal's Schedules page. Prefer editing schedules in the portal so every machine agrees.

Buttons: Save & Apply Schedule, Save, Cancel.

Note: Save & Apply Schedule behaves exactly like Save in this build, and tells you so: "Scheduled auto-runs are disabled in this build — the agent runs when you click Start, so no admin approval is needed." There is no second UAC prompt.

Saving writes to %USERPROFILE%\.pharmautomate\config.yaml, which is an overlay — see Files on the pharmacy PC.

Match Threshold

"Recognition tuning (per machine)". Lower a button's threshold if that button is reliably on screen but not being found. Blank means use the shipped default. Applies on the next Start.

Speed

"Pause between actions (seconds)" — pause after each click, after each key press, after each QS1 step, and a slow-motion multiplier. Use defaults resets them. Applies on the next Start.

Important: To slow the agent down for a demonstration, use Slow motion. Raising the individual pauses costs far more time per document than it looks.

Workflows

"Per-workflow folder + documents per Start" — a Default folder (blank = Triage), then a per-workflow Folder and Docs per Start override. 0 means unlimited; blank means use the configured default. Applies on the next Start.

Only one agent per machine

Two agents would share one mouse and keyboard, so a second launch refuses to start rather than interleave clicks: "PharmAutomate is already running on this desktop… Use the control window that is already open."