diff --git a/skills/uipath-agents/SKILL.md b/skills/uipath-agents/SKILL.md index 09d58997a5..f0c9d759cc 100644 --- a/skills/uipath-agents/SKILL.md +++ b/skills/uipath-agents/SKILL.md @@ -15,7 +15,7 @@ user-invocable: true - **Probe the `solution` verb once per session before the first scaffold or deploy.** Run `uip solution init --help --output json`. Result `Success` → use `solution init` and `solution deploy run --parent-folder-path` / `--parent-folder-key` (post-rename, default). `unknown command` / non-zero exit → CLI predates the rename; substitute `uip solution new ` and `--folder-path` / `--folder-key` (same arguments otherwise) wherever this skill calls those. -- **Greenfield coded agents — scaffold with `uip codedagent new`, never hand-author the project.** Building a NEW coded agent from scratch: always create it with `uip codedagent new `, then generate schemas with `uip codedagent init` — never hand-write `pyproject.toml` / `main.py` / `langgraph.json` / `entry-points.json` yourself, even for a trivial agent. Hand-authoring skips required project structure and produces invalid packages. (Existing or Studio Web local-workspace projects: do NOT run `uip codedagent new` — follow the project-state gating in [coded/quickstart.md](references/coded/quickstart.md).) +- **Greenfield coded agents — scaffold with `uip codedagent new`, never hand-author the project.** Building a NEW coded agent from scratch: install the framework package in the active venv first, then always create the project with `uip codedagent new ` and generate schemas with `uip codedagent init` — never hand-write `pyproject.toml` / `main.py` / `langgraph.json` / `entry-points.json` yourself, even for a trivial agent. Hand-authoring skips required project structure and produces invalid packages. The installed framework package selects the scaffold; after `new`, confirm `.json` exists — recovery is in [coded/lifecycle/setup.md](references/coded/lifecycle/setup.md) § Verify the Scaffold. (Existing or Studio Web local-workspace projects: do NOT run `uip codedagent new` — follow the project-state gating in [coded/quickstart.md](references/coded/quickstart.md).) - **Coded agents only — bindings are always derived from UiPath Python SDK calls and must never be hand-authored.** To derive them, always run the sync workflow in [coded/lifecycle/bindings-reference.md](references/coded/lifecycle/bindings-reference.md) — scan code, regenerate `bindings.json`. Without this, resources cannot be overridden per execution environment and will always default to the hardcoded values in the SDK calls. Derive bindings whenever you add, remove, or modify any UiPath SDK resource call — for instance `assets`, `queues`, `processes`, `buckets`, `indexes`, `connections`, `apps`, `MCP servers`, or `InvokeProcess|CreateTask|CreateEscalation(...)`. ## Project Type Detection diff --git a/skills/uipath-agents/references/coded-vs-lowcode-guide.md b/skills/uipath-agents/references/coded-vs-lowcode-guide.md index d45927b3b3..45401dee78 100644 --- a/skills/uipath-agents/references/coded-vs-lowcode-guide.md +++ b/skills/uipath-agents/references/coded-vs-lowcode-guide.md @@ -33,7 +33,7 @@ Reference for comparing **coded** (Python) and **low-code** (agent.json) agents. | Language | Python | Declarative JSON (`agent.json`) | | CLI | `uip codedagent` | `uip agent` + `uip solution` | | Project marker | `pyproject.toml` + `.py` files | `agent.json` + `project.uiproj` | -| Frameworks | LangGraph, LlamaIndex, OpenAI Agents, Coded Function | None (prompt + tools config) | +| Frameworks | LangGraph, LlamaIndex, OpenAI Agents | None (prompt + tools config) | | Deployment | `uip codedagent deploy` | `uip solution pack/publish/deploy` | | Local testing | `uip codedagent run` | Studio Web only | | Evaluations | `uip codedagent eval` (13 evaluator types) | Not available | diff --git a/skills/uipath-agents/references/coded/capabilities/conversational-agents.md b/skills/uipath-agents/references/coded/capabilities/conversational-agents.md index 8aee984ce0..dc6a56fa16 100644 --- a/skills/uipath-agents/references/coded/capabilities/conversational-agents.md +++ b/skills/uipath-agents/references/coded/capabilities/conversational-agents.md @@ -4,7 +4,7 @@ Chat-style coded agents where the UiPath runtime feeds **one message per turn** and threads history across turns. -Supported on **LangGraph** and **LlamaIndex**. Coded Function and OpenAI Agents are not conversational. +Supported on **LangGraph** and **LlamaIndex**. OpenAI Agents is not conversational. ## Contract (framework-agnostic) diff --git a/skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md b/skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md index 94eddb588c..a6c2456fcd 100644 --- a/skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md +++ b/skills/uipath-agents/references/coded/capabilities/human-in-the-loop.md @@ -21,7 +21,7 @@ If the user has not named one, your ENTIRE response must be a question that list **Task vs Escalation is decided by the request's wording, not by preference — for both the create pair and the wait pair.** "Escalate" / "escalation" / must act on the approve-reject decision → `CreateEscalation` / `WaitEscalation`. "Review task" / "sign-off" / "not an escalation" / only carry the reviewer's input forward → `CreateTask` / `WaitTask`. Never substitute one for the other: they resume with different payloads (see § Escalation Variant). -OpenAI Agents has no first-class HITL support. Coded Function (no framework) has no checkpoint/resume — call `sdk.tasks.create()` then `sdk.tasks.retrieve()` synchronously if a synchronous human step is needed. +OpenAI Agents has no first-class HITL support — call `sdk.tasks.create()` then `sdk.tasks.retrieve()` synchronously if a synchronous human step is needed. LangGraph models live in `uipath.platform.common`; LlamaIndex events live in `uipath_llamaindex.models.events`. diff --git a/skills/uipath-agents/references/coded/embedding-in-flows.md b/skills/uipath-agents/references/coded/embedding-in-flows.md index d0a7881766..aa5e016462 100644 --- a/skills/uipath-agents/references/coded/embedding-in-flows.md +++ b/skills/uipath-agents/references/coded/embedding-in-flows.md @@ -56,15 +56,13 @@ If the solution and flow project don't yet exist, run `uip solution init " uv venv --python 3.13 source .venv/bin/activate # .venv/Scripts/activate on Windows - uv pip install # e.g. uipath for Coded Function + uv pip install # e.g. uipath-langchain for LangGraph uip codedagent setup --force uip codedagent new uv sync ``` - For a simple stub with no LLM call, use the Coded Function framework - (`uipath` package). This avoids downloading the full LangGraph or - LlamaIndex stack and keeps the setup fast. + Confirm `.json` exists before continuing (see [lifecycle/setup.md](lifecycle/setup.md) § Verify the Scaffold). 2. Implement `main.py`. Use lazy LLM initialization (create clients inside functions, never at module level). diff --git a/skills/uipath-agents/references/coded/frameworks/agent-patterns.md b/skills/uipath-agents/references/coded/frameworks/agent-patterns.md index 4428e65727..c1aca7a563 100644 --- a/skills/uipath-agents/references/coded/frameworks/agent-patterns.md +++ b/skills/uipath-agents/references/coded/frameworks/agent-patterns.md @@ -1,6 +1,6 @@ # Agent Patterns -Common implementation patterns for building UiPath coded agents, from coded functions to multi-agent orchestrations. +Common implementation patterns for building UiPath coded agents, from single-node graphs to multi-agent orchestrations. > **Note:** These patterns are general architectural concepts. The code examples use **LangGraph** and the **UiPath Python SDK**. The same patterns apply to LlamaIndex and OpenAI Agents — see their respective integration references. @@ -117,7 +117,7 @@ async def main(input: Input) -> Output: Multi-step agent using LangGraph's `StateGraph` with nodes, edges, and conditional routing. Supports LLM-powered decisions. -> **Important:** LangGraph agents require `uipath-langchain` as a dependency and use a different project structure than coded function agents. See the LangGraph integration reference for project setup, `langgraph.json` configuration, and troubleshooting. +> **Important:** LangGraph agents require `uipath-langchain` as a dependency. See the LangGraph integration reference for project setup, `langgraph.json` configuration, and troubleshooting. **When to use:** Classification workflows, multi-step reasoning, conditional branching based on LLM output. diff --git a/skills/uipath-agents/references/coded/frameworks/langgraph-integration.md b/skills/uipath-agents/references/coded/frameworks/langgraph-integration.md index 9ff1389f03..d077ffeeb2 100644 --- a/skills/uipath-agents/references/coded/frameworks/langgraph-integration.md +++ b/skills/uipath-agents/references/coded/frameworks/langgraph-integration.md @@ -13,11 +13,11 @@ uip codedagent new my-agent This generates `main.py` (with a StateGraph template), `langgraph.json`, and `pyproject.toml`. Then modify `main.py` to implement your actual agent logic. -> **Prerequisite:** `uipath-langchain` must be installed for the LangGraph template to be used. If you get a base template instead, install `uipath-langchain` first. +> **Prerequisite:** `uipath-langchain` must be installed in the active venv before `new` — the installed package selects the LangGraph template. Confirm `langgraph.json` exists after `new` (see [../lifecycle/setup.md](../lifecycle/setup.md) § Verify the Scaffold). ## Project Structure -LangGraph agents use a **different structure** from coded function agents. There are two supported patterns: +There are two supported project structures: ### Pattern A: `langgraph.json` (Recommended for LangGraph) diff --git a/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md b/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md index 9fe0f47f40..eeffdce825 100644 --- a/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md +++ b/skills/uipath-agents/references/coded/frameworks/llamaindex-integration.md @@ -13,7 +13,7 @@ uip codedagent new my-agent This generates `main.py` (with a Workflow template), `llama_index.json`, and `pyproject.toml`. Then modify `main.py` to implement your actual agent logic. -> **Prerequisite:** `uipath-llamaindex` must be installed for the LlamaIndex template to be used. +> **Prerequisite:** `uipath-llamaindex` must be installed in the active venv before `new` — the installed package selects the LlamaIndex template. Confirm `llama_index.json` exists after `new` (see [../lifecycle/setup.md](../lifecycle/setup.md) § Verify the Scaffold). ## Project Structure diff --git a/skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md b/skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md index b027bd0a18..b818685474 100644 --- a/skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md +++ b/skills/uipath-agents/references/coded/frameworks/openai-agents-integration.md @@ -17,7 +17,7 @@ uip codedagent new my-agent This generates `main.py` (with an Agent + tool template), `openai_agents.json`, `AGENTS.md`, and `pyproject.toml`. Then modify `main.py` to implement your actual agent logic. -> **Prerequisite:** `uipath-openai-agents` must be installed for the OpenAI Agents template to be used. +> **Prerequisite:** `uipath-openai-agents` must be installed in the active venv before `new` — the installed package selects the OpenAI Agents template. Confirm `openai_agents.json` exists after `new` (see [../lifecycle/setup.md](../lifecycle/setup.md) § Verify the Scaffold). ## Project Structure diff --git a/skills/uipath-agents/references/coded/lifecycle/build.md b/skills/uipath-agents/references/coded/lifecycle/build.md index fc770a1762..6328ec600b 100644 --- a/skills/uipath-agents/references/coded/lifecycle/build.md +++ b/skills/uipath-agents/references/coded/lifecycle/build.md @@ -20,7 +20,7 @@ Load capability references **only if the task requires them** — do not preload | Human approval / interrupt | `../capabilities/human-in-the-loop.md` | agent needs human-in-the-loop or pause/resume | | RAG / context grounding | `../capabilities/context-grounding.md` | agent searches organization documents | | Platform API calls | `../capabilities/sdk-services.md` | agent uses UiPath platform services directly | -| Tracing / monitoring | `../capabilities/tracing.md` | agent needs custom tracing (Coded Function only — LangGraph traces automatically) | +| Tracing / monitoring | `../capabilities/tracing.md` | agent needs custom tracing (LangGraph traces automatically) | | File attachments (input or created) | `../capabilities/file-attachments.md` | agent takes a file as input, or creates an attachment | | Conversational (chat-style) agents | `../capabilities/conversational-agents.md` | agent receives one message per turn; runtime threads history (LangGraph / LlamaIndex only) | @@ -28,7 +28,6 @@ Load capability references **only if the task requires them** — do not preload | Framework | Config File | Key Dependency | Entry Point | |-----------|------------|----------------|-------------| -| Coded Function | `uipath.json` | `uipath` | `main.py` function | | LangGraph | `langgraph.json` | `uipath-langchain` | `main.py` compiled StateGraph | | LlamaIndex | `llama_index.json` | `uipath-llamaindex` | `main.py` Workflow instance | | OpenAI Agents | `openai_agents.json` | `uipath-openai-agents` | `main.py` Agent instance | @@ -45,11 +44,11 @@ Load capability references **only if the task requires them** — do not preload ## Additional Instructions - **File/document input → `Attachment`, never a filesystem path string.** If the prompt says the agent "takes a CSV/PDF/file as input" (or similar), read `../capabilities/file-attachments.md` before defining the `Input` model. A `str` path field runs locally with `uip codedagent run` but breaks on Studio Web/Orchestrator, where no such path exists in the container. -- **Select a framework before writing any code.** Infer from the prompt if possible (tools/orchestration → LangGraph, RAG → LlamaIndex, simple LLM → OpenAI Agents, no LLM → Coded Function). If ambiguous, ask the user to choose. -- **Structured input contract → not OpenAI Agents.** OpenAI Agents always require a `messages` input field and cannot express an input contract without it (see `../frameworks/openai-agents-integration.md` § Input). When the user needs a strict typed/structured input (e.g. a single named field, no `messages`), choose LangGraph (custom `StateGraph` with arbitrary input state) instead. Do NOT silently fall back to a Coded Function to satisfy the input shape — a Coded Function produces `ProjectType: Function`, not a coded agent, so it does not fulfill a request for an agent. +- **Select a framework before writing any code.** Infer from the prompt if possible (tools/orchestration → LangGraph, RAG → LlamaIndex, simple LLM → OpenAI Agents). No LLM at all → not an agent; use [`uipath-functions`](/uipath:uipath-functions). If ambiguous, ask the user to choose. +- **Structured input contract → not OpenAI Agents.** OpenAI Agents always require a `messages` input field and cannot express an input contract without it (see `../frameworks/openai-agents-integration.md` § Input). When the user needs a strict typed/structured input (e.g. a single named field, no `messages`), choose LangGraph (custom `StateGraph` with arbitrary input state) instead. Do NOT satisfy the input shape with `uip function new` — a Coded Function produces `ProjectType: Function`, not a coded agent, so it does not fulfill a request for an agent. - **Read ONLY the single framework reference** for the selected framework before writing code. Do NOT read other framework references or capability references unless the task explicitly requires that capability. -- **Clean generated scaffold code before schema init.** After `uip codedagent new` and before running `uip codedagent init`, inspect `main.py` and remove scaffold hazards: no module-level `UiPathChat`, `UiPathAzureChatOpenAI`, `UiPath`, or other auth-dependent clients; instantiate LLM/SDK clients inside graph nodes/functions only; ensure importing `main.py` works without UiPath auth. +- **Clean generated scaffold code before schema init.** After `uip codedagent new` and before running `uip codedagent init`, first confirm `.json` exists (see [setup.md](setup.md) § Verify the Scaffold), then inspect `main.py` and remove scaffold hazards: no module-level `UiPathChat`, `UiPathAzureChatOpenAI`, `UiPath`, or other auth-dependent clients; instantiate LLM/SDK clients inside graph nodes/functions only; ensure importing `main.py` works without UiPath auth. - **NEVER instantiate LLM clients or SDK clients at module level.** `uip codedagent init` imports your Python file to introspect schemas — module-level `UiPathAzureChatOpenAI()`, `UiPathChat()`, `UiPathChatOpenAI()`, or `UiPath()` will fail because auth may not have happened yet. Always create these instances inside functions or graph nodes, never at the top level of the module. - **Correct SDK import: `from uipath.platform import UiPath`** — not `from uipath import UiPath` (that does not exist). Instantiate inside functions only: `sdk = UiPath()`. - LangGraph agents get tracing automatically — no `@traced()` needed on graph nodes. -- Simple function agents require `@traced()` on the `main` function. +- LlamaIndex and OpenAI Agents entrypoints require `@traced()` where custom tracing is wanted. diff --git a/skills/uipath-agents/references/coded/lifecycle/running-agents.md b/skills/uipath-agents/references/coded/lifecycle/running-agents.md index bfea299a06..345038ff40 100644 --- a/skills/uipath-agents/references/coded/lifecycle/running-agents.md +++ b/skills/uipath-agents/references/coded/lifecycle/running-agents.md @@ -22,7 +22,6 @@ The entrypoint name comes from `entry-points.json` (e.g., `main`, `agent`) — n | Framework | Source of truth | Key in the file | |---|---|---| -| Coded Function | `uipath.json` | `functions` | | LangGraph | `langgraph.json` | `graphs` | | LlamaIndex | `llama_index.json` | `workflows` | | OpenAI Agents | `openai_agents.json` | `agents` | diff --git a/skills/uipath-agents/references/coded/lifecycle/setup.md b/skills/uipath-agents/references/coded/lifecycle/setup.md index 9839960b4b..670365f9c4 100644 --- a/skills/uipath-agents/references/coded/lifecycle/setup.md +++ b/skills/uipath-agents/references/coded/lifecycle/setup.md @@ -12,11 +12,13 @@ Windows PowerShell fresh-machine setup: `irm https://download.uipath.com/uipath- ## Framework Selection -Pick the framework before starting. The package installed in the Workflow determines which scaffold `uip codedagent new` produces. +Pick the framework before starting: the package installed in the active venv selects the agent template. Install `` before `new`, not after — with none installed, `new` fails with an error naming what to install. + +With several installed, name the one to scaffold with: `uip codedagent new --agent-framework `. Without it, `new` fails and lists them. | Agent Type | `` | Framework config | Guide | |---|---|---|---| -| LangGraph | `"uipath-langchain"` | `langgraph.json` | [langgraph-integration.md](../frameworks/langgraph-integration.md) | +| LangGraph | `uipath-langchain` | `langgraph.json` | [langgraph-integration.md](../frameworks/langgraph-integration.md) | | LlamaIndex | `uipath-llamaindex` | `llama_index.json` | [llamaindex-integration.md](../frameworks/llamaindex-integration.md) | | OpenAI Agents | `uipath-openai-agents` | `openai_agents.json` | [openai-agents-integration.md](../frameworks/openai-agents-integration.md) | @@ -38,6 +40,7 @@ source .venv/bin/activate # Windows: .venv\Scripts\activate uv pip install uip codedagent setup --force uip codedagent new +# verify: .json must exist — see § Verify the Scaffold uv add uipath-dev --dev # required by `uip codedagent dev` (local dev web server) uv sync uip codedagent init @@ -47,19 +50,13 @@ uip codedagent init **What `uip codedagent setup` does:** locates a Python that has `uipath` installed and caches its path, so later commands (`init`/`run`/`eval`/`pack`) can invoke the Python SDK. It searches PATH (`python3.x`, `python3`, `python`) and uses your `.venv` only when activated. So when using uv, always `uv sync` then activate the venv before the `setup` command. -## Coded Function Agents - -`uipath.json` carries the entrypoint mapping: +## Verify the Scaffold -```json -{ - "functions": { - "main": "main.py:main" - } -} -``` +After `uip codedagent new`, check the directory before running anything else: -Edit the scaffolded `main.py`'s `Input` / `Output` models and `async def main` to fit the real agent. +1. `.json` present (`langgraph.json` / `llama_index.json` / `openai_agents.json`) → continue. +2. `No agent framework integration is installed` (or `The '' package is required to scaffold a '' agent`) → nothing was generated. Fix: `uv pip install `, confirm `uip codedagent setup --force` reports the same venv, then re-run `uip codedagent new `. +3. `Multiple agent frameworks are installed` → re-run with `--agent-framework `, or keep exactly one in the venv (`uv pip uninstall` the others). ## Generated Files @@ -68,7 +65,7 @@ Edit the scaffolded `main.py`'s `Input` / `Output` models and `async def main` t | `pyproject.toml` | Project metadata and dependencies | | `main.py` | Agent entrypoint | | `.json` | Framework config (LangGraph / LlamaIndex / OpenAI Agents) | -| `uipath.json` | Runtime options, pack options, `functions` map | +| `uipath.json` | Runtime options and pack options | | `entry-points.json` | Input / output schemas from Pydantic models | | `bindings.json` | Runtime bindings | | `uv.lock` | Dependency lockfile | @@ -126,4 +123,6 @@ When the agent project is registered in a solution and uploaded via `uip solutio | `Project authors cannot be empty` | Missing `authors` in `pyproject.toml` | Add `authors = [{ name = "Your Name" }]` to `[project]` | | `NameError` during `init` | Framework not installed when `init` imports `main.py` | Run `uv sync` before `uip codedagent init` | | `No entrypoints found in uipath.json` | Framework config or package missing | Verify `uv pip install` succeeded, then re-run `uip codedagent init` | +| `No agent framework integration is installed` or `The '' package is required to scaffold a '' agent` from `new` | No framework package in the active venv | `uv pip install `, re-run `new` | +| `Multiple agent frameworks are installed` from `new` | More than one framework package in the venv | Re-run with `--agent-framework `, or keep one | | `ModuleNotFoundError` for a package you just installed, even after activating `.venv` | A shell `python` alias points at a different interpreter (uv-managed, system, etc.) | Use `.venv/bin/python` directly for sanity checks, or `unalias python` for the session | diff --git a/skills/uipath-agents/references/coded/quickstart.md b/skills/uipath-agents/references/coded/quickstart.md index 86ed69589c..4aff178142 100644 --- a/skills/uipath-agents/references/coded/quickstart.md +++ b/skills/uipath-agents/references/coded/quickstart.md @@ -34,8 +34,9 @@ Use `uip codedagent `, not `uv run uipath `. The wrapper injects sessi ## Critical Rules - **NEVER add a `[build-system]` section to `pyproject.toml`**. No `hatchling`, no `setuptools`, no build backend. UiPath agents do not use a build system. Only include `[project]`, `[dependency-groups]`, and `[tool.*]` sections. +- **Install the framework package before `uip codedagent new`.** The package installed in the active venv selects the agent template; with none installed, `new` fails with an error naming what to install. With several installed, pass `--agent-framework `. After `new`, confirm `.json` exists — do not hand-write it; recovery is in [lifecycle/setup.md](lifecycle/setup.md) § Verify the Scaffold. - **Always create a smoke evaluation set.** Every agent must include `evaluations/eval-sets/smoke-test.json` with 2-3 test cases covering the primary happy path (not exhaustive error-case coverage — the smoke set exists to catch regressions, not to fully validate behavior). Create it in the Evaluate step, not during Build. -- **Select a framework before writing any code.** If the prompt clearly implies a framework (e.g., mentions tools, RAG, multi-step orchestration, or a specific SDK), pick the best match. If the prompt is ambiguous, ask the user to choose from: Coded Function, LangGraph, LlamaIndex, or OpenAI Agents. +- **Select a framework before writing any code.** If the prompt clearly implies a framework (e.g., mentions tools, RAG, multi-step orchestration, or a specific SDK), pick the best match. If the prompt is ambiguous, ask the user to choose from: LangGraph, LlamaIndex, or OpenAI Agents. - **Never switch an existing project's framework.** When `framework != none` (a `.json` is already present), the framework is fixed: do not migrate to another framework, swap the `.json`, or change framework dependencies in `pyproject.toml`. Work within the existing framework's capabilities; if a request cannot be met within them, tell the user the limitation and let them decide. - **Correct SDK import: `from uipath.platform import UiPath`** — not `from uipath import UiPath` (that path does not exist and will cause `ImportError`). Always instantiate `UiPath()` inside functions/nodes, never at module level. - **Refresh the CLI's Python executable path after venv changes.** If `uip codedagent` reports that the UiPath CLI/Python executable is not recognized, or any error indicates a stale `uipathExePath`, activate the project venv and run `uip codedagent setup --force`. This rewrites the CLI configuration to point at the current `.venv` executable. @@ -57,7 +58,7 @@ Each stage has a reference file with detailed instructions. Read **only** the re | Stage | Reference | CLI Commands | |-------|-----------|-------------| | **Auth** | [../authentication.md](../authentication.md) | `uip login` | -| **Setup** | [lifecycle/setup.md](lifecycle/setup.md) | `uv venv --python 3.13`, `source .venv/bin/activate`, `uip codedagent setup --force`, `uip codedagent new `, `uv add `, `uv add uipath-dev --dev`, `uv sync`, `uip codedagent init` | +| **Setup** | [lifecycle/setup.md](lifecycle/setup.md) | `uv venv --python 3.13`, `source .venv/bin/activate`, `uv pip install `, `uip codedagent setup --force`, `uip codedagent new `, `uv add uipath-dev --dev`, `uv sync`, `uip codedagent init` | | **Build** | [lifecycle/build.md](lifecycle/build.md) | Code agent logic with framework patterns | | **Bindings** | [lifecycle/bindings-reference.md](lifecycle/bindings-reference.md) | Sync resource overrides in `bindings.json` | | **Env vars** | [lifecycle/environment-variables.md](lifecycle/environment-variables.md) | Which store the cloud runtime reads (not `.env`); `%ASSETS/%` to pull a value from an Orchestrator asset | @@ -280,7 +281,7 @@ Execute the following in order, end-to-end, in one pass — do not pause for con uv sync ``` - `uv add` requires the `pyproject.toml` that `codedagent new` generates — run it only after `new`, never at the solution root. + `uv add` requires the `pyproject.toml` that `codedagent new` generates — run it only after `new`, never at the solution root. Confirm `.json` exists before continuing (see [lifecycle/setup.md](lifecycle/setup.md) § Verify the Scaffold). Result: `//` sibling to `//`. diff --git a/skills/uipath-functions/SKILL.md b/skills/uipath-functions/SKILL.md index 5228a83ec3..a11d48eca0 100644 --- a/skills/uipath-functions/SKILL.md +++ b/skills/uipath-functions/SKILL.md @@ -56,7 +56,7 @@ Job-startable functions are invoked from Maestro BPMN/Flow (Service Task), coded 3. **`uip function init` must run before `pack` or `push`** — it generates `entry-points.json`, `bindings.json`, `project.uiproj`; re-run after any schema or entrypoint change. 4. **Typed I/O is mandatory** — Pydantic `BaseModel`, `pydantic.dataclasses.dataclass`, stdlib `@dataclass`, or a thin typed class; apply `@traced(name=..., run_type="uipath")` to the entrypoint for LLM Ops Traces. 5. **`pyproject.toml` needs `authors`** (else `pack` rejects: `Project authors cannot be empty`) and no `[build-system]` section. -6. **The scaffold follows installed packages**: with an agent framework present, `uip function new -l py` emits an agent scaffold — reshape it (see [references/python/workflow-guide.md](references/python/workflow-guide.md) Step 1), don't re-run `new`. +6. **`uip function new -l py` produces a function scaffold** — `uipath.json` with a `functions` map, no `langgraph.json` — regardless of any agent framework package (`uipath-langchain`, `uipath-llamaindex`, `uipath-openai-agents`) installed in the venv. ### JS/TS @@ -79,7 +79,7 @@ Job-startable functions are invoked from Maestro BPMN/Flow (Service Task), coded ### Python ```bash -uip function new -l py # scaffold (agent-framework packages hijack the scaffold — see workflow guide Step 1) +uip function new -l py # scaffold a Python function project # author: Pydantic Input/Output + @traced entrypoint, lazy UiPath() singleton, errors returned not raised uip function init # generate entry-points.json / bindings.json / project.uiproj uip function run '{"document_id": "42"}' diff --git a/skills/uipath-functions/references/python/workflow-guide.md b/skills/uipath-functions/references/python/workflow-guide.md index ce54766e31..b7c2732453 100644 --- a/skills/uipath-functions/references/python/workflow-guide.md +++ b/skills/uipath-functions/references/python/workflow-guide.md @@ -16,13 +16,7 @@ uip function new --language js # JavaScript Function → ../js/ `--empty` skips the hello-world function (JS/TS only). -**The scaffold follows the installed packages.** With a framework package present in the environment (`uipath-langchain`, `llama-index`, `openai-agents`), `uip function new -l py` emits that framework's **agent** scaffold — `langgraph.json` plus an LLM `main.py` — not a function scaffold. Expected behaviour, not a broken flag. Recovery, in one pass: - -1. Delete the framework config (`langgraph.json` and equivalents). -2. Replace `main.py` with the function template (Step 3). -3. Keep `pyproject.toml`'s `[project]` metadata (Step 5) — swap `dependencies` for what the function needs. - -Do not re-run `new` with different flag spellings, and do not read CLI or SDK internals to explain the scaffold. Reshape the project and move on. +**The Python scaffold is a function project:** `main.py` + `pyproject.toml` + `uipath.json` with a `functions` map, regardless of any agent framework package (`uipath-langchain`, `uipath-llamaindex`, `uipath-openai-agents`) installed in the venv. For a coded agent, use `uip codedagent new` and the [`uipath-agents`](/uipath:uipath-agents) skill instead. ## Step 2: Define Function Schema