BUILD / create-and-run-a-workflow-in-grok-build

Build

Create and run a workflow in Grok Build

Create and run a workflow in Grok Build

Grok Build workflows orchestrate a bounded set of subagents in the background: fan out work, verify, then return a result. Official Modes and Commands (Workflows section) documents create, launch, pause / resume / stop, and the live dashboard. Workflows are on by default.

Create a workflow

  1. Start a Build session in your repo (grok after install; see Start a Grok Build session in your repo).
  2. Run:
/create-workflow Review the current branch for bugs, then verify each finding
  1. Grok asks about fan-out, verification, and scope, then authors, smoke-checks, and saves the file.
  2. Saved paths:
    • Project: .grok/workflows/<name>.rhai
    • Every project: ~/.grok/workflows/<name>.rhai

Treat those .rhai files as project config when you commit.

Launch, control, and watch

/workflow review-changes {"target":"origin/main...HEAD"}
/workflow pause review-changes
/workflow resume review-changes
/workflow stop review-changes-2
/workflows
Command What it does
/workflow <name> [json args] Launch a saved workflow (optional JSON args)
/workflow pause / resume / stop <run> Control a live run
/workflows Open the live run dashboard (fullscreen TUI)
/<workflow-name> Shortcut launch when the name is unique

/workflows lists active and retained runs, not the saved workflow files on disk.

Built-in research workflow

/deep-research <what you need researched>

/deep-research starts a built-in research workflow in the background. For research plus /imagine in the same session, see Run /deep-research and /imagine inside Grok Build.

Disable workflows

Turn the feature off with either:

  • [workflows] enabled = false in ~/.grok/config.toml
  • Environment variable GROK_WORKFLOWS=0

Pitfalls

  • Background workflows spend from your paid usage like other Build work. Watch /usage and Settings → Usage on the web.
  • /workflows is the run dashboard; saved definitions live under .grok/workflows/ or ~/.grok/workflows/.
  • A few commands appear only when the feature is available on that CLI build.
  • Subagents inside a workflow still follow permission rules (ask / auto / always-approve) and hooks.