此功能目前处于预览阶段。
UiPath® Functions are developer-native, platform-governed units of compute. You write the logic in code, deploy it to UiPath as a standard .nupkg package, and call it from anywhere in a solution:
- A Maestro process, as a service task.
- An RPA or API workflow, as a step.
- An agent, as a tool.
- An app, as its backend.
They are typed, traceable, testable, and deterministic: no LLM reasoning loop, no model, just code that takes typed input and returns typed output. A function runs alongside RPA robots, agents, and human tasks in the same orchestration layer, and inherits the same platform governance as the rest of your automations:
- 身份
- 凭据
- 审核追踪
- 访问控制
There is no second stack to host, secure, and keep in compliance.
Choose a language
A function is your code plus a UiPath SDK. Two languages are supported, over one packaging and CLI model.
| JavaScript / TypeScript | Python | |
|---|---|---|
| SDK | @uipath/coded-functions-js-sdk | uipath |
| 合同 | TypeScript interfaces, or JSON Schema | dataclass or pydantic model |
| Called as | An HTTP endpoint or an Orchestrator job | An Orchestrator job |
| Reach for it when | Backing a Coded App, or writing in the language your web stack already uses | Data-heavy processing, or the Python ecosystem |
Both export their input and output as JSON Schema, so typed fields appear directly in the binding UI on every invocation surface, and both retrieve credentials and platform resources at runtime rather than shipping them in the package.
Every function executes as an Orchestrator job, whichever way it is called. An HTTP trigger creates one per request, so a function called over HTTP still appears in Executions with its input, output, and logs — the two options differ in how you reach a function, not in how it runs.
JavaScript functions
A JavaScript or TypeScript function declares itself with defineFunction. Setting a method and path exposes it as an HTTP endpoint — the shape that backs a Coded App, where the function holds the credentials and business rules the browser must never see. When method and path are not set, the function runs as a job, like its Python counterpart.
Python 函数
A Python function is a typed Python module that runs as an Orchestrator job, retrieves platform resources through the UiPath() client, and emits execution spans through the @traced decorator.
何时使用函数
A function fits wherever a solution needs deterministic, code-first logic — for example:
- The backend of a Coded App, fetching only what the signed-in user may see and writing back to the system of record.
- Maestro 流程中的自定义计算或评分步骤。
- An API integration (NetSuite, SAP, any REST service), or a system with no connector.
- 流程步骤之间的数据转换或业务规则强制执行。
- An open-source library, or business logic you already have in code, made reusable across automations.
AI-driven, model-reasoning logic belongs in a coded agent instead.
如何整合在一起
Author (UiPath SDK) → Package (pack) → Publish
↓
Orchestrator package feed
↓
Deploy as a process (in an Orchestrator folder)
↓
Invoke from: Maestro Service Task | Studio Run Job | Orchestrator API | Job trigger
| an HTTP trigger, for JavaScript functions that declare a route
Author (UiPath SDK) → Package (pack) → Publish
↓
Orchestrator package feed
↓
Deploy as a process (in an Orchestrator folder)
↓
Invoke from: Maestro Service Task | Studio Run Job | Orchestrator API | Job trigger
| an HTTP trigger, for JavaScript functions that declare a route
后续步骤
- Get started with JavaScript — scaffold a project and run your first function.
- Get started with Python — install the SDK and build your first function.
- 打包并发布— 部署到 Orchestrator。
- Invoke functions — call them from an app, Maestro, or the API.