Skip to main content

Workflows

A workflow is a JSON recipe that chains tools from several kits into one complete result: a lit blockout level, a door Blueprint with a timeline, a patrol guard with navmesh and behavior tree, a landscape with foliage. One call (edit.run_workflow) or one MCP prompt builds the whole thing; the workflow's own verify list reads the result back and asserts concrete fields, and an atomic run rolls every step back when one fails. The plugin ships a library of 19 workflows under Resources/Workflows/; a project adds or overrides workflows in <Project>/Saved/UEAMCP/Workflows/.

Calling a workflow​

GoalCall
List (with availability on this engine)edit.list_workflows {category?} or MCP prompts/list
Read the JSON and the step list as textedit.get_workflow {id} or MCP prompts/get {name:id, arguments}
Static check with your argumentsedit.validate_workflow {id, arguments}
Preview the resolved stepsedit.run_workflow {id, arguments, dryRun:true}
Build itedit.run_workflow {id, arguments} (atomic by default; add _preview:"auto" for a final image)
Remove what it builtedit.run_workflow {id, arguments, runCleanup:true} right away, or call the cleanup steps shown by edit.get_workflow yourself
  • arguments is a map of strings ({"prefix":"Arena"}); the declared type converts them (number, integer, boolean, array, object). argumentsJson accepts a JSON object instead. Every built-in argument has a default, so {id} alone always works.
  • The reply lists every step with ok, the resolved argsJson, the compact resultJson and error; failedStep, succeeded, verified, rolledBack, resolvedArguments, changedAssets/changedActors summarise the run.
  • Clients without tool automation can use the MCP prompt: its text states the goal, the arguments with their resolved values and the exact tool calls in order, including verify and cleanup.

Rollback and verify semantics​

  1. edit.run_workflow validates first (tools exist and are available here, argument names match the schemas, required arguments present, ${...} references resolve, minEngine and requiresPlugins satisfied). Problems refuse the run before anything changes.
  2. With atomic:true (default) it creates the checkpoint workflow:<id>, runs the steps in order and stops at the first failed step or failed expect. The checkpoint is rolled back (rolledBack:true, rollback report) — everything undoable disappears. Asset files already written to disk and project config writes (gameplay tags, save slots) are not undoable; the workflows that do this say so and their cleanup removes them explicitly.
  3. After all steps succeed the verify calls run; each must succeed and match its expect. verified:false does not roll back (the result exists but is not what the recipe promised).
  4. A successful run keeps the checkpoint, so edit.checkpoint_rollback {name:"workflow:<id>"} undoes it later while the undo history is intact.
  5. An atomic run refuses to start while an editor transaction is open (edit.begin_transaction).

The built-in library​

Level content goes to the outliner folder UEAMCP/<id> (argument levelFolder) with labels prefixed by prefix; asset content goes to /Game/UEAMCP/<id with dots as underscores> (argument folder). cleanup deletes exactly that folder's actors and that content folder, plus anything else the workflow created (landscape, foliage instances, save slot, gameplay tags, Level Blueprint members).

The 19 workflows cover: a lit blockout and a day/night cycle (level.*), a basic blockout (actor.*), a PBR material from a texture folder and a parameter-driven master library (material.*), a main menu and a HUD health bar (umg.*), an interactable door and a pickup item (bp.*), character controls (input.*), a patrol guard with EQS/Behavior Tree (ai.*), a Niagara impact effect (niagara.*), a Sequencer orbit shot (sequencer.*), terrain with foliage (landscape.*), a procedural PCG forest (pcg.*), audio ambience (audio.*), save game setup (save.*), a physics playground (physics.*) and a basic Gameplay Ability System ability (gas.*). Each declares its own arguments with sensible defaults and the kits it touches; the full list, with arguments and the exact content each one generates, is in Docs/guides/workflows.md in the plugin repository.

Engine content used by the library exists on both 4.27 and 5.x: /Engine/BasicShapes/{Cube,Cone, Cylinder}, /Engine/EditorSounds/Notifications/CompileSuccess, /Engine/EngineMaterials/DefaultPhysicalMaterial and the Niagara template RadialBurst. A workflow whose gates the editor does not meet is listed with available:false and the reason, and is refused by edit.run_workflow.

Writing a project workflow​

Save <Project>/Saved/UEAMCP/Workflows/<id with dots as underscores>.json; it is picked up on the next call (no restart). A project file with the id of a shipped workflow replaces it.

Rules that keep a workflow reliable (the shipped library follows all of them):

  • Substitution. ${arg} reads an argument; ${stepId.path} reads the reply of an earlier step (${floor.actor.label}, ${fx.handles.0.id}, ${forest.edges.length}). A string that is exactly one token keeps the value's JSON type (numbers stay numbers); tokens inside a longer string are inserted as text.
  • Expect. Keys are reply paths (a.b, list.0.name, list.length); values are compared with a numeric tolerance of 1e-4, case-insensitive for strings; "*" means present and not empty.
  • Names, not guesses. Every argument and reply field must exist in the tool's schema. Discover them with edit.search_tools, edit.get_tool_schema or, in the plugin repository, python Tools/check_workflows.py . --catalog bp..
  • Gates. If any step uses a tool gated by MinEngine or RequiresPlugin, declare the same minEngine / requiresPlugins on the workflow.
  • No waiting. Steps run on the game thread: use tools that finish synchronously and never OffThread tools (nav.wait_build, pcg.wait_generation); leave asynchronous work to a direct call after the run.
  • Cleanup. Put level content in one outliner folder and delete it with actor.delete_by_filter {folder, _confirm:true}; put assets in one content folder and delete it with asset.delete_folder {folder, _confirm:true}; remove non-undoable side effects explicitly.

Checks​

  • python Tools/check_workflows.py . — static check of every shipped workflow against the tool headers (names, required arguments, reply paths used in expect and ${step...}, step order, gates, risk confirmations, id = file name).
  • python Tools/workflow_smoke.py --project <smoke project> --tag 58 — against a running editor: prompts, checkpoints, atomic batches, previews, then every workflow validate -> dry run -> atomic run -> verify -> cleanup.