Cloudverg Console
PricingDocsSign in
Docs menu

VergAI

How VergAI Command keeps work moving

Command is the part of VergAI that drives work rather than watching products. It keeps a board of tasks, runs each as an ordered list of steps called a runbook, decides what to start with rules, and hands each step to a runner, a small program on a machine you control. Every built-in pipeline, test, build, deploy, verify, rollback and health, needs no AI at all. When AI credit is gone, the work still moves.

It all lives inside the console, so it uses the same issues, approvals, limits, verify and audit that VergAI already keeps. None of it is a second product to run.

The work board

Every unit of work is one task. A task moves through planned, queued, running, then one of done, failed, cancelled or skipped. A task can also wait for a person (waiting_owner), for an approval (waiting_approval) or for AI credit (waiting_ai). Each has a priority, a time it may start after, an optional dependency on another task and an optional dedupe key, which keeps one open task per key.

The board shows four groups. Now is what runs at this moment, with the step it is on. Next is queued work, each line saying what it waits for or when it starts. Waiting on you is tasks that need a person, with their steps written out in words. Recent is the last 20 finished tasks with their outcome. A strip at the bottom shows the runners, whether each is online and what it can run.

Delivery numbers

The work board measures delivery from the tasks themselves, not from a survey or an estimate. A deploy is a finished task of the ship or site-ship runbook. The success rate is finished deploys divided by finished and failed deploys. Lead time is finished minus created for a finished deploy, shown as the median and the worst in the window. A recovery is the first finished deploy after a failed one of the same runbook, and the same site for site-ship; recovery time runs from the failure to that finished deploy. The 7-day bar shows finished deploys in grey and failed ones in the warning colour. Every number comes from rows on the board, so a quiet week shows small numbers rather than a guess.

Incidents

A failed ship or site-ship task opens a VergMind incident at warning level, so it is recorded and shown without paging anyone at night. The incident names the failed step, its exit code and the first line of its output. When the same task is tried again and finishes, the incident closes with the task id. If VergMind has a problem, Command carries on: a mind problem never blocks a task.

Runbooks

A runbook is an ordered list of steps. Each step has an id and a named action, which is a name a runner advertises in its own local config, never a shell string. A step may also set params, runner_labels, timeout_sec, retries, a when condition and what happens next.

  • on_ok and on_fail name the next step id, done, fail, or runbook:key to chain another runbook. A step may only point at a step after it, so a runbook always ends.
  • Retries wait 30 seconds, then double each time, up to 30 minutes. A refused step is never retried.
  • Exit code 78 from a step means nothing needed doing. The task ends as skipped, cleanly, and is not treated as a failure. Use it when a check finds nothing to change.
  • A fallback runbook is what a task that needs AI switches to when AI credit runs out.
{
  "key": "ship",
  "title": "Ship the console",
  "text": "Test, build and deploy the release, then check it is healthy. Any failure rolls back.",
  "steps": [
    { "id": "test", "action": "repo.test", "params": { "repo": "{{repo}}" }, "runner_labels": ["mac"], "timeout_sec": 900 },
    { "id": "build", "action": "repo.build", "on_fail": "rollback" },
    { "id": "deploy", "action": "repo.deploy", "on_fail": "rollback" },
    { "id": "health", "action": "site.health", "on_ok": "done", "on_fail": "rollback" },
    { "id": "rollback", "action": "repo.rollback" }
  ],
  "fallback_runbook": "rollback"
}

Rules

A rule says: if this happens and that is true, then do this, else do that. A rule has a trigger, an optional condition, a then action, an optional else action and a cooldown. Events are written to a fact log by the engine, by VergAI issues and by outside senders such as a git push hook or a CI job.

A trigger is an event type such as task.failed, task.done, step.failed, runner.offline, ai.credit.out, ai.credit.ok, vergai.issue.opened or external.*, or a schedule written cron:minute hour day month weekday. A condition is JSON Logic over the facts, evaluated with no eval and a fixed list of operators. Its facts are the event, the task (result, attempts, runbook), AI credit (ok, low or out), the time (hour and weekday) in the workspace time zone, the counts of queued, running and failed-in-24-hours tasks, and the runners online by label.

A step parameter is a plain value or {{name}}, taken from the task. {{name|fallback}} uses the fallback when the task gives no value, so a runbook can be run by hand without every parameter filled in. A whole-value {{name}} keeps its type; inside a longer string it is written as text.

A then or else action is one of: run a runbook (enqueue), tell the owner (notify), hand a task to a person with steps (handover), cancel the tasks with a dedupe key (cancel), try a task again (retry), or nothing. The cooldown is how long the rule waits before it may fire again.

The cooldown and the conditions keep a busy fact log from starting the same work twice. A rule that does not fire writes nothing; a rule that fires is in the audit log like everything else.

Three example rules

A deploy fails, so roll back and tell the owner. One rule starts the rollback when a ship task fails. A second rule tells the owner when the rollback finishes.

{
  "name": "Deploy failed, roll back",
  "trigger": "task.failed",
  "condition": { "==": [ { "var": "task.runbook" }, "ship" ] },
  "then": { "do": "enqueue", "runbook": "rollback" },
  "else": { "do": "nothing" },
  "cooldown_sec": 300
}
{
  "name": "A rollback finished, tell the owner",
  "trigger": "task.done",
  "condition": { "==": [ { "var": "task.runbook" }, "rollback" ] },
  "then": { "do": "notify", "text": "The rollback finished. Check the site before the next deploy." },
  "cooldown_sec": 300
}

A runner goes offline. Tell the owner, once every half hour, so deploy steps are not left waiting silently.

{
  "name": "Runner offline",
  "trigger": "runner.offline",
  "condition": { "==": [ { "var": "event.data.name" }, "mac" ] },
  "then": { "do": "notify", "text": "The Mac runner is offline, so deploy steps wait." },
  "cooldown_sec": 1800
}

A morning fleet check at 09:00. The schedule is read in the workspace time zone. The check runbook ends each step with exit code 78 when nothing is wrong, so the task ends skipped and no one is told. A failure raises task.failed, which a rule turns into a notice.

{
  "name": "Morning fleet check",
  "trigger": "cron:0 9 * * *",
  "condition": true,
  "then": { "do": "enqueue", "runbook": "fleet.check" },
  "else": { "do": "nothing" }
}

AI credit and why Command does not depend on it

Command computes the AI credit state every tick: ok, low or out. The board shows a banner when it is low or out. A task with needs=ai runs only while credit is ok. When credit runs out, each such task switches to its fallback runbook if it has one, or becomes waiting_owner with its steps written out. The ai.credit.out and ai.credit.ok events let rules react too.

Every built-in pipeline needs no AI, so test, build, deploy, verify, rollback and health keep running at full speed with no credit at all. AI is optional help on top, never a dependency.

The safety model

The console never sends a shell command. It asks a runner for a named action. The runner runs only the actions written in its own local config file, takes parameters as environment variables rather than a shell string, and checks every parameter against its own anchored regular expressions before it runs anything. A stolen console session can at most request an action the machine owner already allowed.

What a step may do is decided on the machine, not in the console. Adding a new action means editing the runner's own config and restarting it, which no console session can do.

What "verified" checks

A site deploy ends with two checks. The first asks the public page for a 200. The second, the deep check, runs from the apps VM and asks the home page, the sitemap and robots.txt to answer, and reads the page for a title and a canonical link and parses any JSON-LD. A dash inside member written text is reported as a warning, because those words belong to the member and are not rewritten.

Machines can report what happened

A runner can post a fact for its own workspace with its own token, so a git push hook, a build or a CI job can tell the board what happened without a person, an API key or an AI. Send POST /v1/ai/command/runner/events with Authorization: Bearer vcr_... and a body of {"type":"external.ship","subject":"<commit>","data":{"gate":"green","sha":"<commit>"}}. The type must start with external., and the data is kept at 8 KB or less.

With a rule on external.ship where gate is green, a green commit turns into a ship task by itself: the board gates, deploys and verifies it, and rolls back when a step fails. That is the whole pipeline with no AI and no person.

Runners

A runner is a zero-dependency Node 22 script, runner/verg-command-runner.mjs. It long-polls the console with its token, advertises the action names and labels in its config, heartbeats while a step runs, and posts back the exit code and a redacted tail of the output. Secrets that look like keys, tokens or passwords are hidden from the output before it is kept.

When you add a runner on the Runners page, the console shows its token once and the install line:

VC_TOKEN=<token> node runner/verg-command-runner.mjs --config ~/.config/verg-command/runner.json

Copy the token then; it cannot be shown again. The config file is ~/.config/verg-command/runner.json. Install the runner as a launchd job on a Mac or a systemd unit on Linux so it starts again after a reboot. The full guide is the file runner/README.md in the console source: it lists the config fields, the actions format, the anchored parameter checks and both service units.

Plan limits

Command is part of the console on every plan, and the deterministic engine never spends AI credit. Runners, runbooks and rules are counted across the workspace, and the number each plan includes is below.

PlanRunnersRunbooksRules
Free153
Starter22010
Team35025
Business10001000010000

When a limit is reached, adding another is refused with a message. Nothing already set up stops: existing runbooks keep running, existing runners keep taking steps and existing rules keep firing. The work board itself and its fact log are not counted against these limits.

What it never does

  • It never sends a shell command and never runs anything on your servers itself. Only a runner you installed runs an action, and only one in its own config.
  • It never decides what to do from an AI model. Rules and runbooks are written down and tested in advance.
  • It never hides a failure: every step keeps its exit code and output, every task keeps its events, and every rule that fires is in the audit log.