Skip to content

docs(uipath-maestro-flow): inline-agent prompt token + trigger-input wiring#1656

Open
jiyangzh wants to merge 2 commits into
mainfrom
docs/inline-agent-prompt-wiring
Open

docs(uipath-maestro-flow): inline-agent prompt token + trigger-input wiring#1656
jiyangzh wants to merge 2 commits into
mainfrom
docs/inline-agent-prompt-wiring

Conversation

@jiyangzh

Copy link
Copy Markdown
Contributor

Why

Inline-agent flows that wire flow data into the agent prompt were failing two ways that uip maestro flow validate does not catch — both surfaced only at flow debug. Found while running the skill-flow-devcon-billing-dispute-analyst eval against uip 1.197.0.

What

1. contentcontentTokens mirror invariant (inline-agent/impl.md)
uip agent refresh reconstructs content from contentTokens and requires a byte-exact match. The docs described the format but not the invariant, so the agent looped between braces-in-content vs braces-in-rawString, used "text" instead of "simpleText", and burned the whole turn to a timeout. Added:

  • the explicit construction rule (simpleText vs variable; braces only in content; brace-free rawString; whitespace-exact reconstruction check)
  • a worked decomposition
  • the three validator-error strings it produces, mapped to fixes in the Debug table

2. Trigger-input declaration prerequisite (inline-agent/impl.md)
A {{ $vars.start.output.<field> }} token only resolves if the field is declared as a trigger-associated in global (direction:"in", triggerNodeId). Validate passes regardless; debug faults with the literal token text reaching the LLM and empty JobArguments. Added the prerequisite to the wiring section plus a symptom→fix Debug row, and the matching out-global / End-node mapping note.

3. Mirror into uipath-agents (inline-in-flow.md)
Strengthened the contentTokens bullet in the source-of-truth file so both entry points carry the invariant.

Scope

Docs only — no behavior/code. Coder-eval changes are intentionally excluded from this PR (still iterating on the grader).

Verification

The eval went ERROR (timeout) → SUCCESS after these two doc fixes landed; the agent built and ran the flow end-to-end with no schema thrash and resolved trigger inputs.

…er-input wiring

Inline-agent flows that reference flow data in the agent prompt were failing
two ways that `flow validate` does not catch, surfacing only at `flow debug`:

1. content/contentTokens schema thrash. `uip agent refresh` reconstructs
   `content` from `contentTokens` and requires a byte-exact match. The docs
   described the format but not the invariant, so the agent looped between
   braces-in-content vs braces-in-rawString and used "text" instead of
   "simpleText" — burning the turn to timeout. Add the explicit mirror
   invariant (simpleText vs variable, braces only in content, brace-free
   rawString, whitespace-exact reconstruction) with a worked decomposition and
   the three validator-error strings it produces.

2. Undeclared trigger inputs. A `{{ $vars.start.output.<field> }}` token only
   resolves if the field is declared as a trigger-associated `in` global
   (direction:"in", triggerNodeId). Validate passes regardless; debug faults
   with the literal token text reaching the LLM and empty JobArguments. Add the
   prerequisite to the wiring section plus a symptom->fix Debug row.

Mirror the contentTokens guidance into the uipath-agents inline-in-flow
source-of-truth file so both entry points carry it.
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jiyangzh's task in 2m 17s —— View job


PR Review: #1656

Summary

Documents two failure modes in inline-agent prompt wiring that flow validate misses but flow debug surfaces: (1) the contentcontentTokens byte-exact mirror invariant (wrong token type, braces in rawString), and (2) the trigger-input variable declaration prerequisite. Adds a new invariant section with worked decomposition, maps three validator errors + one debug fault to fixes in the Debug table, and mirrors the key rule into the uipath-agents entry point.

Change-by-Change Review

1. skills/uipath-maestro-flow/references/author/references/plugins/inline-agent/impl.md

Severity: OK

The bulk of the PR — 42 lines added. Changes fall into three groups:

a. Trigger-input prerequisite (lines 45–51): Clearly explains why $vars.start.output.<field> silently fails — flow validate doesn't check it, debug faults with literal token text and empty JobArguments. The JSON example and link to variables-and-expressions.md are correct. The out-global / End-node mapping note is included. Links verified:

  • ../../../../shared/variables-and-expressions.md → resolves to references/shared/variables-and-expressions.md
  • ../../editing-operations-json.md → resolves ✓

b. Mirror invariant section (lines 62–90): Well-structured — numbered construction rules, a worked decomposition with JSON, and the reconstruction-check algorithm an agent can follow mechanically. The three bullet-pointed error messages map cleanly to mistakes. This addresses the exact failure mode described in the PR body (agent looping between braces-in-content vs braces-in-rawString).

c. Debug table additions (lines 457–461): Four new rows added to the existing table — three for agent refresh validator errors and one for the trigger-input debug fault. All follow the existing Error | Cause | Fix pattern and cross-reference the new sections with See § links.

One minor note: the sentence at line 86 says "Two validator failures" but then lists three bullets. The first bullet is the simpleText/text type mismatch, the next two are the brace-placement pair. The "two" likely refers to the two directions of the brace invariant break, with the type error as a separate common mistake. Technically accurate but could read as inconsistent on first pass. Low — cosmetic.

2. skills/uipath-agents/references/lowcode/capabilities/inline-in-flow/inline-in-flow.md

Severity: Medium — Reference Pointer Discipline

The change at line 77 appends the invariant summary and a cross-skill link to the contentTokens bullet. The link itself is correct and follows the pre-existing pattern from line 76. However, the added text goes beyond bridge content — it restates three specific rules from the invariant (simpleText not "text", rawString is brace-free, braces stay in content) that the linked impl.md section already covers in full. Per Reference Pointer Discipline (.github/code_review.md), overlap beyond a single bridging sentence risks drift.

Suggested fix: Trim the bullet to the bridging sentence + link. Something like:

...per {{ ... }} reference. **uip agent refreshreconstructscontentfrom these tokens and requires a byte-exact match** — construct both deterministically from the invariant rule; don't guess one against the other. Full invariant + validator error signatures: theuipath-maestro-flow skill's [inline-agent prompt-wiring guide § The content ↔ contentTokens mirror invariant](...).

This keeps the "byte-exact match" warning (which is the bridge — tells the agent this matters before they click through) while removing the restated construction rules that belong in the authoritative source.

What's Missing

  • Existing cross-skill references: The uipath-agents file already had cross-skill links to uipath-maestro-flow before this PR (line 76). This PR extends that pattern but didn't introduce it. Not flagged as a new issue, but worth noting for a future cleanup pass — skills should be self-contained per repo conventions.
  • Nothing else identified.

Area Ratings

Area Status Notes
Frontmatter OK No frontmatter changes
E2E Tests OK Docs-only change to existing skill; no new CLI workflows introduced
Skill Body OK Additions are within the reference file, not SKILL.md
References & Assets Medium inline-in-flow.md restates invariant rules beyond bridge content
Repo Hygiene OK No secrets, no CODEOWNERS impact, scoped changes

Issues for Manual Review

  • Domain accuracy of validator error strings: The three error messages (Expected type "simpleText" but got "text", Expected " $vars.X " but got " {{ $vars.X }} ", contentTokens has N entries but content requires 1) should be verified against the actual uip agent refresh output for the current CLI version. Docs claim these are the exact strings — if they're paraphrased rather than literal, an agent pattern-matching on them would fail to recognize the error.
  • "Two validator failures" vs three bullets (impl.md line 86): Minor wording inconsistency — verify intent.

Conclusion

Clean, high-value documentation fix addressing real agent failure modes found during eval. The impl.md changes are well-structured and follow existing conventions. One Medium finding on Reference Pointer Discipline in inline-in-flow.md where the invariant summary restates rules that belong only in the authoritative source — recommend trimming to bridge-only. Otherwise, approve.


The inline-agent docs taught a broken model — author inputSchema {}, put
{{ $vars… }} in agent.json prompts, and 'refresh derives inputSchema'.
Verified false: uip agent refresh has no derivation (passes agent.json
through as-is), the runtime resolves {{input.<key>}} not $vars, and an
empty inputSchema makes the agent receive the literal token at runtime
even when JobArguments delivers the value.

Corrected to the form proven through agent validate + flow validate +
flow debug (agent answered the real input, not the token):
- delivery: node inputs.agentInputVariables[] (binding =$vars.<trig>.output.<var>)
- contract: agent.json inputSchema.properties has a <trig>__output__<var> key (mandatory)
- resolution: agent.json messages[].content uses {{input.<trig>__output__<var>}}
- nothing auto-derives; verify at flow debug, not after refresh

Updates inline-in-flow.md + impl.md (directive, table, content/contentTokens
invariant, worked example, anti-patterns, troubleshooting).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant