You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use the UiPath SDK with a LangGraph-based project:
6
+
7
+
1. Add the `uipath-langchain` package to your project:
8
+
9
+
```shell
10
+
uv add uipath-langchain
11
+
```
12
+
13
+
2. Initialize the project by running the following commandin your activated virtual environment:
14
+
15
+
```shell
16
+
uipath init
17
+
```
18
+
19
+
>**Note:**: The `uipath init`command will execute your code to analyze its structure and collect information about inputs and outputs.
20
+
21
+
3. Package and publish your project:
22
+
```shell
23
+
uipath pack
24
+
uipath publish
25
+
```
26
+
27
+
This will create and publish your package to the UiPath platform, making it available forusein your automation workflows.
28
+
29
+
For more examples and implementation patterns, check out the [sample projects](https://github.com/UiPath/uipath-langchain-python/tree/main/samples) in our GitHub repository.
Copy file name to clipboardExpand all lines: docs/getting_started_cli.md
-81Lines changed: 0 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,84 +122,3 @@ Finally, publish your package. After selecting your publishing destination (tena
122
122
Publishing most recent package: test.0.1.0.nupkg
123
123
Package published successfully!
124
124
```
125
-
126
-
## Using the SDK
127
-
128
-
### Creating a Process Client
129
-
130
-
Now, let's create a new project to invoke the process we just created. We'll skip the installation and authentication steps since they're covered above.
131
-
132
-
Create a new project:
133
-
134
-
```shell
135
-
mkdir test2
136
-
cd test2
137
-
uv init . --python 3.10
138
-
uv add uipath
139
-
```
140
-
141
-
### Configuring the Project
142
-
143
-
First, open `.env` in your code editor and specify the folder where you want to run the code. For example, to use the "Shared" folder:
144
-
145
-
```shell
146
-
UIPATH_FOLDER_PATH=Shared
147
-
```
148
-
149
-
### Writing the Client Code
150
-
151
-
Open `main.py` in your code editor and add the following code:
152
-
153
-
```python
154
-
from uipath import UiPath
155
-
156
-
157
-
defmain():
158
-
sdk = UiPath()
159
-
sdk.processes.invoke(
160
-
"test-pack",
161
-
input_arguments={
162
-
"message": "Hello, World!",
163
-
"repeat": 3,
164
-
"prefix": "[Echo]"
165
-
}
166
-
)
167
-
```
168
-
169
-
> **Note:**: `test-pack` is the name of the process we created from the previous package.
170
-
171
-
### Verifying the Execution
172
-
173
-
Open your browser and navigate to UiPath. Go to the specified folder, and you'll see a new job for `test-pack` has been executed. The output will be:
To use the UiPath SDK with a LangGraph-based project:
182
-
183
-
1. Add the `uipath-langchain` package to your project:
184
-
185
-
```shell
186
-
uv add uipath-langchain
187
-
```
188
-
189
-
2. Initialize the project by running the following commandin your activated virtual environment:
190
-
191
-
```shell
192
-
uipath init
193
-
```
194
-
195
-
>**Note:**: The `uipath init`command will execute your code to analyze its structure and collect information about inputs and outputs.
196
-
197
-
3. Package and publish your project:
198
-
```shell
199
-
uipath pack
200
-
uipath publish
201
-
```
202
-
203
-
This will create and publish your package to the UiPath platform, making it available forusein your automation workflows.
204
-
205
-
For more examples and implementation patterns, check out the [sample projects](https://github.com/UiPath/uipath-langchain-python/tree/main/samples) in our GitHub repository.
- A UiPath Platform account with appropriate permissions
8
+
9
+
## Creating a New Project
10
+
11
+
We recommend using `uv` for package management. To create a new project:
12
+
13
+
```shell
14
+
mkdir example
15
+
cd example
16
+
uv init . --python 3.10
17
+
```
18
+
19
+
This command creates a basic project structure.
20
+
21
+
### Installing the UiPath SDK
22
+
23
+
Add the UiPath SDK to your project:
24
+
25
+
```shell
26
+
uv add uipath
27
+
```
28
+
29
+
To verify the installation, run:
30
+
31
+
```shell
32
+
uv run uipath --version
33
+
```
34
+
35
+
### Authentication
36
+
37
+
To debug your script locally and publish your project, you need to authenticate with UiPath:
38
+
39
+
```shell
40
+
uv run uipath auth
41
+
```
42
+
43
+
This command opens a new browser window. If you encounter any issues, copy the URL from the terminal and paste it into your browser. After authentication, select your tenant by typing its corresponding number in the terminal.
44
+
45
+
After completing this step, your project will contain a `.env` file with your access token, UiPath URL, and other configuration details.
46
+
47
+
### Configuring the Project
48
+
49
+
First, open `.env` in your code editor and specify the folder where you want to run the code. For example, to use the "Shared" folder:
50
+
51
+
```shell
52
+
UIPATH_FOLDER_PATH=Shared
53
+
```
54
+
55
+
### Writing the Client Code
56
+
57
+
Open `main.py` in your code editor and add the following code:
58
+
59
+
```python
60
+
from uipath import UiPath
61
+
62
+
63
+
defmain():
64
+
sdk = UiPath()
65
+
sdk.processes.invoke(
66
+
"test-pack",
67
+
input_arguments={
68
+
"message": "Hello, World!",
69
+
"repeat": 3,
70
+
"prefix": "[Echo]"
71
+
}
72
+
)
73
+
```
74
+
75
+
> **Note:**: `test-pack` is the name of the process we created from the [previous package.](./getting_started_cli.md)
76
+
77
+
### Verifying the Execution
78
+
79
+
Open your browser and navigate to UiPath. Go to the specified folder, and you'll see a new job for `test-pack` has been executed. The output will be:
0 commit comments