Skip to content

Commit dce87b2

Browse files
AlexBizonclaudeCopilot
authored
docs(core): correct project-type marker and I/O typing for functions/… (#1706)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a93a2ce commit dce87b2

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

packages/uipath/docs/core/agents.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,25 @@ The example below uses LangChain. Swap `uipath-langchain` for the framework of y
9191

9292
```
9393
my-agent/
94-
├── main.py # agent logic
94+
├── main.py # agent graph
95+
├── langgraph.json # graph entry points (framework-specific)
9596
├── pyproject.toml # project metadata and dependencies
96-
├── uipath.json # entry point declarations
9797
├── entry-points.json # generated — I/O JSON Schema
9898
└── bindings.json # generated — resource binding overrides
9999
```
100100

101-
### `uipath.json`
101+
### `langgraph.json`
102102

103103
```json
104104
{
105-
"agents": {
106-
"agent": "main.py:agent"
105+
"graphs": {
106+
"agent": "./main.py:graph"
107107
}
108108
}
109109
```
110110

111+
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.
112+
111113
### `pyproject.toml`
112114

113115
```toml
@@ -118,18 +120,15 @@ description = "..."
118120
authors = [{ name = "Your Name", email = "you@example.com" }]
119121
requires-python = ">=3.11"
120122
dependencies = ["uipath>=2.0", "uipath-langchain>=2.0"]
121-
122-
[tool.uipath]
123-
type = "agent"
124123
```
125124

126-
`[tool.uipath] type = "agent"` is required — it identifies the project as an agent to the runtime and packaging tools.
125+
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.
127126

128127
---
129128

130129
## Input & Output
131130

132-
Define `Input` and `Output` as Python dataclasses, the same way as [coded functions](./functions.md#input--output):
131+
Define `Input` and `Output` the same way as [coded functions](./functions.md#input--output) — a stdlib `@dataclass`, a pydantic `BaseModel`, or `pydantic.dataclasses.dataclass`:
133132

134133
```python
135134
from dataclasses import dataclass

packages/uipath/docs/core/functions.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,26 @@ description = "..."
107107
authors = [{ name = "Your Name", email = "you@example.com" }]
108108
requires-python = ">=3.11"
109109
dependencies = ["uipath>=2.0"]
110-
111-
[tool.uipath]
112-
type = "function"
113110
```
114111

115-
`[tool.uipath] type = "function"` is required — it identifies the project as a function to the runtime and packaging tools.
112+
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.
116113

117114
### Generated files
118115

119116
| File | Purpose |
120117
|------|---------|
121-
| `entry-points.json` | Input/output JSON Schema derived from your dataclasses — used by Maestro for variable binding |
118+
| `entry-points.json` | Input/output JSON Schema derived from your `Input`/`Output` models — used by Maestro for variable binding |
122119
| `bindings.json` | Resource binding overrides (assets, connections, buckets) for local development |
123120

124121
/// warning
125-
`uipath init` executes `main.py` to derive the I/O schema. Re-run it after every change to your `Input` or `Output` dataclasses.
122+
`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.
126123
///
127124

128125
---
129126

130127
## Input & Output
131128

132-
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.
129+
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.
133130

134131
```python
135132
from dataclasses import dataclass, field

0 commit comments

Comments
 (0)