diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30e83378..ccae9b70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,9 @@ jobs: if: ${{ steps.check_version.outputs.modified }} == 'true' run: | mkdir -p docs/plugins + mkdir -p docs/docs ln -s ../../plugins/uipath-langchain-python docs/plugins/uipath-langchain-python + ln -s ../plugins/uipath-langchain-python/docs docs/docs - name: Publish Docs if: ${{ steps.check_version.outputs.modified }} == 'true' diff --git a/README.md b/README.md index 8e90ebe7..f9d2c42f 100644 --- a/README.md +++ b/README.md @@ -180,4 +180,4 @@ To properly use the CLI for packaging and publishing, your project should includ ### Setting Up a Development Environment -Please read [CONTRIBUTING.md](https://uipath.github.io/uipath-python/how_to_contribute/) before submitting a pull request. +Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before submitting a pull request. diff --git a/docs/how_to_contribute.md b/docs/CONTRIBUTING.md similarity index 100% rename from docs/how_to_contribute.md rename to docs/CONTRIBUTING.md diff --git a/docs/getting_started_agent.md b/docs/getting_started_agent.md new file mode 100644 index 00000000..13bddf45 --- /dev/null +++ b/docs/getting_started_agent.md @@ -0,0 +1,29 @@ +# Getting Started + +## Using an Agent Based on LangGraph + +To use the UiPath SDK with a LangGraph-based project: + +1. Add the `uipath-langchain` package to your project: + + ```shell + uv add uipath-langchain + ``` + +2. Initialize the project by running the following command in your activated virtual environment: + + ```shell + uipath init + ``` + + > **Note:**: The `uipath init` command will execute your code to analyze its structure and collect information about inputs and outputs. + +3. Package and publish your project: + ```shell + uipath pack + uipath publish + ``` + +This will create and publish your package to the UiPath platform, making it available for use in your automation workflows. + +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. diff --git a/docs/getting_started.md b/docs/getting_started_cli.md similarity index 58% rename from docs/getting_started.md rename to docs/getting_started_cli.md index de23fd98..72b42e22 100644 --- a/docs/getting_started.md +++ b/docs/getting_started_cli.md @@ -122,84 +122,3 @@ Finally, publish your package. After selecting your publishing destination (tena Publishing most recent package: test.0.1.0.nupkg Package published successfully! ``` - -## Using the SDK - -### Creating a Process Client - -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. - -Create a new project: - -```shell -mkdir test2 -cd test2 -uv init . --python 3.10 -uv add uipath -``` - -### Configuring the Project - -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: - -```shell -UIPATH_FOLDER_PATH=Shared -``` - -### Writing the Client Code - -Open `main.py` in your code editor and add the following code: - -```python -from uipath import UiPath - - -def main(): - sdk = UiPath() - sdk.processes.invoke( - "test-pack", - input_arguments={ - "message": "Hello, World!", - "repeat": 3, - "prefix": "[Echo]" - } - ) -``` - -> **Note:**: `test-pack` is the name of the process we created from the previous package. - -### Verifying the Execution - -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: - -``` -[Echo]: Hello, World! Echo: Hello, World! Echo: Hello, World! -``` - -## Using an Agent Based on LangGraph - -To use the UiPath SDK with a LangGraph-based project: - -1. Add the `uipath-langchain` package to your project: - - ```shell - uv add uipath-langchain - ``` - -2. Initialize the project by running the following command in your activated virtual environment: - - ```shell - uipath init - ``` - - > **Note:**: The `uipath init` command will execute your code to analyze its structure and collect information about inputs and outputs. - -3. Package and publish your project: - ```shell - uipath pack - uipath publish - ``` - -This will create and publish your package to the UiPath platform, making it available for use in your automation workflows. - -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. diff --git a/docs/getting_started_cloud.md b/docs/getting_started_cloud.md new file mode 100644 index 00000000..def752cc --- /dev/null +++ b/docs/getting_started_cloud.md @@ -0,0 +1,3 @@ +--8<-- +docs/plugins/uipath-langchain-python/samples/multi-agent-planner-researcher-coder-distributed/README.md:149:234 +--8<-- \ No newline at end of file diff --git a/docs/getting_started_sdk.md b/docs/getting_started_sdk.md new file mode 100644 index 00000000..518cf210 --- /dev/null +++ b/docs/getting_started_sdk.md @@ -0,0 +1,83 @@ +# Getting Started + +## Prerequisites + +- Python 3.10 or higher +- `pip` or `uv` package manager +- A UiPath Platform account with appropriate permissions + +## Creating a New Project + +We recommend using `uv` for package management. To create a new project: + +```shell +mkdir example +cd example +uv init . --python 3.10 +``` + +This command creates a basic project structure. + +### Installing the UiPath SDK + +Add the UiPath SDK to your project: + +```shell +uv add uipath +``` + +To verify the installation, run: + +```shell +uv run uipath --version +``` + +### Authentication + +To debug your script locally and publish your project, you need to authenticate with UiPath: + +```shell +uv run uipath auth +``` + +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. + +After completing this step, your project will contain a `.env` file with your access token, UiPath URL, and other configuration details. + +### Configuring the Project + +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: + +```shell +UIPATH_FOLDER_PATH=Shared +``` + +### Writing the Client Code + +Open `main.py` in your code editor and add the following code: + +```python +from uipath import UiPath + + +def main(): + sdk = UiPath() + sdk.processes.invoke( + "test-pack", + input_arguments={ + "message": "Hello, World!", + "repeat": 3, + "prefix": "[Echo]" + } + ) +``` + +> **Note:**: `test-pack` is the name of the process we created from the [previous package.](./getting_started_cli.md) + +### Verifying the Execution + +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: + +``` +[Echo]: Hello, World! Echo: Hello, World! Echo: Hello, World! +``` diff --git a/docs/index.md b/docs/index.md index 537ddb97..905d713a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,4 @@ ---8<-- -README.md ---8<-- +# Getting Started +- [CLI Guide](./getting_started_cli.md) - Learn how to use the UiPath Python CLI +- [SDK Guide](./getting_started_sdk.md) - Get started with the UiPath Python SDK +- [Agent Guide](./getting_started_agent.md) - Learn about working with LangGraph and UiPath diff --git a/docs/sdk.md b/docs/sdk.md new file mode 100644 index 00000000..537ddb97 --- /dev/null +++ b/docs/sdk.md @@ -0,0 +1,3 @@ +--8<-- +README.md +--8<-- diff --git a/mkdocs.yml b/mkdocs.yml index 8cd289ca..40755f10 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,9 +34,14 @@ theme: logo: assets/uipath-logo.svg nav: - - Getting Started: getting_started.md - - Home: + - Getting Started: - index.md + - CLI: getting_started_cli.md + - SDK: getting_started_sdk.md + - Agent: getting_started_agent.md + - Cloud: getting_started_cloud.md + - UiPath SDK: + - sdk.md - Actions: actions.md - Assets: assets.md - Buckets: buckets.md @@ -45,13 +50,13 @@ nav: - Jobs: jobs.md - Queues: queues.md - Processes: processes.md - - Langchain: + - UiPathLangchain: - plugins/uipath-langchain-python/README.md - Chat models: plugins/uipath-langchain-python/docs/chat_models.md - Context Grounding Chain: plugins/uipath-langchain-python/docs/context_grounding_chain.md - Context Grounding Retriever: plugins/uipath-langchain-python/docs/context_grounding_retriever.md - Interrupt models: plugins/uipath-langchain-python/docs/interrupt_models.md - - How To Contribute: how_to_contribute.md + - How To Contribute: CONTRIBUTING.md plugins: - search diff --git a/pyproject.toml b/pyproject.toml index 863279e5..eac53419 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.0.5" +version = "2.0.6" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10"