From 09d267cbcf657fc524c3c6cd8623eba6a382564c Mon Sep 17 00:00:00 2001 From: Alexandru Bizon Date: Tue, 9 Jun 2026 18:33:35 +0300 Subject: [PATCH 1/3] docs(core): correct project-type marker and I/O typing for functions/agents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The functions/agents guides (added in #1675) claim a `[tool.uipath] type = "function"|"agent"` marker in pyproject.toml is required to identify the project type. It isn't — `uipath new` scaffolds pyproject without it and no sample carries it. The project type is determined by the `functions` / `agents` map in `uipath.json`. Remove the marker from the examples and the "is required" claims. Also broaden the I/O guidance: Input/Output can be a stdlib @dataclass, a pydantic BaseModel, or pydantic.dataclasses.dataclass (the samples use pydantic), and the entry point may be sync `def` or `async def`. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/uipath/docs/core/agents.md | 7 ++----- packages/uipath/docs/core/functions.md | 11 ++++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/packages/uipath/docs/core/agents.md b/packages/uipath/docs/core/agents.md index 5076d43b6..9bf899e2e 100644 --- a/packages/uipath/docs/core/agents.md +++ b/packages/uipath/docs/core/agents.md @@ -118,18 +118,15 @@ description = "..." authors = [{ name = "Your Name", email = "you@example.com" }] requires-python = ">=3.11" dependencies = ["uipath>=2.0", "uipath-langchain>=2.0"] - -[tool.uipath] -type = "agent" ``` -`[tool.uipath] type = "agent"` is required — it identifies the project as an agent to the runtime and packaging tools. +Standard project metadata and dependencies. The `agents` map in `uipath.json` (above) is what marks the project as a coded agent — `pyproject.toml` needs no UiPath-specific entries. --- ## Input & Output -Define `Input` and `Output` as Python dataclasses, the same way as [coded functions](./functions.md#input--output): +Define `Input` and `Output` the same way as [coded functions](./functions.md#input--output) — a stdlib `@dataclass`, a pydantic `BaseModel`, or `pydantic.dataclasses.dataclass`: ```python from dataclasses import dataclass diff --git a/packages/uipath/docs/core/functions.md b/packages/uipath/docs/core/functions.md index e367270e8..c9adac241 100644 --- a/packages/uipath/docs/core/functions.md +++ b/packages/uipath/docs/core/functions.md @@ -107,29 +107,26 @@ description = "..." authors = [{ name = "Your Name", email = "you@example.com" }] requires-python = ">=3.11" dependencies = ["uipath>=2.0"] - -[tool.uipath] -type = "function" ``` -`[tool.uipath] type = "function"` is required — it identifies the project as a function to the runtime and packaging tools. +Standard project metadata and dependencies. The `functions` map in `uipath.json` (above) is what marks the project as a coded function — `pyproject.toml` needs no UiPath-specific entries. ### Generated files | File | Purpose | |------|---------| -| `entry-points.json` | Input/output JSON Schema derived from your dataclasses — used by Maestro for variable binding | +| `entry-points.json` | Input/output JSON Schema derived from your `Input`/`Output` models — used by Maestro for variable binding | | `bindings.json` | Resource binding overrides (assets, connections, buckets) for local development | /// warning -`uipath init` executes `main.py` to derive the I/O schema. Re-run it after every change to your `Input` or `Output` dataclasses. +`uipath init` executes `main.py` to derive the I/O schema. Re-run it after every change to your `Input` or `Output` models. /// --- ## Input & Output -Define `Input` and `Output` as Python dataclasses. The runtime validates against these at invocation time and exports them as JSON Schema for Maestro variable binding. +Define `Input` and `Output` as typed Python — a stdlib `@dataclass`, a pydantic `BaseModel`, or `pydantic.dataclasses.dataclass`. The runtime validates against these at invocation time and exports them as JSON Schema for Maestro variable binding. The entry point can be a sync `def` or an `async def` — both are supported. ```python from dataclasses import dataclass, field From c6472c747bf7c6ba2cb06154ba592d398822e0d7 Mon Sep 17 00:00:00 2001 From: Alexandru Bizon Date: Tue, 9 Jun 2026 18:58:28 +0300 Subject: [PATCH 2/3] docs(core): correct coded-agent detection in agents.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A coded agent is identified by its framework graph file (langgraph.json for LangChain/LangGraph, llamaindex.json for LlamaIndex, etc.) plus the framework dependency — not by an `agents` map in uipath.json. uipath.json is empty/absent for agents (confirmed against uipath-langchain samples and the `uipath new` templates, which scaffold langgraph.json + main.py and no uipath.json). Replace the bogus uipath.json `agents` example with langgraph.json, update the project structure, and drop the marker claim. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/uipath/docs/core/agents.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/uipath/docs/core/agents.md b/packages/uipath/docs/core/agents.md index 9bf899e2e..21b812647 100644 --- a/packages/uipath/docs/core/agents.md +++ b/packages/uipath/docs/core/agents.md @@ -91,23 +91,25 @@ The example below uses LangChain. Swap `uipath-langchain` for the framework of y ``` my-agent/ -├── main.py # agent logic +├── main.py # agent graph +├── langgraph.json # graph entry points (framework-specific) ├── pyproject.toml # project metadata and dependencies -├── uipath.json # entry point declarations ├── entry-points.json # generated — I/O JSON Schema └── bindings.json # generated — resource binding overrides ``` -### `uipath.json` +### `langgraph.json` ```json { - "agents": { - "agent": "main.py:agent" + "graphs": { + "agent": "./main.py:graph" } } ``` +Declares the agent's graph entry points. The filename is framework-specific — `langgraph.json` for LangChain/LangGraph, `llamaindex.json` for LlamaIndex, and so on. Its presence, together with the framework dependency below, is what marks the project as a coded agent. + ### `pyproject.toml` ```toml @@ -120,7 +122,7 @@ requires-python = ">=3.11" dependencies = ["uipath>=2.0", "uipath-langchain>=2.0"] ``` -Standard project metadata and dependencies. The `agents` map in `uipath.json` (above) is what marks the project as a coded agent — `pyproject.toml` needs no UiPath-specific entries. +Standard metadata plus the framework dependency (`uipath-langchain` here). The framework graph file and this dependency identify the project as a coded agent — `pyproject.toml` needs no UiPath-specific entries, and `uipath.json` carries no agent entry. --- From fe943a1f222b6e0ddba6a2e9249ac03493945d86 Mon Sep 17 00:00:00 2001 From: Alexandru Bizon Date: Tue, 9 Jun 2026 19:09:46 +0300 Subject: [PATCH 3/3] docs(core): clarify init entrypoint and payload-parsing wording Squash of two Copilot Autofix suggestions on functions.md into a conventional-commit message so commit-lint passes: - `uipath init` executes the entrypoint file(s) declared in uipath.json (e.g. main.py), not literally always main.py. - the runtime uses the Input/Output type hints to parse the invocation payload (rather than "validates against these"). Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/uipath/docs/core/functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/uipath/docs/core/functions.md b/packages/uipath/docs/core/functions.md index c9adac241..6c073f68f 100644 --- a/packages/uipath/docs/core/functions.md +++ b/packages/uipath/docs/core/functions.md @@ -119,14 +119,14 @@ Standard project metadata and dependencies. The `functions` map in `uipath.json` | `bindings.json` | Resource binding overrides (assets, connections, buckets) for local development | /// warning -`uipath init` executes `main.py` to derive the I/O schema. Re-run it after every change to your `Input` or `Output` models. +`uipath init` executes your entrypoint Python file(s) (as declared in `uipath.json`, e.g., `main.py`) to derive the I/O schema. Re-run it after every change to your `Input` or `Output` models. /// --- ## Input & Output -Define `Input` and `Output` as typed Python — a stdlib `@dataclass`, a pydantic `BaseModel`, or `pydantic.dataclasses.dataclass`. The runtime validates against these at invocation time and exports them as JSON Schema for Maestro variable binding. The entry point can be a sync `def` or an `async def` — both are supported. +Define `Input` and `Output` as typed Python — a stdlib `@dataclass`, a pydantic `BaseModel`, or `pydantic.dataclasses.dataclass`. The runtime uses these type hints to parse the invocation payload and exports them as JSON Schema for Maestro variable binding. The entry point can be a sync `def` or an `async def` — both are supported. ```python from dataclasses import dataclass, field