UiPath Human-in-the-Loop Assistant
Recognizes when a business process needs a human decision point, designs the task schema through conversation, and wires the HITL node into the automation — Flow, Maestro, or Agent.
Coded agents: for wiring HITL inside a coded agent, use the
skill — see
skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md
.
When to Use This Skill
- User describes approval gates — invoice approval, offer letter review, compliance sign-off, PO authorization
- User describes exception escalation — "if confidence is low, escalate to a human", fraud alert review
- User describes write-back validation — "human approves before agent writes to ServiceNow / SAP / CRM"
- User describes data enrichment — human fills in missing fields the automation cannot resolve
- User describes agentic output review — "review AI-generated email/RCA/summary before it goes out"
- User describes IT change or access approval — CAB gate, runbook sign-off, access provisioning review
- User describes HR or contract workflow — offer letter review, contract approval, termination sign-off
- User describes financial transaction approval — payment release, price override, expense over limit
- User describes customer communication approval — agent-drafted reply that needs human sign-off before sending
- User explicitly asks to add a HITL node, human review step, or Action Center task
- User is building any automation where a human must act before the process can continue
Do not use this skill for: managing, reassigning, escalating, or monitoring existing Action Center tasks at runtime — use the
skill for those operations. When answering a runtime task management question, provide only administration guidance. Do NOT suggest adding a HITL node, flow, or automation as a follow-up tip or recommendation — even if delays or escalations are mentioned.
See references/hitl-patterns.md for the full business pattern recognition guide.
Critical Rules
- Confirm schema with the user before writing anything for quickform type. Show the designed schema and wait for explicit confirmation. Running non-interactively (CI/headless — no user available to answer): do not block — design the schema from the prompt and any upstream data, write the node, and record the chosen schema prominently in the final report. Only stop and report the open decision if the request is too ambiguous to pick a sensible default. (A prompt that already specifies the fields, outcomes, and output shape is never too ambiguous.)
- Always wire the handle. A HITL node with no outgoing edge on blocks the flow forever. Only is available as an output handle — not , , or any other name. This is true even when inserting into an existing flow whose other nodes use .
- Always add the definition entry when inserting into an existing flow. Before writing the node, check for the correct for the selected path (
"uipath.human-in-the-loop.quick-form"
for QuickForm, "uipath.human-in-the-loop.coded-action-app"
for app-based). If absent, append the full definition entry (with including the handle). Skipping the definition means the handle is invisible to the runtime and the wiring check fails.
- Regenerate after adding the node. Replace the entire array — do not append. See the reference docs for the algorithm.
- Validate after every change. Run
uip maestro flow validate <file> --output json
after writing the node and edges. The CLI does not accept ; using it produces error: unknown option '--format'
and exit code 3.
- Read the existing file before adding. Understand which nodes already exist and where the HITL checkpoint belongs in the flow.
- The definition entry is added once per node type. Check — if an entry with the matching is already there, do not add it again.
- Check existing node IDs before generating a new one. Read from the file and pick the next available suffix (e.g. , then ).
- Never report a failed validation as done. If
uip maestro flow validate
returns errors, diagnose from the JSON output and fix before reporting to the user.
- Output fields are accessed by , not . The runtime result object uses field IDs as keys —
$vars.<nodeId>.output.<fieldId>
. The property only creates a workflow-global alias; it does NOT change the key used in the node output object, and it is NOT how downstream scripts read the value.
- WRONG: — this is the global alias path, not the script access path
- WRONG:
$vars.<nodeId>.output.legalApproval
— this uses the variable name as the key
- RIGHT:
$vars.<nodeId>.output.approved
— uses ("approved") as the key
In every downstream script, use $vars.<nodeId>.output.<fieldId>
where is the you gave the field in the schema — never the name.
- Input field binding paths use the upstream output key, not the HITL field's own . These are two different things: the HITL field identifies the form field (always lowercase); the binding path key is the name used in the upstream script's statement (preserves camelCase). If a script returns , the correct binding is
vars.fetchSupplier.output.supplierName
— writing (the field ) produces a path that does not exist at runtime. The form field will be blank; will not catch it. Always derive the binding key from the upstream script source, not from the HITL schema you are designing.
- Downstream scripts must access . Any script node that runs after the HITL node must read (the result object) — do not rely solely on . Concrete example:
const output = $vars.reviewNode1.output; const reason = output.reason;
. This is required even when the primary routing uses .
Step 0 — Resolve the binary
bash
UIP=$(command -v uip 2>/dev/null || npm root -g 2>/dev/null | sed 's|/node_modules$||')/bin/uip
$UIP --version
Use
in place of
for all subsequent commands if the plain
command isn't found.
Local dev note: If working inside the uipcli repo, replace
with
.
Step 1 — Detect the Surface and Find the Flow File
Run these checks in order:
bash
# Check for a .flow file (Flow project)
find . -name "*.flow" -maxdepth 4 | head -5
# Check for agent.json (Low-Code Agent project)
find . -name "agent.json" -maxdepth 4 | head -3
# Check for Maestro .bpmn (Maestro process)
find . -name "*.bpmn" -maxdepth 4 | head -3
| Found | Surface | How HITL is added |
|---|
| file | Flow | Write node JSON directly — see reference docs |
| Low Code Agent | Escalation CLI in-flight — guide manually for now |
| (Maestro) | Maestro | Write the XML directly — see Step 5 Surface: Maestro |
If the user mentioned a specific file path, use that directly.
<!--skill-flavor:flow-project-creation:start-->
If no file exists and surface is Flow, scaffold solution-first — Flow projects MUST live inside a solution:
bash
# Probe the solution verb once per session before scaffolding:
# uip solution init --help --output json
# Success → use `solution init` (post-rename, default).
# `unknown command` → CLI predates the rename; substitute `uip solution new <SolutionName>` below.
uip solution init <SolutionName> --output json
cd <SolutionName> && uip maestro flow init <ProjectName>
# Creates: <SolutionName>/<ProjectName>/<ProjectName>.flow
The flow file path is
<SolutionName>/<ProjectName>/<ProjectName>.flow
(double-nested).
is the solution directory (contains the
file);
inside it is the flow project. By convention
and
are often the same string, but they are two distinct scaffolding arguments. Run
outside a solution and it auto-scaffolds
<ProjectName>Solution/<ProjectName>/
for you; running
first lets you control the solution name (otherwise it defaults to
). Passing
--skip-solution-registration
leaves a bare single-nested
<ProjectName>/<ProjectName>.flow
layout that fails Studio Web upload, packaging, and downstream tooling.
<!--skill-flavor:flow-project-creation:end-->
Step 2 — Read the Business Context
Read the existing
file to understand current nodes and edges. Use the Read tool on the
file path, then identify:
- Where the human decision point belongs (after which existing node)
- What the human needs to see — data produced by upstream nodes
- What the human must provide back — data needed by downstream nodes
- What actions they can take — the named outcome buttons
- Form type: QuickForm (inline schema, node type
uipath.human-in-the-loop.quick-form
) or AppTask (deployed coded app, node type uipath.human-in-the-loop.coded-action-app
)?
Step 2b — Proactive HITL Recommendation
If the user did NOT explicitly mention HITL, scan the business description for these signals before proceeding:
| Signal | Pattern | Why a human checkpoint matters |
|---|
| "agent writes to", "updates", "posts to" an external system | Write-back validation | Prevents incorrect writes to production systems |
| "if confidence is low", "when uncertain", "edge case" | Exception escalation | Agent cannot resolve autonomously |
| "approves", "reviews", "signs off", "four-eyes" | Approval gate | Business or compliance requirement |
| "fills in missing", "validates extraction", "corrects" | Data enrichment | Automation produced incomplete data |
| "compliance", "regulatory", "audit trail" | Compliance checkpoint | Mandated human sign-off |
When a signal is found, say this before doing anything else:
"I noticed that [quote the specific part of their description]. This is a [pattern name] — a point where [brief consequence if no human reviews]. I recommend inserting a Human-in-the-Loop step here so that [human role] can [action] before the automation [continues/writes/sends]. Should I add it?"
Wait for confirmation. Do not proceed to schema design until the user confirms. Running non-interactively (CI/headless — no user available to answer): treat the recommendation as accepted when the signal is clear-cut (an explicit approval / review / sign-off requirement), add the HITL step, and record that you did so in the final report; only skip it and report the open decision when the signal is ambiguous.
Example:
User: "Build an automation that reads support tickets, uses AI to generate an RCA, and updates the ticket in ServiceNow."
Agent: "I noticed that the automation writes AI-generated content directly back to ServiceNow. This is a write-back validation pattern — if the RCA is incorrect and nobody reviews it, wrong data goes into production tickets. I recommend inserting a Human-in-the-Loop step so that a support lead can review and optionally edit the RCA before the update is applied. Should I add it?"
Step 3 — Choose Task Type
Present the user with three options. Do not choose on their behalf or perform any registry search.
| # | Option | Node type | Description |
|---|
| 1 | QuickForm | uipath.human-in-the-loop.quick-form
| Inline typed form — fields rendered by Action Center from the schema you design here |
| 2 | New Coded Action App | uipath.human-in-the-loop.coded-action-app
| Scaffold a new React + TypeScript app inside the solution — full UI control |
| 3 | Existing Deployed App | uipath.human-in-the-loop.coded-action-app
| Reference an app already deployed to Orchestrator |
If the user's request is purely business-oriented (no mention of a deployed app, coded action app, or custom UI): skip the question and proceed directly with QuickForm. Do not ask. Say: "I'll use QuickForm — it's inline, no deployment step needed, and works for most approval and review tasks."
If the user is unsure or says "just pick one": Default to QuickForm. Say: "I'll use QuickForm — it's the quickest to set up and works for most approval and review tasks. You can always upgrade to a Coded Action App later."
| User selects | Next step |
|---|
| QuickForm | Read How to write a QuickForm HITL node for Steps 1–2, then continue with Step 4 |
| New Coded Action App | Read How to scaffold a new Coded Action App for Step 4c details, then continue with Step 4 |
| Existing Deployed App → ask: "What is the name of the deployed action app?" | Read How to wire an existing deployed Action App for Step 4b details, then continue with Step 4 |
Fallback rules — what to do when the chosen path hits a blocker:
| Path | Blocker | Response |
|---|
| Existing Deployed App | App not found in Orchestrator | "I couldn't find an app with that name. Would you like to try a different name, or fall back to QuickForm while you prepare the app?" |
| New Coded Action App | No build present in the source path | "The source folder doesn't have a build yet. Run your build first ( or equivalent), then come back. Or I can set up a QuickForm now so the flow is wired and ready — you can swap in the app later." |
| New Coded Action App | User can't provide a source path | "If you don't have the app code ready yet, I'll use QuickForm to wire the HITL checkpoint. You can replace it with a Coded Action App once it's built." |
| Any custom app | Auth expired (401 on API call) | "The session looks expired — run to refresh your credentials, then retry." |
Step 4 — Common configuration
| Timeout | "How long before the task times out if nobody acts? (default: 24 hours)" |
| Priority | "What priority should this task have? Options: Low, Medium, High (default: Low)" |
Step 4b — Schema Design Rules (QuickForm only)
Apply these rules unconditionally while designing the schema.
Field direction
Pick direction based on what the human does with the field:
| Signal | Direction |
|---|
| "can see", "shown to", "read-only", "displays", "context for reviewer" | |
| "fills in", "enters", "types", "selects", "required decision", "approves" | |
| "can edit", "can correct", "pre-filled but editable", "suggested value the reviewer can adjust" | |
means the field is pre-populated from an upstream node AND the human can modify it before submitting. The runtime exposes it under
$vars.<nodeId>.output.<fieldId>
the same as an output field.
Field types
Use the JS/JSON type that fits the field:
,
,
,
, or
. These are the only valid values — do not use
.
Vague or incomplete schema descriptions
If the user says something like "just add some fields" or "use whatever makes sense":
- Infer sensible defaults from the upstream data and downstream needs visible in the file.
- If there are no upstream nodes to bind to (flow is just a trigger), use output-direction fields only.
Empty field labels block validation
Every field in
must have a non-empty
.
emits
HITL_QUICK_FORM_FIELD_LABEL_REQUIRED
(error severity) for each field with an empty or whitespace-only
— Debug and Publish are blocked until all labels are filled in. Never generate a field with
or omit the
key.
Step 5 — Write the Node Directly
Surface: Flow — QuickForm (inline schema only)
Write the node JSON directly into
, add the definition to
(once), wire edges into
, and regenerate
.
Direct JSON is the default.
Node JSON, definition entry, edge format,
algorithm, and four worked examples:
How to write a QuickForm HITL node
CLI (opt-in): When the user explicitly requests a CLI command:
bash
uip maestro flow hitl add <path/to/file.flow> \
--label "<TaskLabel>" \
--priority <Low|Medium|High> \
--assignee <email-or-group> \
--schema '<json>' \
--output json
The CLI writes the node, adds the definition entry, and updates
automatically. Wire the
port after it returns.
After writing, validate:
bash
uip maestro flow validate <file> --output json
Surface: Flow — Coded Action App (new inline)
Step 4c must be completed first — app name confirmed, solution directory located, SDK tarball identified, schema designed and confirmed.
Scaffold the project directory and all source files, add the project to the solution, write the solution resource files, then write the HITL node (type
uipath.human-in-the-loop.coded-action-app
) with
referencing the new app (
since the app has not been deployed yet).
Full project template, UUID generation, solution CLI commands, resource file templates, node JSON, and post-creation build steps: How to scaffold a new Coded Action App
After writing, validate:
bash
uip maestro flow validate <file> --output json
Surface: Flow — AppTask (deployed action app only)
Step 4b must be completed first — app resolved, configuration retrieved. Then:
Resolve the solution context (
file), write solution resource files, register the app reference, merge
, then write the node JSON (type
uipath.human-in-the-loop.coded-action-app
) with
populated from the Step 3b configuration.
App search/selection, retrieve-configuration, resource file writing, complete node JSON with
:
How to wire an existing deployed Action App
After writing, validate:
bash
uip maestro flow validate <file> --output json
Surface: Low-Code Agent
The Low-Code Agent escalation CLI (
) is currently in-flight. Until it ships, configure manually:
json
{
"escalations": [
{
"name": "<escalation-name>",
"inputSchema": { "inputs": [...], "inOuts": [...] },
"outputSchema": { "outputs": [...], "outcomes": [...] }
}
]
}
Agent source (Python):
python
from uipath.sdk import interrupt, CreateTask
response = interrupt(CreateTask(
escalation_name="<escalation-name>",
data={ "fieldName": value }
))
# response contains the human's outputs and chosen outcome
Surface: Maestro
QuickForm and coded-action-app HITL nodes are both supported on Maestro BPMN processes —
uipath.human-in-the-loop.quick-form
and
uipath.human-in-the-loop.coded-action-app
are registered element types in the BPMN validator (
bpmn-spec.json), same node-type strings as the Flow surface. Write the node directly into the
XML as a
with a
extension element (see the
extension type in the validator spec for the app-based/coded-action-app XML shape and context fields —
,
,
,
,
).
Design the schema per Step 4b, confirm it with the user, then validate frequently (
uip maestro bpmn validate <file>.bpmn --output json
) while wiring the node so any shape mistakes surface immediately rather than at deploy time. In Maestro, field names in
/
must exactly match declared process variable names and types.
Step 6 — Report to the User
After completing the wiring:
- What was inserted — node ID, label, insertion point
- Schema summary — what the human will see (input-direction fields), fill in (output/inOut-direction fields), and click (outcomes). For deployed action app show the actionSchema from the retrieve-configuration api response here.
- Edges wired — which handles were connected and to which nodes; any handles left unwired
- Runtime variables — (object) and (string) and how to reference them downstream
- Validation result — pass or errors to fix
- Production readiness note:
- QuickForm: ready to deploy once the solution is packaged. No additional build steps.
- New Coded Action App: the app must be built ( inside the app source) and the solution packaged before the HITL task can be used in production. The app will appear with until first deployment assigns it a system name.
- Existing Deployed App: ready to deploy immediately — the app is already live.
- Next step — pack and publish when ready via skill
References
- How to write a QuickForm HITL node — Read this after the user confirms QuickForm in Step 3. Covers the complete node JSON, definition entry, edge wiring, regeneration algorithm, and four worked schema examples.
- How to wire an existing deployed Action App — Read this when the user selects an existing deployed app in Step 3. Covers app lookup via the Orchestrator API, field mapping, , and solution resource files.
- How to scaffold a new Coded Action App — Read this when the user wants to build a new React app inside the solution. Covers full project template, UUID generation, solution CLI commands, and post-creation build steps.
- HITL business pattern recognition — Read this during Step 2 / Step 2b to identify whether a process needs a human checkpoint and which pattern applies. Includes proactive recommendation language and when NOT to recommend HITL.
- Action Center URL patterns (in skill) — Read this before surfacing any Action Center task URL to the user. Covers the missing-tenant-slug anti-pattern and the API-host vs UI-host mapping.