fix(uipath-maestro-flow): fix inline agent prompt wiring contract#909
Conversation
|
Claude finished @rockymadden's task in 1m 50s —— View job SummaryThis PR rewrites the inline-agent prompt-wiring contract from a four-place "agent input bridge" pattern ( Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes — existing skills only |
| E2E Tests | OK | Documentation-only change to prompt-wiring contract; no new CLI workflows or commands introduced. Existing test tasks in tests/tasks/uipath-maestro-flow/ are not affected (they test flow operations, not agent.json authoring). |
| Skill Body | OK | No SKILL.md changes |
| References & Assets | OK | All three changed files are consistent with each other. Relative links resolve. Cross-skill link pre-dates this PR. |
| Repo Hygiene | OK | No secrets, no binary files, changes scoped to the two affected skills, no CODEOWNERS change needed (existing skill paths) |
Issues for Manual Review
- Domain accuracy: The core claim — that inline-agent prompts use
{{ $vars.<flowNodeId>.output[.<field>] }}directly instead of anagentInputVariables[]binding bridge — is a product behavior assertion. Verify against the actual canvas/runtime behavior thatagentInputVariables: []is correct for prompt-data references and thatrawStringwith leading/trailing spaces is the expected format.
Conclusion
Clean PR. The three files consistently document the new direct-reference contract, the worked example is internally consistent, anti-patterns and debug tables are updated, and no issues were found with structure, links, or repo hygiene. Approve.
tmatup
left a comment
There was a problem hiding this comment.
I wonder if we should tighten up the rule in agent validate and flow validate accordingly so the first attempt will fail earlier instead of later when StudioWeb rejected it.
Sounds fantastic to me. |
Fix inline-agent prompt-wiring contract
The
uipath-maestro-flowskill (and one mirror reference inuipath-agents) documents an agent input bridge for wiring flow data into inline-agent prompts:agentInputVariables[]on the flow node ↔inputSchema.properties.<id>↔{{input.<id>}}token ↔contentTokens[].rawString: "input.<id>".That contract is wrong. Studio Web's canvas does not resolve
input.*against the agent'sinputSchemawhen rendering prompt tokens — it rewrites{{input.<id>}}to{{ $vars.<id> }}against flow scope, then fails its own lint with:The correct contract — verified end-to-end against
uip agent validate --inline-in-flowand a published flow in Studio Web — is to reference upstream flow nodes directly inagent.json messages[].content, with no bridge:Plus a previously-undocumented constraint:
contentTokens[].rawStringfor variable tokens must include leading and trailing spaces to match the spaced-brace{{ <expr> }}form incontent. Without them,uip agent validatefails with:Changes
skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md{{ $vars.<flowNodeId>.output[.<field>] }}form. Updated the worked example (email-trigger) to use emptyagentInputVariables: []andinputSchema.properties: {}. Rewrote the When the source field name is unknown subsection. Inverted the anti-patterns list (the old "Never write{{ $vars.X }}directly" rule was backwards; now the bans are{{input.X}}, bare{{plainName}}, omittedrawStringspaces, and populatedagentInputVariables[]/inputSchema.propertiesfor prompt-data wiring). Updated the JSON Structure note oninputs.agentInputVariables. Replaced the literal-{{X}}Debug row with three precise rows covering scope-lint,rawStringspacing, and literal-text symptoms — each citing the exact empirical error string.skills/uipath-maestro-flow/references/shared/node-output-wiring.md=js:field reference table to teach{{ $vars.<flowNodeId>.output[.<field>] }}+ spacedrawStringinstead of the bridge form.skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.mdinputSchema.propertiesandmessages/contentTokensbullets in Step 3: Create agent.json to describe the canvas-form contract (no{{input.X}}slot declarations; onesimpleTexttoken per literal segment and onevariabletoken per{{ ... }}reference).Verification
End-to-end empirical confirmation against
alpha.uipath.com / popoc / DefaultTenant:uip agent validatepassed, but Studio Web showedPrompt references "$vars.hnHits" but that variable is not available in this scope.{{ $vars.extractHits1.output.hnHits }}with emptyagentInputVariables: []/inputSchema.properties: {}—uip agent validatefirst failed on unspacedrawString, then passed once leading/trailing spaces were added insiderawString. Studio Web accepted the flow.{{input.<id>}}/ "four-place" / "input bridge" references — all remaining matches are either anti-pattern citations (warning against the bad form) or unrelated JSON skeletons withagentInputVariables: [].What this PR does NOT change
agentInputVariables: []— that's correct under the new contract and unchanged.agentInputVariables[]orinputSchema.properties.<id>. The new docs constrain themselves to prompt-only flow-data references, which is what was verified.uip agent migrate --inline-in-flowanduip solution uploadbehavior is unchanged — only the authoring contract is corrected.