Skip to content

Commit 6691705

Browse files
committed
docs: add reinvoke warning and update docs
1 parent 6eaa07b commit 6691705

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

docs/human_in_the_loop.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ For more information on UiPath apps, refer to the [UiPath Apps User Guide](https
1414

1515
#### Attributes:
1616

17-
- **name** (Optional[str]): The name of the app.
18-
- **key** (Optional[str]): The key of the app.
17+
- **app_name** (Optional[str]): The name of the app.
18+
- **app_folder_path** (Optional[str]): The folder path of the app.
19+
- **app_key** (Optional[str]): The key of the app.
1920
- **title** (str): The title of the action to create.
2021
- **data** (Optional[Dict[str, Any]]): Values that the action will be populated with.
2122
- **app_version** (Optional[int]): The version of the app (defaults to 1).
@@ -25,7 +26,7 @@ For more information on UiPath apps, refer to the [UiPath Apps User Guide](https
2526

2627
```python
2728
from uipath.models import CreateAction
28-
action_output = interrupt(CreateAction(name="AppName", title="Escalate Issue", data={"key": "value"}, app_version=1, assignee="[email protected]"))
29+
action_output = interrupt(CreateAction(app_name="AppName", app_folder_path="MyFolderPath", title="Escalate Issue", data={"key": "value"}, app_version=1, assignee="[email protected]"))
2930
```
3031

3132
For a practical implementation of the `CreateAction` model, refer to the [ticket-classification sample](https://github.com/UiPath/uipath-langchain-python/tree/main/samples/ticket-classification). This sample demonstrates how to create an action with dynamic input.
@@ -39,12 +40,13 @@ The `WaitAction` model is used to wait for an action to be handled. This model i
3940
#### Attributes:
4041

4142
- **action** (Action): The instance of the action to wait for.
43+
- **app_folder_path** (Optional[str]): The folder path of the app.
4244

4345
#### Example:
4446

4547
```python
4648
from uipath.models import WaitAction
47-
action_output = interrupt(WaitAction(action=my_action_instance))
49+
action_output = interrupt(WaitAction(action=my_action_instance, app_folder_path="MyFolderPath"))
4850
```
4951

5052
---
@@ -61,15 +63,20 @@ Upon completion of the invoked process, the current agent will automatically res
6163
#### Attributes:
6264

6365
- **name** (str): The name of the process to invoke.
66+
- **process_folder_path** (Optional[str]): The folder path of the process.
6467
- **input_arguments** (Optional[Dict[str, Any]]): A dictionary containing the input arguments required for the invoked process.
6568

6669
#### Example:
6770

6871
```python
6972
from uipath.models import InvokeProcess
70-
process_output = interrupt(InvokeProcess(name="MyProcess", input_arguments={"arg1": "value1"}))
73+
process_output = interrupt(InvokeProcess(name="MyProcess", process_folder_path="MyFolderPath", input_arguments={"arg1": "value1"}))
7174
```
7275

76+
/// warning
77+
An agent can invoke itself if needed, but this must be done with caution. Be mindful that using the same name for invocation may lead to unintentional loops. To prevent recursion issues, implement safeguards like exit conditions.
78+
///
79+
7380
For a practical implementation of the `InvokeProcess` model, refer to the [multi-agent-planner-researcher-coder-distributed sample](https://github.com/UiPath/uipath-langchain-python/tree/main/samples/multi-agent-planner-researcher-coder-distributed). This sample demonstrates how to invoke a process with dynamic input arguments, showcasing the integration of the interrupt functionality within a multi-agent system or a system where an agent integrates with RPA processes and API workflows.
7481

7582
---
@@ -82,10 +89,11 @@ the job has already been created.
8289
#### Attributes:
8390

8491
- **job** (Job): The instance of the job that the agent will wait for. This should be a valid job object that has been previously created.
92+
- **process_folder_path** (Optional[str]): The folder path of the process.
8593

8694
#### Example:
8795

8896
```python
8997
from uipath.models import WaitJob
90-
job_output = interrupt(WaitJob(job=my_job_instance))
98+
job_output = interrupt(WaitJob(job=my_job_instance, process_folder_path="MyFolderPath"))
9199
```

samples/multi-agent-planner-researcher-coder-distributed/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ Select feed number: 3
220220
> **Note:** Ensure that the display names for the coder and researcher agent processes are *coder-agent* and *researcher-agent*,
221221
and that all 3 agents are placed in the same folder.
222222

223+
> **Warning:** An agent can invoke itself if needed, but this must be done with caution. Be mindful that using the same name for invocation may lead to unintentional loops. To prevent recursion issues, implement safeguards like exit conditions.
224+
223225
7. **Run the Planner Agent with Any Input Question**
224226
> **Tip:** For a five-step action plan, consider using the following input:
225227
```

0 commit comments

Comments
 (0)