@uipath/skills 1.204.0 → 1.204.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/CODEOWNERS +12 -14
- package/package.json +1 -1
- package/skills/uipath-agents/references/coded/embedding-in-flows.md +1 -3
- package/skills/uipath-agents/references/coded/quickstart.md +0 -2
- package/skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md +10 -8
- package/skills/uipath-agents/references/lowcode/prompting/autonomous-agent-prompting-guide.md +1 -1
- package/skills/uipath-human-in-the-loop/SKILL.md +1 -3
- package/skills/uipath-human-in-the-loop/references/hitl-node-apptask.md +0 -2
- package/skills/uipath-human-in-the-loop/references/hitl-node-coded-action-app.md +0 -2
- package/skills/uipath-human-in-the-loop/references/hitl-node-quickform.md +2 -2
- package/skills/uipath-maestro-flow/.maintenance/README.md +265 -0
- package/skills/uipath-maestro-flow/.maintenance/check-all.sh +40 -0
- package/skills/uipath-maestro-flow/.maintenance/check-anchors.sh +101 -0
- package/skills/uipath-maestro-flow/.maintenance/check-depth.sh +132 -0
- package/skills/uipath-maestro-flow/.maintenance/check-link-text.sh +123 -0
- package/skills/uipath-maestro-flow/.maintenance/check-links.sh +73 -0
- package/skills/uipath-maestro-flow/.maintenance/check-orphans.sh +93 -0
- package/skills/uipath-maestro-flow/.maintenance/check-plugin-pairs.sh +39 -0
- package/skills/uipath-maestro-flow/.maintenance/check-template.sh +42 -0
- package/skills/uipath-maestro-flow/.maintenance/check-uip-commands.sh +270 -0
- package/skills/uipath-maestro-flow/.maintenance/check-versions.sh +160 -0
- package/skills/uipath-maestro-flow/SKILL.md +69 -886
- package/skills/uipath-maestro-flow/references/author/CAPABILITY.md +207 -0
- package/skills/uipath-maestro-flow/references/author/brownfield.md +91 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations-cli.md +190 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations-json.md +374 -0
- package/skills/uipath-maestro-flow/references/author/editing-operations.md +104 -0
- package/skills/uipath-maestro-flow/references/author/greenfield.md +420 -0
- package/skills/uipath-maestro-flow/references/author/planning-arch.md +364 -0
- package/skills/uipath-maestro-flow/references/author/planning-impl.md +291 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agent/impl.md +237 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agent/planning.md +97 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agentic-process/impl.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/agentic-process/planning.md +61 -0
- package/skills/uipath-maestro-flow/references/author/plugins/api-workflow/impl.md +108 -0
- package/skills/uipath-maestro-flow/references/author/plugins/api-workflow/planning.md +60 -0
- package/skills/uipath-maestro-flow/references/author/plugins/batch-transform/impl.md +171 -0
- package/skills/uipath-maestro-flow/references/author/plugins/batch-transform/planning.md +72 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/impl-inline.md +120 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/impl.md +463 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector/planning.md +186 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector-trigger/impl.md +517 -0
- package/skills/uipath-maestro-flow/references/author/plugins/connector-trigger/planning.md +115 -0
- package/skills/uipath-maestro-flow/references/author/plugins/conversational-agent/impl.md +309 -0
- package/skills/uipath-maestro-flow/references/author/plugins/conversational-agent/planning.md +133 -0
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/impl.md +428 -0
- package/skills/uipath-maestro-flow/references/author/plugins/data-fabric/planning.md +188 -0
- package/skills/uipath-maestro-flow/references/author/plugins/decision/impl.md +83 -0
- package/skills/uipath-maestro-flow/references/author/plugins/decision/planning.md +38 -0
- package/skills/uipath-maestro-flow/references/author/plugins/delay/impl.md +38 -0
- package/skills/uipath-maestro-flow/references/author/plugins/delay/planning.md +53 -0
- package/skills/uipath-maestro-flow/references/author/plugins/end/impl.md +56 -0
- package/skills/uipath-maestro-flow/references/author/plugins/end/planning.md +28 -0
- package/skills/uipath-maestro-flow/references/author/plugins/flow/impl.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/flow/planning.md +58 -0
- package/skills/uipath-maestro-flow/references/author/plugins/hitl/impl.md +181 -0
- package/skills/uipath-maestro-flow/references/author/plugins/hitl/planning.md +166 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl-connector.md +86 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl-manual.md +68 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/impl.md +173 -0
- package/skills/uipath-maestro-flow/references/author/plugins/http/planning.md +107 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-agent/impl.md +540 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-agent/planning.md +115 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-voice-agent/impl.md +269 -0
- package/skills/uipath-maestro-flow/references/author/plugins/inline-voice-agent/planning.md +128 -0
- package/skills/uipath-maestro-flow/references/author/plugins/ixp/impl.md +424 -0
- package/skills/uipath-maestro-flow/references/author/plugins/ixp/planning.md +95 -0
- package/skills/uipath-maestro-flow/references/author/plugins/loop/impl.md +403 -0
- package/skills/uipath-maestro-flow/references/author/plugins/loop/planning.md +60 -0
- package/skills/uipath-maestro-flow/references/author/plugins/merge/impl.md +43 -0
- package/skills/uipath-maestro-flow/references/author/plugins/merge/planning.md +24 -0
- package/skills/uipath-maestro-flow/references/author/plugins/queue/impl.md +82 -0
- package/skills/uipath-maestro-flow/references/author/plugins/queue/planning.md +44 -0
- package/skills/uipath-maestro-flow/references/author/plugins/rpa/impl.md +117 -0
- package/skills/uipath-maestro-flow/references/author/plugins/rpa/planning.md +61 -0
- package/skills/uipath-maestro-flow/references/author/plugins/scheduled-trigger/impl.md +56 -0
- package/skills/uipath-maestro-flow/references/author/plugins/scheduled-trigger/planning.md +93 -0
- package/skills/uipath-maestro-flow/references/author/plugins/script/impl.md +98 -0
- package/skills/uipath-maestro-flow/references/author/plugins/script/planning.md +42 -0
- package/skills/uipath-maestro-flow/references/author/plugins/subflow/impl.md +164 -0
- package/skills/uipath-maestro-flow/references/author/plugins/subflow/planning.md +35 -0
- package/skills/uipath-maestro-flow/references/author/plugins/summarize/impl.md +189 -0
- package/skills/uipath-maestro-flow/references/author/plugins/summarize/planning.md +66 -0
- package/skills/uipath-maestro-flow/references/author/plugins/switch/impl.md +72 -0
- package/skills/uipath-maestro-flow/references/author/plugins/switch/planning.md +34 -0
- package/skills/uipath-maestro-flow/references/author/plugins/terminate/impl.md +48 -0
- package/skills/uipath-maestro-flow/references/author/plugins/terminate/planning.md +29 -0
- package/skills/uipath-maestro-flow/references/author/plugins/transform/impl.md +252 -0
- package/skills/uipath-maestro-flow/references/author/plugins/transform/planning.md +47 -0
- package/skills/uipath-maestro-flow/references/diagnose/CAPABILITY.md +73 -0
- package/skills/uipath-maestro-flow/references/diagnose/failure-modes.md +353 -0
- package/skills/uipath-maestro-flow/references/diagnose/troubleshooting-guide.md +174 -0
- package/skills/uipath-maestro-flow/references/evaluate/CAPABILITY.md +134 -0
- package/skills/uipath-maestro-flow/references/evaluate/commands-reference.md +376 -0
- package/skills/uipath-maestro-flow/references/evaluate/eval-sets-guide.md +227 -0
- package/skills/uipath-maestro-flow/references/evaluate/evaluators-guide.md +143 -0
- package/skills/uipath-maestro-flow/references/evaluate/running-guide.md +215 -0
- package/skills/uipath-maestro-flow/references/evaluate/upload-safety.md +94 -0
- package/skills/uipath-maestro-flow/references/operate/CAPABILITY.md +77 -0
- package/skills/uipath-maestro-flow/references/operate/manage.md +39 -0
- package/skills/uipath-maestro-flow/references/operate/run.md +121 -0
- package/skills/uipath-maestro-flow/references/operate/ship.md +57 -0
- package/skills/uipath-maestro-flow/references/shared/action-nodes.md +100 -0
- package/skills/uipath-maestro-flow/references/shared/cli-commands.md +269 -0
- package/skills/uipath-maestro-flow/references/shared/cli-conventions.md +178 -0
- package/skills/uipath-maestro-flow/references/shared/file-format.md +582 -0
- package/skills/uipath-maestro-flow/references/shared/node-output-wiring.md +86 -0
- package/skills/uipath-maestro-flow/references/shared/ux-narration-and-todos.md +113 -0
- package/skills/uipath-maestro-flow/references/shared/variables-and-expressions.md +787 -0
- package/skills/uipath-platform/references/integration-service/activities.md +2 -2
- package/skills/uipath-platform/references/integration-service/activity-generation.md +8 -1
- package/skills/uipath-platform/references/integration-service/triggers.md +1 -3
- package/version-manifest.json +1 -1
- package/skills/uipath-maestro-flow/examples/AquariumSafetyStop.flow.ts +0 -26
- package/skills/uipath-maestro-flow/examples/ArchiveCardExtract.flow.ts +0 -38
- package/skills/uipath-maestro-flow/examples/BakeOffEntryForm.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/BeeHiveLedger.flow.ts +0 -61
- package/skills/uipath-maestro-flow/examples/BeltProgression.flow.ts +0 -53
- package/skills/uipath-maestro-flow/examples/BirdCountLookup.flow.ts +0 -24
- package/skills/uipath-maestro-flow/examples/ClubDirectory.flow.ts +0 -56
- package/skills/uipath-maestro-flow/examples/ConcertSoundcheck.flow.ts +0 -59
- package/skills/uipath-maestro-flow/examples/DoorbellLog.flow.ts +0 -45
- package/skills/uipath-maestro-flow/examples/FestivalMapScaffold.flow.ts +0 -22
- package/skills/uipath-maestro-flow/examples/FieldTripQuickForm.flow.ts +0 -45
- package/skills/uipath-maestro-flow/examples/FossilCatalogEnrich.flow.ts +0 -26
- package/skills/uipath-maestro-flow/examples/GallerySubmission.flow.ts +0 -67
- package/skills/uipath-maestro-flow/examples/GreenhouseWatering.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/HarbourRadioLine.flow.ts +0 -31
- package/skills/uipath-maestro-flow/examples/HerbariumDispatch.flow.ts +0 -34
- package/skills/uipath-maestro-flow/examples/KilnReview.flow.ts +0 -38
- package/skills/uipath-maestro-flow/examples/LibraryDeskChat.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/LighthouseSignal.flow.ts +0 -30
- package/skills/uipath-maestro-flow/examples/MeteorShowerPages.flow.ts +0 -39
- package/skills/uipath-maestro-flow/examples/NeighborhoodWalkPlanner.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/ObservatorySeeing.flow.ts +0 -51
- package/skills/uipath-maestro-flow/examples/OralHistoryDigest.flow.ts +0 -31
- package/skills/uipath-maestro-flow/examples/PlanetariumConfirmation.flow.ts +0 -34
- package/skills/uipath-maestro-flow/examples/PlantNameAdvisor.flow.ts +0 -28
- package/skills/uipath-maestro-flow/examples/PostcardCaption.flow.ts +0 -44
- package/skills/uipath-maestro-flow/examples/PotteryStudioCallback.flow.ts +0 -41
- package/skills/uipath-maestro-flow/examples/RecipeScaler.flow.ts +0 -62
- package/skills/uipath-maestro-flow/examples/SeedPacketReader.flow.ts +0 -49
- package/skills/uipath-maestro-flow/examples/TideTableConverter.flow.ts +0 -35
- package/skills/uipath-maestro-flow/examples/TrailLogSummary.flow.ts +0 -75
- package/skills/uipath-maestro-flow/examples/WorkshopInventory.flow.ts +0 -27
- package/skills/uipath-maestro-flow/examples/bindings.json +0 -85
- package/skills/uipath-maestro-flow/references/CLI-LOOP.md +0 -309
- package/skills/uipath-maestro-flow/references/agent-resources.md +0 -74
- package/skills/uipath-maestro-flow/references/agent.md +0 -175
- package/skills/uipath-maestro-flow/references/agentic-process.md +0 -41
- package/skills/uipath-maestro-flow/references/api-workflow.md +0 -29
- package/skills/uipath-maestro-flow/references/author.md +0 -178
- package/skills/uipath-maestro-flow/references/batch-transform.md +0 -23
- package/skills/uipath-maestro-flow/references/bindings.md +0 -178
- package/skills/uipath-maestro-flow/references/branch.md +0 -18
- package/skills/uipath-maestro-flow/references/brownfield.md +0 -152
- package/skills/uipath-maestro-flow/references/connector-params.md +0 -624
- package/skills/uipath-maestro-flow/references/conversational.md +0 -77
- package/skills/uipath-maestro-flow/references/data-fabric.md +0 -268
- package/skills/uipath-maestro-flow/references/delay.md +0 -26
- package/skills/uipath-maestro-flow/references/diagnose.md +0 -141
- package/skills/uipath-maestro-flow/references/document-pipeline.md +0 -47
- package/skills/uipath-maestro-flow/references/error-handling.md +0 -75
- package/skills/uipath-maestro-flow/references/evaluate.md +0 -168
- package/skills/uipath-maestro-flow/references/event-trigger.md +0 -155
- package/skills/uipath-maestro-flow/references/form-trigger.md +0 -41
- package/skills/uipath-maestro-flow/references/hitl.md +0 -169
- package/skills/uipath-maestro-flow/references/http.md +0 -105
- package/skills/uipath-maestro-flow/references/inline-agent.md +0 -132
- package/skills/uipath-maestro-flow/references/ixp.md +0 -167
- package/skills/uipath-maestro-flow/references/loops.md +0 -77
- package/skills/uipath-maestro-flow/references/manual-trigger.md +0 -39
- package/skills/uipath-maestro-flow/references/operate.md +0 -204
- package/skills/uipath-maestro-flow/references/or-processes.md +0 -91
- package/skills/uipath-maestro-flow/references/parallel-merge.md +0 -21
- package/skills/uipath-maestro-flow/references/placeholder.md +0 -70
- package/skills/uipath-maestro-flow/references/published-function.md +0 -66
- package/skills/uipath-maestro-flow/references/queue.md +0 -53
- package/skills/uipath-maestro-flow/references/return.md +0 -20
- package/skills/uipath-maestro-flow/references/rpa-workflow.md +0 -27
- package/skills/uipath-maestro-flow/references/scheduled-trigger.md +0 -34
- package/skills/uipath-maestro-flow/references/script.md +0 -52
- package/skills/uipath-maestro-flow/references/subflow.md +0 -33
- package/skills/uipath-maestro-flow/references/summarize.md +0 -20
- package/skills/uipath-maestro-flow/references/switch.md +0 -20
- package/skills/uipath-maestro-flow/references/terminate.md +0 -22
- package/skills/uipath-maestro-flow/references/transform.md +0 -32
- package/skills/uipath-maestro-flow/references/voice.md +0 -70
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
# Inline Agent Node — Implementation
|
|
2
|
+
|
|
3
|
+
This plugin covers **flow-specific** operations for inline agent nodes: adding the node, wiring edges, JSON structure, and flow validation. For agent-side concerns (agent.json configuration, resource.json authoring, solution resources, prompts), see the `uipath-agents` skill — specifically `lowcode/capabilities/inline-in-flow/inline-in-flow.md`.
|
|
4
|
+
|
|
5
|
+
Node type: `uipath.agent.autonomous`. The agent is bound to a local subdirectory via `inputs.source = <projectId>`. The node's BPMN type and `serviceType` (`Orchestrator.StartInlineAgentJob`) come from the definition in `definitions[]`.
|
|
6
|
+
|
|
7
|
+
For coded (Python) agents, use the [`agent`](../agent/impl.md) plugin (`uipath.core.agent.{key}`) — inline agents are low-code only.
|
|
8
|
+
|
|
9
|
+
## Prerequisite — Scaffold the Inline Agent
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uip agent init "<FlowProjectDir>" --inline-in-flow --output json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This creates `<FlowProjectDir>/<projectId-uuid>/` with:
|
|
16
|
+
|
|
17
|
+
- `agent.json` — agent definition (model, prompts, schemas)
|
|
18
|
+
- `flow-layout.json` — empty `{}`
|
|
19
|
+
- `evals/eval-sets/` — empty
|
|
20
|
+
- `features/` — empty
|
|
21
|
+
- `resources/` — empty (add tool resource files here later)
|
|
22
|
+
|
|
23
|
+
**Record the returned `ProjectId`** — the flow node's `inputs.source` must match it exactly. The same UUID is also the subdirectory name and the `projectId` field inside `agent.json`.
|
|
24
|
+
|
|
25
|
+
`--model` is honored; **`--system-prompt` is silently ignored under `--inline-in-flow`** — the command still reports `Result: Success` and leaves `messages[0].content` empty. Do not pass it; write the prompt into `agent.json` (next section) and verify by reading the file back.
|
|
26
|
+
|
|
27
|
+
For agent.json configuration and resource file setup, see the `uipath-agents` skill (`lowcode/agent-definition.md`, `lowcode/capabilities/inline-in-flow/inline-in-flow.md`).
|
|
28
|
+
|
|
29
|
+
## Configure `agent.json`
|
|
30
|
+
|
|
31
|
+
`uip agent init --inline-in-flow` scaffolds `agent.json` with empty `messages[].content` and `settings.model` set to the agent-tool default the command echoes back as `Data.Model`. **Both are placeholders — override them.** A scaffolded inline agent left on the default model with empty prompts is the single biggest quality gap a customer ships. Edit `<FlowProjectDir>/<projectId>/agent.json`:
|
|
32
|
+
|
|
33
|
+
1. **Override the model** — never ship the scaffold default unchecked, and never `gpt-4o-2024-11-20` (what `flow node add` writes onto the node). Discover the tenant's models with `uip agent model list` and pick the newest GA model for the task; set `settings.maxTokens` ≤ its cap. Discovery command, GA filter, and task→model mapping: the `uipath-agents` skill's [`model-selection-guide.md`](../../../../../uipath-agents/references/lowcode/model-selection-guide.md).
|
|
34
|
+
2. Set `settings.temperature` (0 for extraction/classification/judgment) and `settings.maxIterations` (keep 25 with any tool or context handle; `≤5` only tool-less single-shot — a looping agent needs step 3's stop rule, not a higher cap).
|
|
35
|
+
3. **Write a real system prompt** in `messages[0].content` — bounded role, per-tool call/stop criteria, output contract, grounding. Skeleton + worked example: [`autonomous-agent-prompting-guide.md`](../../../../../uipath-agents/references/lowcode/prompting/autonomous-agent-prompting-guide.md#1-system-prompt-skeleton).
|
|
36
|
+
|
|
37
|
+
**Every tool and context handle needs a call cap plus a decide-anyway fallback**, or the agent re-queries until the runtime kills it (`AGENT_RUNTIME.TERMINATION_MAX_ITERATIONS`, incident `170002`). Two sentences per grounding tool:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
Call <toolName> at most <N> times (N ≤ 3 for a single decision). After the last call, stop retrieving and decide with the evidence you already have.
|
|
41
|
+
If the retrieved content does not cover a detail, say so in <rationaleField>, lower <confidenceField>, and still return every outputSchema field. Never end a run without a determination.
|
|
42
|
+
```
|
|
43
|
+
4. Write the user prompt in `messages[1].content`.
|
|
44
|
+
5. **Declare a typed `outputSchema`** — not a bare `content` string — so downstream nodes can consume the result.
|
|
45
|
+
|
|
46
|
+
After editing `content`, rebuild the matching `messages[].contentTokens` (`type: "simpleText"` / `type: "variable"`). Token mechanics are flow-specific — see § Wiring Flow Variables into Agent Prompts below; for prompt-quality structure see `autonomous-agent-prompting-guide.md`.
|
|
47
|
+
|
|
48
|
+
> **Source of truth.** The prompt skeleton, the production-field checklist (`outputSchema` / `temperature` / `maxIterations` / `guardrails`), the model-discovery command, and the worked example all live in the `uipath-agents` guides linked above — this skill points at them rather than copying, to avoid cross-skill drift. The two stop-condition sentences in step 3 are the deliberate exception: they are inlined because a flow whose agent skips them faults at debug. The obligations in steps 1–5 are the build-time minimum; the *how* is one click away.
|
|
49
|
+
|
|
50
|
+
## Wiring Flow Variables into Agent Prompts
|
|
51
|
+
|
|
52
|
+
Passing flow data into an inline agent requires **three hand-authored, aligned** pieces. **The CLI does not derive the input wiring** — `uip agent refresh` does **not** scan prompts, derive `inputSchema`, or populate `agentInputVariables`; you author all three, and packaging ships them as-authored. (Refresh *does* regenerate `messages[].contentTokens` from `content` — that's the one derived part; see the invariant below.) The converter builds the runtime `JobArguments` from the **flow node's `inputs.agentInputVariables[]`** (not from `$vars` tokens in `agent.json`). Any `inputs.systemPrompt` / `inputs.userPrompt` string on the node makes the converter drop every `agentInputVariables[]` entry the prompt text does not reference (`@uipath/flow-converter`; prune present 0.25.1 through 0.55.0). Flatten rule: `$vars.<trigger>.output.<var>` → `<trigger>__output__<var>`.
|
|
53
|
+
|
|
54
|
+
A prompt-less node passes `flow validate` **once `agent.json.messages[]` carries real prompts** — validate hydrates the required fields from there. If it rejects the absent keys, the prompts are still empty: fill `agent.json`, do not add node keys. See § Refresh and Validate.
|
|
55
|
+
|
|
56
|
+
> **Encoding note.** Author the flat `__` form shown above — it is always valid and is what packaging ships to the runtime, so keep writing it. A newer nested encoding also exists (dotted prompt tokens like `{{input.a.b.c}}` with a matching nested `inputSchema`); **do not produce it**. An `agent.json` you open may already be in the newer nested form; leave it as-is and keep writing flat.
|
|
57
|
+
|
|
58
|
+
The three pieces — **Delivery** (node `agentInputVariables[]`), **Contract** (`agent.json` `inputSchema`), and **Resolution** (`{{input.<key>}}` in `messages[].content`) — and their examples are in the table below. `flow validate` catches a Resolution↔Contract mismatch (a `{{input.K}}` that's malformed or names a key not in `inputSchema`), but a missing/wrong **Delivery** binding passes validate and only shows up as empty input at `flow debug`. Agent-side `inputSchema`/`contentTokens` mechanics: the `uipath-agents` skill's [inline-in-flow § Wiring Flow Inputs Into an Inline Agent](../../../../../uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md#wiring-flow-inputs-into-an-inline-agent-required).
|
|
59
|
+
|
|
60
|
+
- **A flow pulled from Studio Web carries node prompts mirrored from `agent.json`.** The canvas writes node `inputs` into `agent.json.messages[]` on save and back on load. Those mirrored prompts are safe only if they reference every `agentInputVariables[]` key. Otherwise run `uip agent refresh --inline-in-flow` — shell-ify strips node prompts and keeps structural inputs.
|
|
61
|
+
|
|
62
|
+
> **Prerequisite — the bound value must actually exist as a variable.** A node binding `=$vars.X` resolves at runtime only if `$vars.X` is a declared variable. `flow validate` does **not** check that the path exists — a binding referencing an undeclared trigger field passes validate, then **faults at debug** with `JobArguments` empty. When the upstream node is a **trigger** (e.g. `core.trigger.manual`, id `start`), each field you bind must be declared in `variables.globals[]` as a trigger-associated input — `direction: "in"`, `triggerNodeId: "<triggerId>"` — and is then read as `$vars.<triggerId>.output.<id>`:
|
|
63
|
+
>
|
|
64
|
+
> ```json
|
|
65
|
+
> { "id": "invoiceNumber", "direction": "in", "type": "string", "triggerNodeId": "start" }
|
|
66
|
+
> ```
|
|
67
|
+
>
|
|
68
|
+
> Bind it on the agent node (`agentInputVariables[]`, `=$vars.start.output.invoiceNumber`) and reference it in the prompt as `{{input.start__output__invoiceNumber}}`. Likewise, flow outputs the agent feeds (e.g. `determination`, `rationale`) must be declared as `direction: "out"` globals and mapped on every reachable End node. Full schema and the `$vars.{triggerNodeId}.output.{id}` access rule: [../../../shared/variables-and-expressions.md](../../../shared/variables-and-expressions.md) (§ Input associated with a trigger); declaring/mapping mechanics: [../../editing-operations-json.md § Add a workflow variable](../../editing-operations-json.md#add-a-workflow-variable).
|
|
69
|
+
|
|
70
|
+
| Where | What | Example |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| Flow node `inputs.agentInputVariables[]` | One entry per input — the delivery binding the converter turns into `JobArguments`. | `{ "id": "start__output__invoiceNumber", "type": "string", "binding": "=$vars.start.output.invoiceNumber", "description": "Bound from $vars.start.output.invoiceNumber" }` |
|
|
73
|
+
| `agent.json` `inputSchema.properties` | One `<trigger>__output__<var>` key per input — **mandatory**, binds `JobArguments` → the agent's `input`. | `"start__output__invoiceNumber": { "type": "string", "description": "Bound from $vars.start.output.invoiceNumber" }` |
|
|
74
|
+
| `agent.json` `messages[].content` | `{{input.<trigger>__output__<var>}}` (the `input.` form — never `$vars`). | `"Invoice: {{input.start__output__invoiceNumber}}"` |
|
|
75
|
+
| `agent.json` `messages[].contentTokens[]` | One `{ "type": "variable", "rawString": "input.<trigger>__output__<var>" }` per `{{ ... }}` token in `content` (brace-free `rawString`). | `{ "type": "variable", "rawString": "input.start__output__invoiceNumber" }` |
|
|
76
|
+
|
|
77
|
+
Each binding's source `$vars.<node>.output.<field>` must reference a real node `id` in the `.flow` file, with an edge path reaching the inline-agent node. See [../../../shared/node-output-wiring.md](../../../shared/node-output-wiring.md) for the full expression contract.
|
|
78
|
+
|
|
79
|
+
### The `content` ↔ `contentTokens` mirror invariant
|
|
80
|
+
|
|
81
|
+
`content` is the source of truth. **`uip agent refresh` regenerates `messages[].contentTokens` from `content`** (correct `simpleText`/`variable` types, brace-free `rawString`). So: author the prompt in `content`, run `refresh`, and **don't hand-author or hand-fix `contentTokens`**. `uip agent validate` is read-only — if it flags a token mismatch (`Expected type "simpleText"…`, `Expected "input.X" but got "{{input.X}}"`, or `contentTokens has N entries but content requires M`), **re-run `refresh`** to regenerate; don't edit `rawString`.
|
|
82
|
+
|
|
83
|
+
What `refresh` produces, for `content` = `"Invoice Number: {{input.start__output__invoiceNumber}}\n"`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
"contentTokens": [
|
|
87
|
+
{ "type": "simpleText", "rawString": "Invoice Number: " },
|
|
88
|
+
{ "type": "variable", "rawString": "input.start__output__invoiceNumber" },
|
|
89
|
+
{ "type": "simpleText", "rawString": "\n" }
|
|
90
|
+
]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Worked example — end to end (repeat the triple per input)
|
|
94
|
+
|
|
95
|
+
Flow node (excerpt) — `binding` per input, typed `agentOutputVariables`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
"agentInputVariables": [
|
|
99
|
+
{ "id": "emailReceived1__output__subject", "type": "string", "binding": "=$vars.emailReceived1.output.subject" },
|
|
100
|
+
{ "id": "emailReceived1__output__body", "type": "string", "binding": "=$vars.emailReceived1.output.body" }
|
|
101
|
+
],
|
|
102
|
+
"agentOutputVariables": [{ "id": "category", "type": "string" }]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Matching `agent.json` — `inputSchema` keys mirror the bindings; the prompt uses the `input.` form, and `contentTokens` decompose `content` left-to-right (literals → `simpleText` verbatim incl. `\n`; each `{{ … }}` → brace-free `variable`):
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
"inputSchema": { "type": "object", "properties": {
|
|
109
|
+
"emailReceived1__output__subject": { "type": "string" },
|
|
110
|
+
"emailReceived1__output__body": { "type": "string" }
|
|
111
|
+
} },
|
|
112
|
+
"outputSchema": { "type": "object", "properties": { "category": { "type": "string" } }, "required": ["category"] },
|
|
113
|
+
"messages": [
|
|
114
|
+
{ "role": "system", "content": "Triage the email.", "contentTokens": [{ "type": "simpleText", "rawString": "Triage the email." }] },
|
|
115
|
+
{ "role": "user",
|
|
116
|
+
"content": "Subject: {{input.emailReceived1__output__subject}}\n\n{{input.emailReceived1__output__body}}",
|
|
117
|
+
"contentTokens": [
|
|
118
|
+
{ "type": "simpleText", "rawString": "Subject: " },
|
|
119
|
+
{ "type": "variable", "rawString": "input.emailReceived1__output__subject" },
|
|
120
|
+
{ "type": "simpleText", "rawString": "\n\n" },
|
|
121
|
+
{ "type": "variable", "rawString": "input.emailReceived1__output__body" }
|
|
122
|
+
] }
|
|
123
|
+
]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Write no prompt keys on the flow node.** Omit `inputs.systemPrompt` and `inputs.userPrompt` — full rule in § Anti-patterns below. The canonical prompt lives in `agent.json messages[]`, and it must be a real structured one (see `autonomous-agent-prompting-guide.md`), not a bare blob.
|
|
127
|
+
|
|
128
|
+
### When the source field name is unknown at authoring time
|
|
129
|
+
|
|
130
|
+
Connector-trigger output fields (e.g. email `subject`/`from`/`body`) aren't in the registry — only knowable after a real run. Author best-guess `{{input.<node>__output__<field>}}` paths with the matching `binding`/`inputSchema` key, **ask the user to confirm before upload** (don't invent field names silently), and correct the tokens + `contentTokens` mirrors after the first run.
|
|
131
|
+
|
|
132
|
+
### Anti-patterns
|
|
133
|
+
|
|
134
|
+
- **In `agent.json` prompts, use the `{{input.<trigger>__output__<var>}}` form** (the flattened key, `input.` prefix). Never use raw `{{ $vars.X }}` (the runtime can't resolve it — agent gets the literal token) or `{{plainName}}` (no prefix).
|
|
135
|
+
- **The `variable` `rawString` is exactly what sits between the braces** — `input.<trigger>__output__<var>`, brace-free, no added spaces.
|
|
136
|
+
- **Never write `inputs.systemPrompt` / `inputs.userPrompt` on the flow node.** Delete the keys — do not empty them. A prompt string on the node makes the converter drop every `agentInputVariables[]` entry that text does not reference (`@uipath/flow-converter`; prune present 0.25.1 through 0.42.0). `JobArguments` then ships as `{"input":""}` and the agent job faults. Empty strings fail `flow validate`. The canonical prompt lives in `agent.json messages[]`; delivery comes from `agentInputVariables[]`.
|
|
137
|
+
- **Declared `type` must match the bound node's real output shape, in BOTH `agentInputVariables[].type` and `inputSchema`.** The runtime strict-validates `JobArguments` before the model runs: a list bound to an `object`-typed key faults `AGENT_STARTUP.INPUT_VALIDATION_ERROR` (incident `170002`, `"Input should be a valid dictionary … input_type=list"`), and both `flow validate` and `agent validate` still report `Valid`. **Data Service query-entity-records returns an array. A script-built value has the shape the script returns — `.map()` returns array, never object.** For an array, write `{"type": "array", "items": {"type": "object"}}` in `inputSchema.properties.<key>` and `"type": "array"` on the matching `agentInputVariables[]` entry — both, or startup validation still faults. The registry won't settle it — connector nodes declare `output.type: "object"` with no schema — so bind the leaf (`=$vars.crmLookup1.output[0].accountTier`) or read the shape from one `flow debug` run.
|
|
138
|
+
- **Mark a key `required` only when the binding can never be empty** — otherwise an empty upstream fails the same startup validation instead of letting the agent reason about a missing value.
|
|
139
|
+
- **Each `agentInputVariables[]` entry uses `binding` (not `value`).** The converter builds `JobArguments` from `binding`; a `value: "=js:$vars…"` entry (Studio Web's internal canvas form) is **ignored** — the agent gets empty input and faults at debug (`AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR`, "Template placeholders detected instead of actual values"). Write `{ "id": "<key>", "binding": "=$vars.<trigger>.output.<var>" }`. `binding` is what both the CLI converter and Studio Web's loader read.
|
|
140
|
+
|
|
141
|
+
## Registry Validation
|
|
142
|
+
|
|
143
|
+
Even though `uipath.agent.autonomous` is OOTB, validate it against the registry during Phase 2 to confirm the current product state:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
uip maestro flow registry get uipath.agent.autonomous --output json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Confirm:
|
|
150
|
+
|
|
151
|
+
- Input port: `input`
|
|
152
|
+
- Output ports: `success`, `error`
|
|
153
|
+
- Artifact ports: `tool`, `context`, `escalation`
|
|
154
|
+
- The definition declares `model.source: true`; flow-core hoists that identity field onto the node instance as `inputs.source`
|
|
155
|
+
- `model.serviceType` — `Orchestrator.StartInlineAgentJob`
|
|
156
|
+
- `model.version` — `v2`
|
|
157
|
+
|
|
158
|
+
## Adding / Editing
|
|
159
|
+
|
|
160
|
+
For step-by-step add, delete, and wiring procedures, see [editing-operations.md](../../editing-operations.md). Inline-agent scaffolding uses `uip agent init --inline-in-flow`, but the flow graph is not a Flow CLI carve-out: add the `uipath.agent.autonomous` node, its `inputs.source`, outputs, variables, layout, and edges directly in the `.flow` JSON with `Edit` / `Write`.
|
|
161
|
+
|
|
162
|
+
### Add the node with Edit / Write
|
|
163
|
+
|
|
164
|
+
Use `Edit` to add a node instance to `nodes[]`. The instance carries only per-instance data (`inputs`, `outputs`, `display`). BPMN type, serviceType, version, and context templates come from the definition in `definitions[]`. Do not write a node instance `model` block for `uipath.agent.autonomous`: flow-core's `createNodeFromManifest` hoists manifest-declared `source` identity into `inputs.source` and returns a node with no `model`.
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"id": "autonomousAgent1",
|
|
169
|
+
"type": "uipath.agent.autonomous",
|
|
170
|
+
"typeVersion": "1.0",
|
|
171
|
+
"display": { "label": "Autonomous Agent" },
|
|
172
|
+
"inputs": {
|
|
173
|
+
"source": "<projectId-uuid>",
|
|
174
|
+
"agentInputVariables": [],
|
|
175
|
+
"agentOutputVariables": [
|
|
176
|
+
{ "id": "content", "type": "string" }
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"outputs": {
|
|
180
|
+
"error": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"description": "Error information if the node fails",
|
|
183
|
+
"source": "=Error",
|
|
184
|
+
"var": "error"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
No `inputs.systemPrompt` / `inputs.userPrompt` keys. A prompt-less node passes `flow validate` **once `agent.json.messages[]` carries real prompts** — validate hydrates the required fields from there. If it rejects the absent keys, the prompts are still empty: fill `agent.json`, do not add node keys. See § Refresh and Validate.
|
|
191
|
+
|
|
192
|
+
Also add:
|
|
193
|
+
|
|
194
|
+
- A `definitions[]` entry copied verbatim from `uip maestro flow registry get uipath.agent.autonomous --output json` (`Data.Node` or the top-level node object, depending on CLI/plugin version). Set `typeVersion` to the copied definition's exact `version`.
|
|
195
|
+
- `variables.nodes[]` entries for `autonomousAgent1.output` and `autonomousAgent1.error` with `binding.nodeId = "autonomousAgent1"` and matching `binding.outputId` values.
|
|
196
|
+
- A placeholder `layout.nodes.<agentNodeId>` entry; `flow format` owns the final position.
|
|
197
|
+
|
|
198
|
+
### Wire edges with Edit / Write
|
|
199
|
+
|
|
200
|
+
Use `Edit` to add edge objects to `edges[]`:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"id": "<EDGE_ID>",
|
|
205
|
+
"sourceNodeId": "<upstreamNodeId>",
|
|
206
|
+
"sourcePort": "output",
|
|
207
|
+
"targetNodeId": "autonomousAgent1",
|
|
208
|
+
"targetPort": "input"
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"id": "<EDGE_ID>",
|
|
215
|
+
"sourceNodeId": "autonomousAgent1",
|
|
216
|
+
"sourcePort": "success",
|
|
217
|
+
"targetNodeId": "<nextNodeId>",
|
|
218
|
+
"targetPort": "input"
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
For tool/resource nodes, wire the inline agent's bottom artifact port:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"id": "<EDGE_ID>",
|
|
227
|
+
"sourceNodeId": "autonomousAgent1",
|
|
228
|
+
"sourcePort": "tool",
|
|
229
|
+
"targetNodeId": "<toolNodeId>",
|
|
230
|
+
"targetPort": "input"
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`tool` is the inline agent's bottom artifact port; `context` is also bottom and `escalation` is the top port (see [§ Adding Resource Nodes](#adding-resource-nodes)). The target node's `input` port is a target-typed artifact handle.
|
|
235
|
+
|
|
236
|
+
## Adding Resource Nodes
|
|
237
|
+
|
|
238
|
+
An inline agent attaches resource nodes — tools (external or built-in), contexts, and escalations — to its three artifact ports. **All kinds wire into the `.flow` identically:** discover the node type, add a minimal node instance, copy its definition into `definitions[]`, add a placeholder layout entry, wire ONE artifact edge to the node's `input` port, then hand-author `resource.json` and run refresh + validate. Three things vary per kind — the **artifact port** the edge leaves, the **node type**, and whether the resource needs **solution-level files**. The `resource.json` body is owned by the `uipath-agents` skill (linked per row).
|
|
239
|
+
|
|
240
|
+
| Kind | Edge source port | Node type | `resource.json` discriminator | Needs `uip solution resources refresh`? | `resource.json` reference (uipath-agents) |
|
|
241
|
+
|------|------------------|-----------|-------------------------------|------------------------------------------|--------------------------------------------|
|
|
242
|
+
| RPA process tool | `tool` (bottom) | `uipath.agent.resource.tool.process.<release-key>` | `type: "process"` | Yes | `lowcode/capabilities/process/process.md` |
|
|
243
|
+
| Agent tool | `tool` (bottom) | `uipath.agent.resource.tool.agent.<release-key>` | `type: "agent"` | Yes | `lowcode/capabilities/process/process.md` |
|
|
244
|
+
| API workflow tool | `tool` (bottom) | `uipath.agent.resource.tool.api.<release-key>` | `type: "api"` | Yes | `lowcode/capabilities/process/process.md` |
|
|
245
|
+
| Process Orchestration tool | `tool` (bottom) | `uipath.agent.resource.tool.processorchestration.<release-key>` | `type: "processOrchestration"` | Yes | `lowcode/capabilities/process/process.md` |
|
|
246
|
+
| Built-in tool | `tool` (bottom) | `uipath.agent.resource.tool.builtin.<toolType>` | `type: "internal"` | **No** — self-contained at the agent level | `lowcode/capabilities/built-in-tools/built-in-tools.md` |
|
|
247
|
+
| Context (index / RAG) | `context` (bottom) | `uipath.agent.resource.context.index.<index-name>.<index-id>` | `$resourceType: "context"`, `contextType: "index"` | Yes | `lowcode/capabilities/context/index.md` |
|
|
248
|
+
| Escalation (HITL) | `escalation` (top) | `uipath.agent.resource.escalation` | `$resourceType: "escalation"` | Yes | `lowcode/capabilities/escalation/escalation.md` |
|
|
249
|
+
|
|
250
|
+
### 1. Discover the node type and generate a UUID
|
|
251
|
+
|
|
252
|
+
The four process-tool kinds and context carry a per-resource suffix (`<release-key>` or `<index-name>.<index-id>`) — `registry search` by the prefix (the node type minus the suffix), then `registry get` the matching `NodeType`. Escalation and built-in tools are exact strings — `registry get` directly.
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Suffix-bearing kinds (process/agent/api/processorchestration tools, context):
|
|
256
|
+
uip maestro flow registry search "<prefix>" --output json # e.g. "uipath.agent.resource.tool.process"
|
|
257
|
+
uip maestro flow registry get "<NodeType>" --output json
|
|
258
|
+
|
|
259
|
+
# Exact-string kinds:
|
|
260
|
+
uip maestro flow registry get uipath.agent.resource.escalation --output json
|
|
261
|
+
uip maestro flow registry get "uipath.agent.resource.tool.builtin.<toolType>" --output json
|
|
262
|
+
|
|
263
|
+
# One resource UUID — used as both inputs.source and the resource.json directory/id
|
|
264
|
+
RES=$(uuidgen)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
`<release-key>` is the resource's release-key GUID from `uip solution resources list` (the row's `Key`). `<toolType>` is the built-in's fixed kebab discriminator (e.g. `analyze-attachments`), identical to the `resource.json` `properties.toolType`.
|
|
268
|
+
|
|
269
|
+
### 2. Add the node and wire the artifact edge
|
|
270
|
+
|
|
271
|
+
Every resource node uses the same minimal instance — `inputs.source` only, no instance `model` block. The definition declares `model.source: true`; flow-core hoists that identity field onto `inputs.source` (same hoisting rule as `uipath.agent.autonomous`).
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"id": "agentTool1",
|
|
276
|
+
"type": "<NodeType>",
|
|
277
|
+
"typeVersion": "<DEFINITION_VERSION>",
|
|
278
|
+
"display": { "label": "<Label>" },
|
|
279
|
+
"inputs": { "source": "<RES_UUID>" }
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Also add:
|
|
284
|
+
|
|
285
|
+
- The node definition copied verbatim from `registry get` into `definitions[]`. Set `typeVersion` to its `version`.
|
|
286
|
+
- Top-level `bindings[]` entries when the definition declares `model.bindings` — process tools use `model.bindings.resourceKey` and `model.bindings.values[]` (`name`, `folderPath`, etc.); see [editing-operations-json.md — Resource nodes](../../editing-operations-json.md#add-a-node). Built-in tools declare none.
|
|
287
|
+
- A placeholder `layout.nodes.<nodeId>` entry.
|
|
288
|
+
- ONE artifact edge from the agent's port (per the matrix) to the node's `input` port. Substitute `tool` / `context` / `escalation` for `sourcePort`:
|
|
289
|
+
|
|
290
|
+
```json
|
|
291
|
+
{
|
|
292
|
+
"id": "<EDGE_ID>",
|
|
293
|
+
"sourceNodeId": "autonomousAgent1",
|
|
294
|
+
"sourcePort": "tool",
|
|
295
|
+
"targetNodeId": "agentTool1",
|
|
296
|
+
"targetPort": "input"
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### 3. Author `resource.json`
|
|
301
|
+
|
|
302
|
+
Hand-author `<FlowProjectDir>/<inlineAgentProjectId>/resources/<RES_UUID>/resource.json` using the matrix reference for the kind. Set `id` to `<RES_UUID>` (= the node's `inputs.source` and the resource directory name). A `resource.json` missing its `$resourceType` (or `type` for built-ins) is not recognized by `uip agent validate` — it reports `"resources": 0`, and the next refresh writes an empty `bindings_v2.json`.
|
|
303
|
+
|
|
304
|
+
**Process / agent / api / processOrchestration tools** share one shape — use the exact shape in the `uipath-agents` skill: `lowcode/capabilities/process/process.md` § Tool resource.json Shape (read it first). The subtype is the `type` field (§ Subtypes in `process.md`). RPA uses raw .NET arrays (Template A in `solution-files.md`); Agent / API / Process Orchestration use JSON Schema V2 (Template B). Run `uip solution resources list` + `uip solution resources get` to populate `referenceKey`, `folderPath`, `inputSchema`, `outputSchema`. Inline-in-flow specifics:
|
|
305
|
+
|
|
306
|
+
- Set `location` from the discovery `Source` field: `"solution"` when `Source: "Local"`, `"external"` when `Source: "Remote"` (same rule as standalone agents).
|
|
307
|
+
- Set `properties.folderPath` to the **literal folder path from discovery** (e.g., `"Shared/TestRPA"`) — do **not** leave it empty.
|
|
308
|
+
- `inputSchema.properties` must include `"guardrails": { "type": "array" }` alongside the process arguments.
|
|
309
|
+
|
|
310
|
+
**Built-in, context, and escalation** bodies follow their matrix reference.
|
|
311
|
+
|
|
312
|
+
### 4. Refresh, validate, refresh solution resources
|
|
313
|
+
|
|
314
|
+
Set prompts in `agent.json` (system + user `messages` with `contentTokens` of `type: "simpleText"` and `rawString`), then:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow \
|
|
318
|
+
--bindings-target "<FlowProjectDir>/bindings_v2.json" --output json
|
|
319
|
+
uip agent validate "<FlowProjectDir>/<projectId>" --inline-in-flow --output json
|
|
320
|
+
# All kinds EXCEPT built-in tools:
|
|
321
|
+
uip solution resources refresh --output json
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
- **Process tools / context / escalation** resolve through `bindings_v2.json` (process / index / App binding). Pass `--bindings-target <FlowProjectDir>/bindings_v2.json` on refresh so `uip solution resources refresh` discovers the binding and writes the solution-level files. Do not hand-edit `bindings_v2.json` — refresh regenerates it.
|
|
325
|
+
- **Built-in tools** carry `referenceKey: null` and `type: "internal"` — no `bindings[]`, no solution-level files, no `uip solution resources refresh`.
|
|
326
|
+
- **Verify both refresh and validate report `"resources": N` where N > 0.** If either shows `"resources": 0`, the `resource.json` is malformed or missing required fields — fix it and re-run before proceeding.
|
|
327
|
+
|
|
328
|
+
For agent.json prompt configuration and solution resource mechanics, see the `uipath-agents` skill (`lowcode/capabilities/inline-in-flow/inline-in-flow.md`).
|
|
329
|
+
|
|
330
|
+
## JSON Structure
|
|
331
|
+
|
|
332
|
+
The instance carries only per-instance data (`inputs`, `outputs`, `display`). BPMN type, serviceType, version, and context templates come from the definition in `definitions[]`.
|
|
333
|
+
|
|
334
|
+
```json
|
|
335
|
+
{
|
|
336
|
+
"id": "autonomousAgent1",
|
|
337
|
+
"type": "uipath.agent.autonomous",
|
|
338
|
+
"typeVersion": "1.0",
|
|
339
|
+
"display": { "label": "Autonomous Agent" },
|
|
340
|
+
"inputs": {
|
|
341
|
+
"source": "<projectId-uuid>",
|
|
342
|
+
"agentInputVariables": [],
|
|
343
|
+
"agentOutputVariables": [
|
|
344
|
+
{ "id": "content", "type": "string" }
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"outputs": {
|
|
348
|
+
"error": {
|
|
349
|
+
"type": "object",
|
|
350
|
+
"description": "Error information if the node fails",
|
|
351
|
+
"source": "=Error",
|
|
352
|
+
"var": "error"
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
No `inputs.systemPrompt` / `inputs.userPrompt` keys. A prompt-less node passes `flow validate` **once `agent.json.messages[]` carries real prompts** — validate hydrates the required fields from there. If it rejects the absent keys, the prompts are still empty: fill `agent.json`, do not add node keys. See § Refresh and Validate.
|
|
359
|
+
|
|
360
|
+
Notes:
|
|
361
|
+
|
|
362
|
+
- `inputs.source` — the inline agent's `projectId`; must match the subdirectory name and `agent.json.projectId`. The definition still declares `model.source: true`, but flow-core hoists that identity field onto `inputs.source` for the node instance.
|
|
363
|
+
- **No `inputs.systemPrompt` / `inputs.userPrompt` on the instance.** Omit both keys — full rule in § Wiring Flow Variables into Agent Prompts § Anti-patterns. Canonical inline-agent prompts live in `agent.json`.
|
|
364
|
+
- `inputs.agentInputVariables` carries one entry per flow input the agent reads — `{ id: "<trigger>__output__<var>", binding: "=$vars.<trigger>.output.<var>" }`. This is the only thing the converter turns into the runtime `JobArguments`; prompts then reference each input as `{{input.<trigger>__output__<var>}}` (see § Wiring Flow Variables into Agent Prompts above). Leave it `[]` only when the agent reads no flow data.
|
|
365
|
+
- **No `model` block on the inline-agent node instance.** The node inherits serviceType/version/context from `definitions[]`; `source` lives at `inputs.source`. Stale instance fields such as `model.serviceType`, `model.version`, or `model.context` override the inherited definition and can cause runtime mismatch.
|
|
366
|
+
|
|
367
|
+
## Accessing Output
|
|
368
|
+
|
|
369
|
+
How agent output surfaces depends on `agent.json` `outputSchema`:
|
|
370
|
+
|
|
371
|
+
- **Typed `outputSchema`** (the required form — step 5) — each property surfaces **flat** at `$vars.<nodeId>.output.<field>`. For `outputSchema.properties` `{ subject, body }`: read `$vars.<nodeId>.output.subject` and `$vars.<nodeId>.output.body`. **There is no `.content.` wrapper** — `$vars.<nodeId>.output.content.subject` resolves to undefined and silently yields a null flow output.
|
|
372
|
+
- **Untyped (single string)** — only when no typed schema is declared: `$vars.<nodeId>.output.content` holds the agent's text response.
|
|
373
|
+
- `$vars.<nodeId>.error` — error details if the agent fails.
|
|
374
|
+
|
|
375
|
+
To expose a typed field as a flow output, see § Wiring Agent Output Into Flow Outputs below.
|
|
376
|
+
|
|
377
|
+
## Wiring Agent Output Into Flow Outputs
|
|
378
|
+
|
|
379
|
+
Symmetric to input wiring — **three aligned pieces**, none CLI-derived:
|
|
380
|
+
|
|
381
|
+
| Where | What | Example |
|
|
382
|
+
| --- | --- | --- |
|
|
383
|
+
| `agent.json` `outputSchema.properties` | One typed key per field the agent returns. | `"subject": { "type": "string" }`, `"body": { "type": "string" }` |
|
|
384
|
+
| Flow node `inputs.agentOutputVariables[]` | **One entry per field** — NOT a single `content` object. | `[{ "id": "subject", "type": "string" }, { "id": "body", "type": "string" }]` |
|
|
385
|
+
| End node `outputs.<global>` | Maps each `out` global to the flat field path. | `"emailBody": { "source": "=js:$vars.<agentNodeId>.output.body" }` |
|
|
386
|
+
|
|
387
|
+
Plus: declare each flow output as a `direction: "out"` global in `variables.globals[]`, and map it on **every reachable End node**.
|
|
388
|
+
|
|
389
|
+
**Anti-pattern:** `agentOutputVariables: [{ "id": "content", "type": "object" }]` paired with End `=js:$vars.<node>.output.content.<field>`. The typed agent delivers fields flat at `output.<field>`; the `.content.` path resolves to undefined → `flow validate` passes, debug Completes, but the flow output is **null**.
|
|
390
|
+
|
|
391
|
+
## Refresh and Validate
|
|
392
|
+
|
|
393
|
+
Refresh the inline agent (writes `entry-points.json` and `bindings_v2.json`, and for tool-bearing agents, propagates bindings into the flow project's `bindings_v2.json`), then validate (read-only check), then validate the flow:
|
|
394
|
+
|
|
395
|
+
```bash
|
|
396
|
+
# 1. Refresh the inline agent (writes entry-points.json and bindings_v2.json)
|
|
397
|
+
uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json
|
|
398
|
+
|
|
399
|
+
# 1b. For tool-bearing inline agents, refresh with --bindings-target to propagate tool bindings:
|
|
400
|
+
uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow \
|
|
401
|
+
--bindings-target "<FlowProjectDir>/bindings_v2.json" --output json
|
|
402
|
+
|
|
403
|
+
# 2. Validate the inline agent (read-only schema check)
|
|
404
|
+
uip agent validate "<FlowProjectDir>/<projectId>" --inline-in-flow --output json
|
|
405
|
+
|
|
406
|
+
# 3. Validate the flow
|
|
407
|
+
uip maestro flow validate <FlowName>.flow --output json
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
> **Validator behavior — it reads `agent.json`, not just the node.** The registry `inputDefinition` for `uipath.agent.autonomous` marks `systemPrompt`, `userPrompt`, and `model` `required` with `minLength: 1`. `uip maestro flow validate` accepts a node carrying **none** of those keys only because it hydrates all three from `agent.json` on load:
|
|
411
|
+
>
|
|
412
|
+
> | Node | `agent.json.messages[].content` | `flow validate` |
|
|
413
|
+
> | --- | --- | --- |
|
|
414
|
+
> | no prompt keys | real prompts | passes |
|
|
415
|
+
> | no prompt keys | `""` | `[SCHEMA_ERROR] System prompt is required` — **fix `agent.json`** |
|
|
416
|
+
> | `""` prompt keys | anything | `[SCHEMA_ERROR] System prompt is required` — delete the keys |
|
|
417
|
+
> | real prompt keys | anything | passes validate, **prunes every agent input at runtime** |
|
|
418
|
+
>
|
|
419
|
+
> The message varies by build: `[SCHEMA_ERROR] System prompt is required` (current) or `[REQUIRED_FIELD] "systemPrompt" is required`. Row 4 is the trap: it is the only failing state that validate calls `Valid`. A correct `inputSchema` does not save you: the `agentInputVariables` warning fires only when `inputSchema` is *empty*, so a node whose prompts reference none of its declared bindings draws no diagnostic at all. Never buy a green validate by adding node keys — write the prompts in `agent.json`. Older CLIs rejected absent keys outright; see § Older CLI below.
|
|
420
|
+
|
|
421
|
+
> **Refresh also shell-ifies the parent `.flow` (self-contained flows).** When a flow was authored self-contained in Studio Web, its `.flow` embeds the inline agent's prompts/model/guardrails and each resource node's config **inline** (not just in the `<projectId>/` sidecar). Since you edit the **sidecar**, that stale embed would shadow your edits when the flow is re-opened in Studio Web (the embed wins over the sidecar on load). So `uip agent refresh --inline-in-flow` strips this agent's embedded config back out of the parent `.flow` — leaving only structural inputs (`source`, `agentInputVariables`, etc.) on the agent node and `{source, detail, itemsDescription}` on its resource nodes — so Studio Web re-hydrates the cluster from your freshly-written sidecar on import. It is **scoped to the agent being refreshed** (siblings untouched), a **no-op** for flows authored from scratch via the CLI (already shells), and **best-effort** (a failure never fails refresh). When it acts, the JSON output carries `FlowShellified: true` and `FlowResourceNodesStripped: <n>`. You author the sidecar (`agent.json` + `resources/`); refresh keeps the `.flow` a shell — do not hand-embed prompts/config back into the flow node.
|
|
422
|
+
|
|
423
|
+
### Older CLI — validate rejects absent prompt keys
|
|
424
|
+
|
|
425
|
+
Some environments pin a CLI whose validator still rejects absent prompt keys with `[REQUIRED_FIELD] "systemPrompt" is required`. Upgrade the CLI first. When the environment blocks an upgrade:
|
|
426
|
+
|
|
427
|
+
0. **First rule out the far more common cause.** A current CLI raises the *same* error when `agent.json.messages[].content` is still `""` — hydration supplies the empty string. Read `<FlowProjectDir>/<projectId>/agent.json`. If the prompts are empty, you are not on an old CLI: fill them and stop here. Only a prompt-less node whose `agent.json` already carries real prompts puts you in this section.
|
|
428
|
+
1. Add minimal placeholder `inputs.systemPrompt` / `inputs.userPrompt` strings — **only** after validate rejects the absent keys. Never use `""`; empty strings fail the same check.
|
|
429
|
+
2. Run `uip maestro flow debug` and read the trace. `JobArguments` must carry your bound inputs, not `{"input":""}`.
|
|
430
|
+
3. If `JobArguments` is `{"input":""}`, that CLI also carries the converter prune (`@uipath/flow-converter` 0.25.1+): the placeholder text references no input, so the converter drops every `agentInputVariables[]` entry. No node edit fixes this — the placeholders satisfy the old validator and break the wiring at the same time. Escalate for a CLI upgrade; do not ship a workaround.
|
|
431
|
+
|
|
432
|
+
## Debug
|
|
433
|
+
|
|
434
|
+
| Error | Cause | Fix |
|
|
435
|
+
| --- | --- | --- |
|
|
436
|
+
| `flow validate` reports `[SCHEMA_ERROR] System prompt is required` or `[REQUIRED_FIELD] systemPrompt` / `userPrompt` required | **Most often: `agent.json.messages[].content` is still `""`**, so hydration supplies `""` for a field the manifest requires. Also: the node carries **empty-string** prompt keys, the `inputs.source` UUID is missing, or the inline agent subdirectory cannot be found | Write real prompts in `agent.json.messages[]`, then `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json`. Only if the node itself carries the keys, delete them (`""` fails; refresh also strips them). Set `inputs.source` to the inline agent UUID, and verify `<FlowDir>/<projectId>/agent.json` exists. **Do not clear this error by writing prompts onto the node** — that passes validate and prunes every agent input |
|
|
437
|
+
| Debug faults with `JobArguments {"input":""}` — `AGENT_STARTUP.INPUT_VALIDATION_ERROR` `"Field required"` per `inputSchema` key (incident `170002` family); **expected, not yet observed:** `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` when the schema marks nothing required | Prompt keys on the agent node — the converter drops every `agentInputVariables[]` entry the node prompt text does not reference. Stub text references nothing, so every entry goes. Discriminator: the entries already use `binding:` | Delete `inputs.systemPrompt` and `inputs.userPrompt` from the node — delete the keys, because empty strings fail `flow validate`. Or run `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json` — shell-ify strips node prompts. Verify: the agent node instance must contain no `systemPrompt` key. See § Wiring Flow Variables into Agent Prompts |
|
|
438
|
+
| `inputs.source` UUID does not match any subdirectory | Wrong source value, or folder renamed | Set `inputs.source` to the exact UUID of the inline agent directory |
|
|
439
|
+
| Flow runs a different agent than expected | `inputs.source` points to a stale/leftover inline agent dir | Check subdirectory names — only one inline agent dir should correspond to each agent node |
|
|
440
|
+
| `Orchestrator.StartAgentJob` error at runtime | Stale instance `model` fields override the inherited inline-agent definition | Remove the inline-agent node's instance `model` block and keep the registry definition's `model.serviceType: "Orchestrator.StartInlineAgentJob"` in `definitions[]` |
|
|
441
|
+
| Studio Web reports "System prompt is required" | Inline agent's `agent.json.messages[]` has empty `content`, OR derived files (`entry-points.json`, `bindings_v2.json`) are stale, OR the node carries no `inputs.systemPrompt` and Studio Web's node form validates the field | Set prompts in `agent.json`, re-run `uip agent refresh --inline-in-flow` to regenerate derived files, then `uip agent validate --inline-in-flow` to check — see `uipath-agents` skill. For the third cause: keep the keys off, set real prompts in `agent.json`, re-run `uip agent refresh --inline-in-flow`, and re-import so the canvas hydrates the form from the sidecar |
|
|
442
|
+
| Studio Web debug: "Could not find process for tool" | Flow project's `bindings_v2.json` is missing the tool's process binding, so `uip solution resources refresh` never created the solution-level resource | Re-run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` to propagate bindings, then `uip agent validate --inline-in-flow` to check schema, then `uip solution resources refresh`, then re-upload |
|
|
443
|
+
| `bindings_v2.json` is empty or missing tool bindings | Tool bindings were not propagated to the flow project level, or a later tool overwrote the file | Re-run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` after all flow node and edge edits are complete. Refresh is the verb that writes the file — do not hand-edit it |
|
|
444
|
+
| Agent tool (process / agent / api / processOrchestration) cannot resolve at runtime | Missing top-level `bindings[]` entries, mismatched tool-node `inputs.source` / `resource.json` id, stale solution resources, or missing project-level `bindings_v2.json` | Add the resource bindings from the tool definition, keep the tool node's `inputs.source` equal to the resource UUID, run `uip agent refresh --inline-in-flow --bindings-target <FlowProjectDir>/bindings_v2.json` to write bindings, then `uip agent validate --inline-in-flow` to check, then run `uip solution resources refresh` |
|
|
445
|
+
| `inputs.agentProjectId` unrecognized | Wrong field name | Use `inputs.source` — `agentProjectId` is not valid for inline agents |
|
|
446
|
+
| Inline agent rejected by `uip agent validate` | `entry-points.json` or `project.uiproj` present inside the inline agent dir | Delete those files — they belong only to standalone agent projects |
|
|
447
|
+
| Folder name is human-readable instead of UUID | Folder renamed after scaffolding | Rename to the original `projectId` UUID — the folder name must match `inputs.source` and the `projectId` field inside `agent.json` |
|
|
448
|
+
| Agent runs but returns empty `output.content` | Missing or malformed `contentTokens` in `agent.json` | Rebuild `messages[].contentTokens` using `{ "type": "simpleText", "rawString": "..." }` entries; see `uipath-agents` for detail |
|
|
449
|
+
| `flow validate` passes, debug Completes, but the `out` global (e.g. `emailBody`) is null | Typed agent output read with a `.content.` wrapper — `agentOutputVariables:[{content}]` + End `=js:$vars.<node>.output.content.<field>` — but typed fields surface flat at `output.<field>` | List each field in `agentOutputVariables[]` (`{id:"subject"},{id:"body"}`) and map End to `=js:$vars.<node>.output.<field>` (no `.content.`). See § Wiring Agent Output Into Flow Outputs. |
|
|
450
|
+
| `agent validate` flags `Expected type "simpleText" but got "text"` | Hand-edited `contentToken` written with `type: "text"` | Re-run `uip agent refresh` — it regenerates `contentTokens` from `content` (correct `simpleText`/`variable` types). Don't hand-edit the token. See § The `content` ↔ `contentTokens` mirror invariant. |
|
|
451
|
+
| `agent validate` flags `Expected "input.X" but got "{{input.X}}"` | Hand-edited `variable` token has the braces/extra spaces in its `rawString` | Re-run `uip agent refresh` to regenerate the tokens from `content` (brace-free `rawString`) — don't hand-fix it. See § The `content` ↔ `contentTokens` mirror invariant. |
|
|
452
|
+
| `agent validate` flags `contentTokens has N entries but content requires M. Rebuild contentTokens to match content.` | `content` and `contentTokens` drifted (e.g. tokens edited without `content`, or vice versa) | Re-run `uip agent refresh` to regenerate `contentTokens` from `content`. If the prompt itself is wrong, fix `content` first, then refresh. See § The `content` ↔ `contentTokens` mirror invariant. |
|
|
453
|
+
| Prompt shows literal `{{input.X}}` at runtime | `inputSchema.properties` missing the referenced key (`flow validate` flags this — run it) | Add the `<trigger>__output__<var>` key to `inputSchema`. |
|
|
454
|
+
| `flow validate` passes but debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` (literal `input.<key>`) | Node `agentInputVariables` uses `value:` instead of `binding:` (or is missing) → empty `JobArguments` | Set `binding:"=$vars.<trigger>.output.<var>"` on the node entry; ensure the trigger global is declared (`direction:"in"`). If `binding:` is already correct, check for prompt keys on the node — see the prune row. |
|
|
455
|
+
| Debug faults `AGENT_RUNTIME.TERMINATION_LLM_RAISED_ERROR` "Template placeholders detected instead of actual values" — and the node *does* have `agentInputVariables[]` | Entries use `value: "=js:$vars…"` (Studio Web's canvas form) instead of `binding`; the converter only reads `binding`, so `JobArguments` are empty | Rename `value` → `binding` on each entry and strip the `=js:` prefix: `{ "id": "<key>", "binding": "=$vars.<trigger>.output.<var>" }`. If `binding:` is already correct, check for prompt keys on the node — see the prune row. See § Wiring Flow Variables into Agent Prompts. |
|
|
456
|
+
|
|
457
|
+
## Repair Recipes
|
|
458
|
+
|
|
459
|
+
Use direct JSON edits for inline-agent graph repairs. The Flow CLI has no node-update command (see [editing-operations-cli.md § Operations Not Supported by CLI](../../editing-operations-cli.md#operations-not-supported-by-cli)), and the inline-agent graph is not a Flow CLI carve-out. If a bulk scripted rewrite is explicitly approved, use the `python3` heredoc pattern from [editing-operations-json.md — Edit Tooling](../../editing-operations-json.md#edit-tooling); otherwise apply the same transformations through `Edit` / `Write`.
|
|
460
|
+
|
|
461
|
+
### Replace a definition entry
|
|
462
|
+
|
|
463
|
+
Use when the `definitions[]` entry for a node type is wrong, stale, or hand-written. The fix is always: re-fetch from the registry, splice into `definitions[]` matching on `nodeType`, then keep the node instance minimal.
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
uip maestro flow registry get uipath.agent.autonomous --output json > /tmp/registry_response.json
|
|
467
|
+
python3 - <<'PY'
|
|
468
|
+
import json
|
|
469
|
+
new_def = json.load(open("/tmp/registry_response.json"))["Data"]["Node"]
|
|
470
|
+
flow = json.load(open("<FILE>.flow"))
|
|
471
|
+
for i, d in enumerate(flow["definitions"]):
|
|
472
|
+
if d.get("nodeType") == "uipath.agent.autonomous":
|
|
473
|
+
flow["definitions"][i] = new_def
|
|
474
|
+
break
|
|
475
|
+
INLINE_TYPES = ("uipath.agent.autonomous", "uipath.agent.resource.")
|
|
476
|
+
for node in flow["nodes"]:
|
|
477
|
+
t = node.get("type", "")
|
|
478
|
+
if t == "uipath.agent.autonomous" or t.startswith("uipath.agent.resource."):
|
|
479
|
+
model = node.pop("model", None) or {}
|
|
480
|
+
if isinstance(model.get("source"), str):
|
|
481
|
+
node.setdefault("inputs", {})["source"] = model["source"]
|
|
482
|
+
json.dump(flow, open("<FILE>.flow", "w"), indent=2)
|
|
483
|
+
PY
|
|
484
|
+
uip maestro flow validate <FILE>.flow --output json
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
Same pattern works for any node type — substitute the `nodeType` string in both the `registry get` command and the loop guard. The `model.source` → `inputs.source` rewrite above is applied to both the inline agent node and every attached resource node (tool, escalation, context) — all of them carry source identity at `inputs.source` and never on an instance `model` block.
|
|
488
|
+
|
|
489
|
+
### Resolve a `[REQUIRED_FIELD] systemPrompt is required` validator error
|
|
490
|
+
|
|
491
|
+
Current CLIs report the same fault as `[SCHEMA_ERROR] System prompt is required`. Two causes. (a) Empty-string prompt keys on the node. (b) The validator's hydration through `inputs.source` short-circuited — missing UUID, missing subdirectory, or empty `agent.json` messages. Absent prompt keys pass on a current CLI; if they do not, see § Refresh and Validate § Older CLI. Check in order:
|
|
492
|
+
|
|
493
|
+
1. **UUID at `inputs.source`** — the `projectId` UUID must be set at `inputs.source`. Diagnose:
|
|
494
|
+
|
|
495
|
+
```bash
|
|
496
|
+
python3 - <<'PY'
|
|
497
|
+
import json
|
|
498
|
+
flow = json.load(open("<FILE>.flow"))
|
|
499
|
+
for node in flow["nodes"]:
|
|
500
|
+
t = node.get("type", "")
|
|
501
|
+
if t == "uipath.agent.autonomous" or t.startswith("uipath.agent.resource."):
|
|
502
|
+
print(t, "inputs.source:", node.get("inputs", {}).get("source"))
|
|
503
|
+
print(t, "model.source: ", node.get("model", {}).get("source"))
|
|
504
|
+
PY
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
If a stale flow has the UUID at `model.source` on the inline agent node **or any attached resource node** (tool, escalation, context), move it to `inputs.source` and remove the instance `model` block:
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
python3 - <<'PY'
|
|
511
|
+
import json
|
|
512
|
+
flow = json.load(open("<FILE>.flow"))
|
|
513
|
+
for node in flow["nodes"]:
|
|
514
|
+
t = node.get("type", "")
|
|
515
|
+
if t == "uipath.agent.autonomous" or t.startswith("uipath.agent.resource."):
|
|
516
|
+
inputs = node.setdefault("inputs", {})
|
|
517
|
+
model = node.pop("model", None) or {}
|
|
518
|
+
uuid = model.get("source")
|
|
519
|
+
if uuid:
|
|
520
|
+
inputs["source"] = uuid
|
|
521
|
+
json.dump(flow, open("<FILE>.flow", "w"), indent=2)
|
|
522
|
+
PY
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
2. **Subdirectory** — confirm `<FlowDir>/<projectId>/` exists and contains `agent.json`. If not, re-run `uip agent init "<FlowDir>" --inline-in-flow --output json` and bind the returned `ProjectId` through `inputs.source`.
|
|
526
|
+
|
|
527
|
+
3. **Prompts in `agent.json`** — set `messages[0].content` (system) and `messages[1].content` (user) to real prompts before validate. Rebuild `messages[].contentTokens` to match — `[{ "type": "simpleText", "rawString": "<your prompt text>" }]` per message.
|
|
528
|
+
|
|
529
|
+
4. **Prompt keys on the flow node** — delete `inputs.systemPrompt` and `inputs.userPrompt` if present. Deleting the keys passes validate; `""` does not. Or run `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow --output json` — shell-ify strips node prompts. Verify: the agent node instance must contain no `systemPrompt` key. Keep the canonical prompt text in `agent.json`.
|
|
530
|
+
|
|
531
|
+
## What NOT to Do
|
|
532
|
+
|
|
533
|
+
- **Do not use Flow CLI `node add`, `edge add`, or `variable` commands for inline-agent graph edits** — inline-agent node, edge, variable, layout, and tool-resource node changes are non-carve-out structural `.flow` mutations and must be authored directly with `Edit` / `Write`. On `uipath.agent.autonomous`, `node add` also writes `inputs.systemPrompt: "You are an agentic assistant."`, `inputs.userPrompt: "What is the current date?"`, and `inputs.model: "gpt-4o-2024-11-20"` from the manifest's `inputDefaults`, and nothing in the command output flags it. To recover a node already in that state, `uip agent refresh "<FlowProjectDir>/<projectId>" --inline-in-flow` strips them (`FlowShellified: true`). This rule scopes to `uipath.agent.autonomous`. It does **not** cover the inline conversational agent (`uipath.agent.conversational`), whose documented recipe authors the node and its edges with `node add` / `edge add` — see [conversational-agent/impl.md § Node JSON](../conversational-agent/impl.md#node-json).
|
|
534
|
+
- **Do not write `inputs.systemPrompt` / `inputs.userPrompt` on the inline-agent node** — full rule in § Wiring Flow Variables into Agent Prompts § Anti-patterns. Prompts live in `agent.json`.
|
|
535
|
+
- **Do not put a `model` block on the inline-agent node instance** — the node inherits serviceType/version/context from `definitions[]`; the inline-agent source lives at `inputs.source`.
|
|
536
|
+
- **Do not use `model.agentProjectId`, `inputs.agentProjectId`, or `model.source` on any inline-agent-related node instance** — both `uipath.agent.autonomous` and every attached resource node (`uipath.agent.resource.tool.*`, `uipath.agent.resource.escalation`, `uipath.agent.resource.context.*`) carry source identity at `inputs.source` and have no instance `model` block.
|
|
537
|
+
- **Do not create `entry-points.json` or `project.uiproj` inside the inline agent directory** — those belong only to standalone agent projects.
|
|
538
|
+
- **Do not name the inline agent folder with a human-readable name** — the folder name must be the `projectId` UUID.
|
|
539
|
+
- **Do not use `uip agent tool add`** for inline-in-flow agents — hand-author the tool's `resource.json` instead.
|
|
540
|
+
- **Do not skip `uip agent refresh --inline-in-flow` followed by `uip agent validate --inline-in-flow`** after editing `agent.json` or any `resources/*/resource.json`; for tool-bearing inline agents, pass `--bindings-target <FlowProjectDir>/bindings_v2.json` on the refresh call to propagate tool bindings.
|