A Python SDK that enables programmatic interaction with UiPath Cloud Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Cloud Platform.
Use the UiPath LangChain SDK to pack and publish LangGraph Agents.
This quickstart guide walks you through deploying your first agent to UiPath Cloud Platform.
- Installation
- Configuration
- Basic Usage
- Available Services
- Examples
- Command Line Interface (CLI)
- Project Structure
- Development
pip install uipath
using uv
:
uv add uipath
Create a .env
file in your project root with the following variables:
UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
from uipath import UiPath
# Initialize the SDK
sdk = UiPath()
# Execute a process
job = sdk.processes.invoke(
name="MyProcess",
input_arguments={"param1": "value1", "param2": 42}
)
# Work with assets
asset = sdk.assets.retrieve(name="MyAsset")
The SDK provides access to various UiPath services:
-
sdk.processes
- Manage and execute UiPath automation processes -
sdk.assets
- Work with assets (variables, credentials) stored in UiPath -
sdk.buckets
- Manage cloud storage containers for automation files -
sdk.connections
- Handle connections to external systems -
sdk.context_grounding
- Work with semantic contexts for AI-enabled automation -
sdk.jobs
- Monitor and manage automation jobs -
sdk.queues
- Work with transaction queues -
sdk.actions
- Work with Action Center -
sdk.api_client
- Direct access to the API client for custom requests
# Download a file from a bucket
sdk.buckets.download(
bucket_key="my-bucket",
blob_file_path="path/to/file.xlsx",
destination_path="local/path/file.xlsx"
)
# Search for contextual information
results = sdk.context_grounding.search(
name="my-knowledge-index",
query="How do I process an invoice?",
number_of_results=5
)
The SDK also provides a command-line interface for creating, packaging, and deploying automations:
uipath auth
This command opens a browser for authentication and creates/updates your .env
file with the proper credentials.
uipath init [ENTRYPOINT]
Creates a uipath.json
configuration file for your project. If the entrypoint is not provided, it will try to find a single Python file in the current directory.
uipath run ENTRYPOINT [INPUT]
Executes a Python script with the provided JSON input arguments.
uipath pack
Packages your project into a .nupkg
file that can be deployed to UiPath.
Note: Your pyproject.toml
must include:
- A description field (avoid characters: &, <, >, ", ', ;)
- Author information
Example:
description = "Your package description"
authors = [{name = "Your Name", email = "your.email@example.com"}]
uipath publish
Publishes the most recently created package to your UiPath Orchestrator.
To properly use the CLI for packaging and publishing, your project should include:
- A
pyproject.toml
file with project metadata - A
uipath.json
file (generated byuipath init
) - Any Python files needed for your automation
Please read CONTRIBUTING.md before submitting a pull request.