-
Notifications
You must be signed in to change notification settings - Fork 26
docs(studio-web): document coded function integration [PRODEV-605] #1675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,7 @@ | ||||||
| # CLI Reference | ||||||
|
|
||||||
| The following commands apply to both **coded functions** and **coded agents**. The entry point name (`main`, `agent`, or any key you define in `uipath.json`) is the first argument to `run`, `debug`, `eval`, and `invoke`. | ||||||
|
|
||||||
| ::: mkdocs-click | ||||||
| :module: uipath._cli | ||||||
| :command: auth | ||||||
|
|
@@ -132,7 +134,7 @@ For step-by-step debugging with breakpoints and variable inspection (supported f | |||||
| ```console | ||||||
| # Install debugpy package | ||||||
| uv pip install debugpy | ||||||
| # Run agent with debugging enabled | ||||||
| # Run with debugging enabled | ||||||
| uipath run [ENTRYPOINT] [INPUT] --debug | ||||||
| ``` | ||||||
| For vscode: | ||||||
|
|
@@ -154,19 +156,19 @@ Depending on the shell you are using, it may be necessary to escape the input js | |||||
|
|
||||||
| /// tab | Bash/ZSH | ||||||
| ```console | ||||||
| uipath run agent '{"topic": "UiPath"}' | ||||||
| uipath run main '{"message": "hello"}' | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
we can have an info box where we give some examples if this is not clear enough. like
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — the shell tabs now use |
||||||
| ``` | ||||||
| /// | ||||||
|
|
||||||
| /// tab | Windows CMD | ||||||
| ```console | ||||||
| uipath run agent "{""topic"": ""UiPath""}" | ||||||
| uipath run main "{""message"": ""hello""}" | ||||||
| ``` | ||||||
| /// | ||||||
|
|
||||||
| /// tab | Windows PowerShell | ||||||
| ```console | ||||||
| uipath run agent '{\"topic\":\"uipath\"}' | ||||||
| uipath run main '{\"message\":\"hello\"}' | ||||||
| ``` | ||||||
| /// | ||||||
|
|
||||||
|
|
@@ -311,7 +313,7 @@ Selected feed: Orchestrator Tenant Processes Feed | |||||
| <!-- termynal --> | ||||||
|
|
||||||
| ```shell | ||||||
| > uipath invoke agent '{"topic": "UiPath"}' | ||||||
| > uipath invoke main '{"message": "hello"}' | ||||||
| ⠴ Loading configuration ... | ||||||
| ⠴ Starting job ... | ||||||
| ✨ Job started successfully! | ||||||
|
|
@@ -379,7 +381,7 @@ File 'uipath.json' is up to date | |||||
| :depth: 1 | ||||||
| :style: table | ||||||
|
|
||||||
| Runs your agent under the debug runtime, with a debug bridge attached. Locally, the bridge is the interactive **console** (read commands from stdin, stop at breakpoints). In the cloud, the bridge is **SignalR** (driven by Studio Web / Orchestrator). The `--attach` flag lets you override that default, including `none` for executors that need the debug command's surrounding behavior (bindings fetch, state streaming) but cannot speak the interactive debug protocol. | ||||||
| Runs your project under the debug runtime, with a debug bridge attached. Locally, the bridge is the interactive **console** (read commands from stdin, stop at breakpoints). In the cloud, the bridge is **SignalR** (driven by Studio Web / Orchestrator). The `--attach` flag lets you override that default, including `none` for executors that need the debug command's surrounding behavior (bindings fetch, state streaming) but cannot speak the interactive debug protocol. | ||||||
|
|
||||||
| ### Attach modes | ||||||
|
|
||||||
|
|
@@ -426,7 +428,7 @@ Next: analyze_sentiment | |||||
| :depth: 1 | ||||||
| :style: table | ||||||
|
|
||||||
| Runs an evaluation set against your agent. Entry point and eval set are auto-discovered from the project if not passed explicitly. Evaluations run in parallel (see `--workers`) and, unless `--no-report` is passed, results are reported back to Studio Web when `UIPATH_PROJECT_ID` is set. | ||||||
| Runs an evaluation set against your project. Entry point and eval set are auto-discovered from the project if not passed explicitly. Evaluations run in parallel (see `--workers`) and, unless `--no-report` is passed, results are reported back to Studio Web when `UIPATH_PROJECT_ID` is set. | ||||||
|
|
||||||
| ### Common flags | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,245 @@ | ||
| # Python Coded Agents | ||
|
|
||
| A coded agent is Python code that uses an LLM reasoning loop to make decisions, call tools, and produce a result. You write the agent logic using a framework of your choice — the `uipath` SDK provides the platform layer: authentication, assets, buckets, connections, tracing, and human-in-the-loop. Package it with the CLI and deploy it as an Orchestrator job. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one or more LLMs*
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You write the agent logic using a framework of your choice -> I would mention somewhere around here our curated integrations. uipath-langchain (recommended) or one from uipath-integrations with repo links
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: now reads "uses one or more LLMs in a reasoning loop".
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added — the intro now calls out our curated integrations:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added guardrails and AI Trust Layer, and ended the list with "and more" so it no longer reads as exhaustive. |
||
|
|
||
| Use a coded agent when your automation needs multi-step reasoning, dynamic tool selection, or LLM-driven decisions. Use a [coded function](./functions.md) when your logic is deterministic and no LLM is required. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would remove the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed — now reads "Use a coded agent when your logic needs multi-step reasoning...". |
||
|
|
||
| --- | ||
|
|
||
| ## Architecture | ||
|
|
||
| Every coded agent is built from two layers: | ||
|
|
||
| | Layer | Package | Responsibility | | ||
| |-------|---------|---------------| | ||
| | **Platform** | `uipath` | Auth, assets, buckets, connections, tracing, human-in-the-loop, CLI, packaging | | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. platform is in
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done — renamed the column to Package(s) and listed |
||
| | **Framework** | one extension (see below) | LLM calls, tool routing, agent loop, memory | | ||
|
|
||
| The `uipath` package is always required. Add one framework extension on top: | ||
|
|
||
| | Framework | Package | Best for | | ||
| |-----------|---------|---------| | ||
| | LangChain / LangGraph | `uipath-langchain` | Graph-based agents, complex multi-step flows | | ||
| | LlamaIndex | `uipath-llamaindex` | RAG-heavy agents, document reasoning | | ||
| | OpenAI Agents SDK | `uipath-openai-agents` | OpenAI-native tool use, handoffs | | ||
| | PydanticAI | `uipath-pydantic-ai` | Type-safe agents with Pydantic models | | ||
| | Google ADK | `uipath-google-adk` | Gemini models, Google ecosystem | | ||
| | UiPath Agent Framework | `uipath-agent-framework` | UiPath-native agent primitives | | ||
|
Comment on lines
+25
to
+27
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not documented yet, remove for now
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed all three (PydanticAI, Google ADK, UiPath Agent Framework) — from both this table and the Framework Guides table below. Also dropped them from the install list on the Studio Web page for consistency. |
||
|
|
||
| --- | ||
|
|
||
| ## Quickstart | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we need this section? we already have quickstarts for each framework. I would drop it
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dropped the Quickstart section and replaced it with a pointer to the per-framework Framework Guides. |
||
|
|
||
| The example below uses LangChain. Swap `uipath-langchain` for the framework of your choice. | ||
|
|
||
| //// tab | uv | ||
|
|
||
| <!-- termynal --> | ||
|
|
||
| ```shell | ||
| > mkdir my-agent && cd my-agent | ||
| > uv init . --python 3.11 | ||
| > uv add uipath uipath-langchain | ||
|
|
||
| > uipath auth | ||
| ⠋ Authenticating with UiPath ... | ||
| ✓ Authentication successful. | ||
|
|
||
| > uipath new agent | ||
| ✓ Created new agent project. | ||
|
|
||
| > uipath init | ||
| ⠋ Initializing UiPath project ... | ||
| ✓ Created 'entry-points.json' file. | ||
| ✓ Created 'bindings.json' file. | ||
|
|
||
| > uipath run agent '{"message": "hello"}' | ||
| ``` | ||
|
|
||
| //// | ||
|
|
||
| //// tab | pip | ||
|
|
||
| <!-- termynal --> | ||
|
|
||
| ```shell | ||
| > mkdir my-agent && cd my-agent | ||
| > python -m venv .venv | ||
| > source .venv/bin/activate | ||
| > pip install uipath uipath-langchain | ||
|
|
||
| > uipath auth | ||
| ⠋ Authenticating with UiPath ... | ||
| ✓ Authentication successful. | ||
|
|
||
| > uipath new agent | ||
| ✓ Created new agent project. | ||
|
|
||
| > uipath init | ||
| ⠋ Initializing UiPath project ... | ||
| ✓ Created 'entry-points.json' file. | ||
| ✓ Created 'bindings.json' file. | ||
|
|
||
| > uipath run agent '{"message": "hello"}' | ||
| ``` | ||
|
|
||
| //// | ||
|
|
||
| --- | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| my-agent/ | ||
| ├── main.py # agent logic | ||
| ├── 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` | ||
|
|
||
| ```json | ||
| { | ||
| "agents": { | ||
| "agent": "main.py:agent" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### `pyproject.toml` | ||
|
|
||
| ```toml | ||
| [project] | ||
| name = "my-agent" | ||
| version = "0.1.0" | ||
| 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. | ||
|
|
||
| --- | ||
|
|
||
| ## Input & Output | ||
|
|
||
| Define `Input` and `Output` as Python dataclasses, the same way as [coded functions](./functions.md#input--output): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they can be dataclasees/baseModels/typedDicts etc. this depends on the framework used
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the entire Input & Output section — the shape depends on the framework. |
||
|
|
||
| ```python | ||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass | ||
| class Input: | ||
| message: str | ||
|
|
||
|
|
||
| @dataclass | ||
| class Output: | ||
| response: str | ||
|
|
||
|
|
||
| def agent(input: Input) -> Output: | ||
| ... | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Platform Services | ||
|
|
||
| The `uipath` SDK gives your agent access to Orchestrator resources at runtime — credentials are injected automatically when running as a job. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not only orchestrator
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generalized — now reads "access to UiPath platform resources" / "full set of platform services" instead of Orchestrator. |
||
|
|
||
| ```python | ||
| from uipath.platform import UiPath | ||
|
|
||
| sdk = UiPath() | ||
| ``` | ||
|
|
||
| The full set of Orchestrator services is available to agents: | ||
|
|
||
| - **Assets** — read credentials and configuration: [Assets reference](./assets.md) | ||
| - **Buckets** — download and upload files: [Buckets reference](./buckets.md) | ||
| - **Connections** — Integration Service connections for ERP and SaaS: [Connections reference](./connections.md) | ||
| - **Context Grounding** — semantic search over enterprise data: [Context Grounding reference](./context_grounding.md) | ||
|
|
||
| --- | ||
|
|
||
| ## Tracing | ||
|
|
||
| Apply `@traced` to custom steps inside your agent to make them visible in the Orchestrator job trace view and Maestro dashboards. Do **not** trace the entry point — the runtime wraps it automatically. | ||
|
|
||
| ```python | ||
| from uipath.tracing import traced | ||
|
|
||
|
|
||
| @traced(name="lookup_vendor", run_type="uipath") | ||
| def lookup_vendor(vendor_id: str) -> dict: | ||
| ... | ||
| ``` | ||
|
|
||
| See [Tracing](./traced.md) for the full decorator reference. | ||
|
|
||
| --- | ||
|
|
||
| ## Framework Guides | ||
|
|
||
| Each framework extension has its own getting started guide and sample agents: | ||
|
|
||
| | Framework | Guide | Samples | | ||
| |-----------|-------|---------| | ||
| | LangChain / LangGraph | [Get Started](../langchain/quick_start.md) | [Samples](https://github.com/UiPath/uipath-langchain-python/tree/main/samples) | | ||
| | LlamaIndex | [Get Started](../llamaindex/quick_start.md) | [Samples](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-llamaindex/samples) | | ||
| | OpenAI Agents SDK | [Get Started](../openai-agents/quick_start.md) | [Samples](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-openai-agents/samples) | | ||
| | PydanticAI | [README](https://github.com/UiPath/uipath-integrations-python/blob/main/packages/uipath-pydantic-ai/README.md) | [Samples](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-pydantic-ai/samples) | | ||
| | Google ADK | [README](https://github.com/UiPath/uipath-integrations-python/blob/main/packages/uipath-google-adk/README.md) | [Samples](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-google-adk/samples) | | ||
| | UiPath Agent Framework | [README](https://github.com/UiPath/uipath-integrations-python/blob/main/packages/uipath-agent-framework/README.md) | [Samples](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-agent-framework/samples) | | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| ## Pack & Publish | ||
|
|
||
| The same CLI workflow applies as for coded functions: | ||
|
|
||
| <!-- termynal --> | ||
|
|
||
| ```shell | ||
| > uipath pack | ||
| ⠋ Packaging project ... | ||
| Name : my-agent | ||
| Version : 0.1.0 | ||
| Description: Add your description here | ||
| Authors : Your Name | ||
| ✓ Project successfully packaged. | ||
|
|
||
| > uipath publish | ||
| ⠋ Fetching available package feeds... | ||
| Select feed number: 0 | ||
| ✓ Package published successfully! | ||
| ``` | ||
|
|
||
| After publishing, the agent registers as an Orchestrator Process and can be invoked from Maestro, the Orchestrator API, or the CLI. | ||
|
|
||
| See [CLI Reference](../cli/index.md) for full `pack`, `publish`, and `invoke` options. | ||
|
|
||
| --- | ||
|
|
||
| ## Studio Web Integration | ||
|
|
||
| Connect your agent to a Studio Web solution for cloud debugging, evaluation, and solution packaging. | ||
|
|
||
| See [Studio Web Integration](./studio_web.md) for setup and sync details. | ||
|
|
||
| --- | ||
|
|
||
| ## Evaluations | ||
|
|
||
| Coded agents support evaluations in Studio Web and locally via `uipath eval`. Evaluators cover LLM output quality, tool call correctness, and trajectory analysis. | ||
|
|
||
| See the [Evaluations documentation](../eval/index.md) for available evaluators and how to define evaluation sets. | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uipath.jsonis the main manifest only for coded functions.for coded agents each integration has its specific manifest where entrypoints are defined.
ex
uipath-langchain -> langgraph.json
uipath-llamaindex -> llamaindex.json
uipath-openai -> openai_agents.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. The intro now clarifies the entry point is the
uipath.jsonkey for functions and the framework manifest for agents, with examples: