You’ve defined a workflow. Now you need to run it. Output gives you two execution modes:Documentation Index
Fetch the complete documentation index at: https://docs.output.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Synchronous —
output workflow runexecutes the workflow and waits for the result. Use this during development and for short-lived workflows. - Asynchronous —
output workflow startkicks off the workflow and returns immediately. Usestatusandresultto check on it later. Use this for long-running workflows or batch jobs.
Running a Workflow
output workflow run executes a workflow and waits for the result:
--format json if you need machine-readable output, for example when piping to another command or in scripts:
| Flag | Default | Description |
|---|---|---|
--input, -i | — | JSON string or file path (overrides scenario) |
--catalog, -c | OUTPUT_CATALOG_ID | Catalog name (the deprecated --task-queue, -q aliases still work) |
--format, -f | text | Output format: json, text |
Starting a Workflow Asynchronously
output workflow start fires off a workflow without waiting. It returns a workflow ID immediately:
- The workflow takes minutes or longer to complete
- You’re launching multiple workflows in a batch
- You want to check results later rather than keeping a terminal open
run, minus --format (there’s no result to format yet).
Checking Status
Poll a running workflow withoutput workflow status:
| Status | Meaning |
|---|---|
running | Still executing |
completed | Finished successfully |
failed | Completed with an error |
canceled | Stopped gracefully via workflow stop |
terminated | Force-stopped via workflow terminate |
timed_out | Exceeded the execution timeout |
Getting Results
Once a workflow completes, retrieve its output withoutput workflow result:
--format json for the full structured response including status, output, and error fields.
Debugging Execution
When something goes wrong — or you just want to understand what happened — useoutput workflow debug to see the execution trace:
--format json to get the full untruncated trace — this is especially useful when you need to see complete LLM inputs and outputs:
Stopping Workflows
If you need to cancel a running workflow:output workflow stop <workflowId>— Graceful cancellation. The workflow has a chance to clean up.output workflow terminate <workflowId>— Immediate kill. Use for stuck workflows or cleanup after branch switches.
Rerunning From a Step
When a workflow fails late — or you’ve edited a prompt that only affects a downstream step — you usually don’t want to re-run the whole thing. Early steps may have made expensive LLM calls, or slow API requests whose results haven’t changed.output workflow reset creates a new run that replays up to a given completed step (reusing its recorded output), then re-executes every step after it:
output workflow debug <workflowId> --format json. The step itself is not re-executed; only the steps after it.
Quick Reference
| What you want to do | Command |
|---|---|
| Run and wait for result | output workflow run <name> [scenario] |
| Start without waiting | output workflow start <name> [scenario] |
| Check if still running | output workflow status <workflowId> |
| Get the final output | output workflow result <workflowId> |
| See the execution trace | output workflow debug <workflowId> |
| Stop gracefully | output workflow stop <workflowId> |
| Force stop | output workflow terminate <workflowId> |
| Rerun from after a step | output workflow reset <workflowId> --step <stepName> |
workflow cost and workflow test, see the CLI package docs.
Scenario Files
A scenario file is a plain JSON file that contains the input for a workflow run. It lives in the workflow’sscenarios/ directory and matches the workflow’s inputSchema:
scenarios/acme.json
.json. To run with the acme scenario: