diff --git a/docs/human_in_the_loop.md b/docs/human_in_the_loop.md index 55a2d2f6..966f15eb 100644 --- a/docs/human_in_the_loop.md +++ b/docs/human_in_the_loop.md @@ -14,8 +14,9 @@ For more information on UiPath apps, refer to the [UiPath Apps User Guide](https #### Attributes: -- **name** (Optional[str]): The name of the app. -- **key** (Optional[str]): The key of the app. +- **app_name** (Optional[str]): The name of the app. +- **app_folder_path** (Optional[str]): The folder path of the app. +- **app_key** (Optional[str]): The key of the app. - **title** (str): The title of the action to create. - **data** (Optional[Dict[str, Any]]): Values that the action will be populated with. - **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 ```python from uipath.models import CreateAction -action_output = interrupt(CreateAction(name="AppName", title="Escalate Issue", data={"key": "value"}, app_version=1, assignee="user@example.com")) +action_output = interrupt(CreateAction(app_name="AppName", app_folder_path="MyFolderPath", title="Escalate Issue", data={"key": "value"}, app_version=1, assignee="user@example.com")) ``` 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 #### Attributes: - **action** (Action): The instance of the action to wait for. +- **app_folder_path** (Optional[str]): The folder path of the app. #### Example: ```python from uipath.models import WaitAction -action_output = interrupt(WaitAction(action=my_action_instance)) +action_output = interrupt(WaitAction(action=my_action_instance, app_folder_path="MyFolderPath")) ``` --- @@ -61,15 +63,20 @@ Upon completion of the invoked process, the current agent will automatically res #### Attributes: - **name** (str): The name of the process to invoke. +- **process_folder_path** (Optional[str]): The folder path of the process. - **input_arguments** (Optional[Dict[str, Any]]): A dictionary containing the input arguments required for the invoked process. #### Example: ```python from uipath.models import InvokeProcess -process_output = interrupt(InvokeProcess(name="MyProcess", input_arguments={"arg1": "value1"})) +process_output = interrupt(InvokeProcess(name="MyProcess", process_folder_path="MyFolderPath", input_arguments={"arg1": "value1"})) ``` +/// 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. +/// + 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. --- @@ -82,10 +89,11 @@ the job has already been created. #### Attributes: - **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. +- **process_folder_path** (Optional[str]): The folder path of the process. #### Example: ```python from uipath.models import WaitJob -job_output = interrupt(WaitJob(job=my_job_instance)) +job_output = interrupt(WaitJob(job=my_job_instance, process_folder_path="MyFolderPath")) ``` diff --git a/samples/multi-agent-planner-researcher-coder-distributed/README.md b/samples/multi-agent-planner-researcher-coder-distributed/README.md index 1f638a76..f0695e81 100644 --- a/samples/multi-agent-planner-researcher-coder-distributed/README.md +++ b/samples/multi-agent-planner-researcher-coder-distributed/README.md @@ -220,6 +220,8 @@ Select feed number: 3 > **Note:** Ensure that the display names for the coder and researcher agent processes are *coder-agent* and *researcher-agent*, and that all 3 agents are placed in the same folder. + > **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. + 7. **Run the Planner Agent with Any Input Question** > **Tip:** For a five-step action plan, consider using the following input: ```