Skip to content

fix(uipath-agents): install the framework package before codedagent new and verify the scaffold - #3165

Open
vldcmp-uipath wants to merge 8 commits into
mainfrom
claude/uipath-coded-agent-tests-w1vsc2
Open

vldcmp-uipath wants to merge 8 commits into
mainfrom
claude/uipath-coded-agent-tests-w1vsc2

Conversation

@vldcmp-uipath

@vldcmp-uipath vldcmp-uipath commented Sep 9, 2026

Copy link
Copy Markdown

Why

UiPath/uipath-python#1886 (with UiPath/uipath-langchain-python#1069) gives uipath new an explicit --type auto|agent|function. The default is auto, which keeps the existing behavior: the framework package installed in the active venv selects the agent template, and with none installed the result is a Coded Function scaffold (uipath.json with a functions map, no <framework>.json). --type agent turns the missing-package case into an error and resolves the framework from the installed integration; --type function forces a function.

So uip codedagent new <name> stays flag-free in the skills. What the skills got wrong is the ordering and the missing check: the quickstart Setup row ran uv add <framework-package> after new, so auto found no framework and produced a function scaffold, and nothing told the agent to look. Running the unmodified skill against builds of the two Python PRs, every LangGraph task hit the function scaffold first and recovered by improvising (one hand-wrote langgraph.json, two dug through uipath new --help).

What changed

uipath-agents

  • SKILL.md: the greenfield rule says to install the framework package first, scaffold with a bare uip codedagent new <name>, and confirm <framework>.json exists; the Coded Function detection rule excludes a functions map the agent itself just produced without the package installed (mis-scaffold, not a function).
  • references/coded/lifecycle/setup.md: Framework Selection explains --type auto, that exactly one framework package must be installed before new, and names the explicit --type overrides once without using them; new Verify the Scaffold section with four outcomes: <framework>.json present → continue; functions map without it → package missing, install it, delete the three generated files, re-run new; The '<package>' package is required to scaffold a '<framework>' agent → same cause, reported by a CLI that forwards --type agent (UiPath/cli#4126), nothing generated, install and re-run; Multiple agent frameworks are installed → keep one. Matching troubleshooting rows. The Coded Function section names it as the auto fallback when no framework package is installed.
  • references/coded/quickstart.md: new Critical Rule (install first, verify after); Setup stage row moves the framework install before new and uses uv pip install; Scenario 2 gains the verification note.
  • references/coded/frameworks/{langgraph,llamaindex,openai-agents}-integration.md: prerequisite note says the installed package selects the template and links to setup.md § Verify the Scaffold for recovery.
  • references/coded/embedding-in-flows.md: framework install comment fixed (uipath-langchain, not uipath); verification note; the "simple stub" alternative is the auto fallback with only uipath installed. lifecycle/build.md: check <framework>.json before cleaning main.py.

No changes to uipath-functions, preview/uipath-maestro-flow, or task YAMLs. The uip\s+codedagent\s+new patterns are untouched.

Validation

  • npm run skills:validate (default + studioweb), npm run skills:check-links (6719 links), hooks/validate-skill-descriptions.sh: clean.
  • Probes against wheels built from the current heads of the two Python PRs (uipath 2.14.14, uipath-langchain 0.17.6): with uipath-langchain installed, uipath new and uipath new --type agent both write langgraph.json; --type function writes the function scaffold; with no framework package, uipath new writes the function scaffold and uipath new --type agent (also through uip codedagent) stops with The 'uipath-langchain' package is required to scaffold a 'langchain' agent, nothing written — the two recovery paths documented in § Verify the Scaffold.
  • coder-eval run of tasks/uipath-agents/coded/conversational_agent_langgraph (claude-code / claude-sonnet-5, experiments/default.yaml, agent venv on the PR-head wheels) against an earlier revision of this branch: SUCCESS 1.0, 37 visible / 38 SDK turns, 206 s, versus main at 45 / 46 turns, 599 s (main recovered through a --help detour and a re-scaffold; smoke.yaml caps max_turns at 40, so main's 46 would be cut off). That revision passed explicit flags; the current one relies on the package being installed first, which is the same happy path, but it has not been re-run.

Notes

  • The skills send no new option, so they work unchanged on older uipath cores, on today's uip (verbatim forwarding, auto), and on a uip that appends --type agent (UiPath/cli#4126): in both CLI cases the installed framework package selects the template.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82

`uipath new` now defaults to `--type function`; an installed framework
package no longer selects the agent scaffold, so `uip codedagent new <name>`
alone produces a Coded Function project (`uipath.json` functions map, no
`<framework>.json`). Agents following the skill wasted turns recovering.

- Scaffold with `uip codedagent new <name> --type agent --agent-framework
  <langchain|llamaindex|openai-agents>` everywhere the skill writes the command
  (SKILL.md hard rule, quickstart stage table and Scenario 2, setup workflow,
  the three framework guides, embedding-in-flows, agent-patterns, build,
  creating-evaluations, preview maestro-flow agent reference).
- setup.md: framework table gains the `--agent-framework` value; new
  "Verify the Scaffold" section covers the function-scaffold and
  `No such option '--type'` (older core) fallbacks; two troubleshooting rows.
- SKILL.md: the Coded Function detection rule excludes a `functions` map the
  agent itself just produced by omitting `--type agent`.
- uipath-functions: `uip function new -l py` is now a function scaffold by
  default; the framework hijack is documented as older-package behaviour.
- quickstart stage table aligned with setup.md (`uv pip install`, not
  `uv add`, for the framework package).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @vldcmp-uipath's task in 2m 44s —— View job


PR Review: fix(uipath-agents): require --type agent for codedagent new scaffolds

  • Gather context and read review criteria
  • Read full diff and all changed files
  • Verify relative links in changed markdown files
  • Check for cross-skill references, secrets, consistency
  • Post review findings

Summary

Upstream CLI changes (uipath-python#1886, uipath-langchain-python#1069) make uipath new default to --type function, so uip codedagent new <name> without --type agent --agent-framework <framework> now produces a Coded Function scaffold instead of an agent scaffold. This PR updates 13 files across uipath-agents, uipath-functions, and preview/uipath-maestro-flow to require the new flags, add a "Verify the Scaffold" recovery section, and document fallback for older CLIs that don't support --type.

Change-by-Change Review

1. skills/uipath-agents/SKILL.md

OK

Two targeted edits: the greenfield scaffold rule now includes the full --type agent --agent-framework invocation, and the Coded Function detection rule (item 1) adds an exception for self-produced function scaffolds (mis-scaffold recovery rather than handing off to uipath-functions). Both are correct and well-scoped. The recovery pointer to setup.md § Verify the Scaffold avoids duplicating the steps inline.

2. skills/uipath-agents/references/coded/lifecycle/setup.md

OK

The most substantial change. The "Framework Selection" paragraph and table now include the <AGENT_FRAMEWORK> column. New "Verify the Scaffold" section (3 numbered items) is clear, prescriptive, and covers the three outcomes: success, function scaffold, old CLI. Two new troubleshooting rows match. The "Coded Function Agents" section clarifies the default. The <framework>.json note in the Generated Files table is accurate.

3. skills/uipath-agents/references/coded/quickstart.md

OK

New Critical Rule for --type agent with compact recovery + pointer to setup.md. Setup stage row in the Lifecycle table reordered to match the correct sequence (uv pip install before setup). Scenario 2 scaffold block and verification note updated consistently.

4. skills/uipath-agents/references/coded/frameworks/langgraph-integration.md

OK

Scaffold command updated. Prerequisite blockquote rewritten with both-flags requirement, recovery steps, and old-CLI fallback.

5. skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md

OK

Same pattern as langgraph — scaffold command + prerequisite blockquote updated.

6. skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md

OK

Same pattern as langgraph — scaffold command + prerequisite blockquote updated.

7. skills/uipath-agents/references/coded/frameworks/agent-patterns.md

OK

One-line update to the scaffold pointer — flags added to the bullet text.

8. skills/uipath-agents/references/coded/lifecycle/build.md

OK

"Clean generated scaffold code" rule now gates on <framework>.json existence check before proceeding to main.py inspection. Correct ordering.

9. skills/uipath-agents/references/coded/lifecycle/evaluations/creating-evaluations.md

OK

One-line update: "create an agent first using uip codedagent new <name> --type agent --agent-framework <framework>". Minimal, correct.

10. skills/uipath-agents/references/coded/embedding-in-flows.md

OK

Scaffold block updated with flags. New verification sentence after the block. The Coded Function alternative paragraph is rewritten to clarify that omitting --type agent intentionally produces a function scaffold. Comment change (e.g. uipath for Coded Functione.g. uipath-langchain for LangGraph) is correct.

11. skills/uipath-functions/SKILL.md

OK

Rule 6 rewritten: uip function new -l py now produces a function scaffold by default; the old framework-hijack behavior is documented as an older-package edge case with the existing reshape recovery preserved. Quick Start comment updated.

12. skills/uipath-functions/references/python/workflow-guide.md

OK

Step 1 prose updated to match the new default behavior — function scaffold is expected, agent scaffold is the older-package exception. Recovery instructions unchanged.

13. preview/skills/uipath-maestro-flow/references/agent.md

OK

Sibling-agent scaffold command in the bash block gains --type agent --agent-framework <agent-framework> with a trailing comment listing valid values. Minimal, correct.

What's Missing

Medium — Recovery instructions duplicated across framework files. The full "delete files and re-run with flags / old-CLI fallback" recovery is now repeated nearly verbatim in langgraph-integration.md:16, llamaindex-integration.md:16, openai-agents-integration.md:20, quickstart.md:37, and is authoritative in setup.md:49-55. This is 5 copies of the same multi-sentence recovery procedure. Per the repo's Reference Pointer Discipline, each framework file's prerequisite blockquote could instead state the two requirements (package + flags) and point to setup.md § Verify the Scaffold for recovery — one bridging sentence + link, matching what SKILL.md and build.md already do. Not blocking, but worth a follow-up to reduce drift surface.

Area Ratings

Area Status Notes
Frontmatter OK No frontmatter changes; existing frontmatter valid
E2E Tests OK No test changes needed — existing command_pattern: 'uip\s+codedagent\s+new' regexes match with appended flags; PR description includes a passing coder-eval run showing 3× speedup (206s vs 599s)
Skill Body OK Rules, detection, and scaffold commands all updated consistently
References & Assets OK All relative links verified — every target file exists. No broken links
Repo Hygiene OK No secrets, no personal paths, no cross-skill imports. Changes scoped to the three affected skills. No new skill folders, so no CODEOWNERS / skills.sh.json / skill-status.json edits needed

Issues for Manual Review

  • Upstream availability: The PR notes that PyPI's uipath 2.14.13 and uipath-langchain 0.17.5 (shipped 2026-09-09) do not yet include the --type flag. The skill's No such option '--type' fallback (item 3 in "Verify the Scaffold") handles this, but reviewers should confirm the fallback path is actually tested in CI once the flag ships.
  • uipath-llamaindex / uipath-openai-agents companion PRs: The PR description notes these packages don't have companion PRs yet. The flags are safe today (legacy middleware still claims the scaffold), but the --agent-framework llamaindex and --agent-framework openai-agents values should be verified against those packages once they update.

Conclusion

Clean, well-scoped PR that correctly addresses a real scaffold regression. All 13 files are internally consistent, the old-CLI fallback is documented, links resolve, and existing test patterns still match. The one Medium observation (recovery prose duplication across framework files) is non-blocking and could be addressed in a follow-up. Approve.

…rwards it

`uip codedagent new` now appends `--type agent` itself (UiPath/cli#4126)
and `uip function new -l py` appends `--type function`. Skills pass only
`--agent-framework <langchain|llamaindex|openai-agents>` and never `--type`.

- Verify the Scaffold: a function scaffold now points at an outdated
  @uipath/cli or a missing framework package (upgrade / install, delete,
  re-run); `No such option` means the venv's uipath core predates the
  option (upgrade the core) instead of "re-run without flags".
- Framework guides: prerequisite notes state the requirement and link to
  setup.md § Verify the Scaffold instead of repeating the recovery steps.
- Coded Function project in setup.md / embedding-in-flows: scaffold with
  `uip function new -l py`; `uip codedagent new` always yields an agent.
- uipath-functions: rule 6 and workflow-guide Step 1 describe the CLI
  forwarding `--type function`, plus the `No such option` recovery.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
@vldcmp-uipath vldcmp-uipath changed the title fix(uipath-agents): require --type agent for codedagent new scaffolds fix(uipath-agents): scaffold coded agents with --agent-framework; the CLI owns --type Sep 10, 2026
uipath-python now defaults `uipath new` to `--type auto`, restoring the
behavior where the framework package installed in the venv selects the
agent scaffold; `--type agent --agent-framework <fw>` and `--type function`
are explicit overrides. The skills go back to a bare `uip codedagent new`
with no flags, install the framework package before `new` (the quickstart
Setup row used to `uv add` it afterwards), and keep the scaffold
verification step: a `functions` map with no `<framework>.json` means the
package was missing — install it, delete the generated files, re-run `new`.

uipath-functions and maestro-flow text restored to main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
@vldcmp-uipath vldcmp-uipath changed the title fix(uipath-agents): scaffold coded agents with --agent-framework; the CLI owns --type fix(uipath-agents): install the framework package before codedagent new and verify the scaffold Sep 10, 2026
vldcmp-uipath and others added 5 commits September 10, 2026 14:31
…caffold

With `uip codedagent new` forwarding `--type agent`, a missing framework
package is reported by `uipath new` ("The '<package>' package is required
to scaffold a '<framework>' agent") instead of silently producing a
function scaffold. Add that outcome and the multiple-frameworks error to
setup.md § Verify the Scaffold and the troubleshooting table.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
…-type agent

uipath-python no longer defaults --type agent to langchain; with no
framework package installed it now stops with "No agent framework
integration is installed" and lists the packages. Add that message next to
the explicit-framework variant in Verify the Scaffold and the
troubleshooting table.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
…ware

`uip function new -l py` will forward `--type function` to `uipath new`
(UiPath/cli#4126), so the function scaffold becomes the expected result
even with an agent framework installed. The skill still described the
agent hijack as the norm. State the function scaffold as the expectation,
keep the hijack (and the existing reshape recovery) for an older `uip`
that does not forward the flag or an older venv `uipath` that does not
accept it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
`uipath new` ships no `--agent-framework` option: the core takes the
framework from whichever integration package is installed, and fails when
several are (UiPath/uipath-python#1886). Framework Selection still told
readers the flag existed, which would have them type an option the
command rejects. State the two type values that do exist, note that the
framework cannot be named on the command line, and record the
several-installed failure so "install exactly one" reads as a
requirement rather than a preference.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82
`uip codedagent new` forwards `--type agent` to `uipath new` whenever the
installed `uipath` accepts the option (UiPath/cli#4126), so the scaffold
follows the command instead of the installed packages. Two consequences
for this skill:

- A missing framework package is now an error naming what to install,
  where `--type auto` used to produce a Coded Function project under the
  agent command and say nothing. Framework Selection and the quickstart
  rule lead with that, and keep the old symptom for an older `uip` or
  `uipath`, which still decide by `auto`.
- A Coded Function agent has to be asked for: `new --type function`. The
  flow-embedding stub, which deliberately uses the `uipath` package alone,
  passes it. Both spots say what to do when a venv `uipath` predates the
  option and rejects the flag — drop it, and with no framework package
  installed the result is the same project.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VqfFdgnQFGJ8EPGXn6HC82

This branch has not been deployed

No deployments
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.

2 participants