create_workflow
Build a custom workflow from a step list when no built-in template fits, with approval gates and rollback options. Define steps, validate, and get a workflow ID for review and execution.
Instructions
[WRITE] Create a custom workflow dynamically from a step list.
Use this when you already know the steps and no built-in template matches; prefer plan_workflow when one does, and design_workflow when the user gave a goal rather than steps. Call get_skill_catalog first for the skill and tool names a step may target.
Each step dict must have: action, skill, tool, params. Optional: rollback_tool, rollback_params. action="require_approval" (skill "pilot", tool "approve") inserts a human approval gate. A workflow whose destructive or unclassifiable step, or a step passing confirm=True, has no gate before it is REFUSED — nothing is saved — and the error names the step and the gate to insert.
Returns: dict with workflow_id and plan summary. Next call review_workflow to check the plan, then run_workflow to execute. Nothing is undone automatically on failure; see rollback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Workflow name (used as workflow_type). | |
| steps | Yes | List of step dicts, each with action/skill/tool/params. | |
| description | Yes | Human-readable description. | |
| save_as_template | No | If True, save as YAML to ~/.vmware/workflows/ for reuse. Refused when name is a built-in template's name, since the saved template would replace the built-in. |