Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ permissions:
jobs:
discover-testcases:
uses: ./.github/workflows/discover-testcases.yml

integration-tests:
needs: [discover-testcases]
runs-on: ubuntu-latest
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
package:
- name: uipath-llamaindex
path: packages/uipath-llamaindex
- name: uipath-openai-agents
path: packages/uipath-openai-agents
permissions:
contents: read
pull-requests: write
Expand Down Expand Up @@ -69,9 +71,7 @@ jobs:
Write-Output "Package $PROJECT_NAME version set to $DEV_VERSION"

$dependencyMessage = @"
## Development Package

- Add this package as a dependency in your pyproject.toml:
### $PROJECT_NAME

``````toml
[project]
Expand Down Expand Up @@ -110,12 +110,23 @@ jobs:
$currentBody = $pr.body

# Check if there's already a development package section
if ($currentBody -match '## Development Package') {
# Replace the existing section with the new dependency message
$newBody = $currentBody -replace '## Development Package(\r?\n|.)*?(?=##|$)', $dependencyMessage
if ($currentBody -match '## Development Packages') {
# Check if this specific package already has a section
if ($currentBody -match "### $PROJECT_NAME") {
# Replace the existing package section
$newBody = $currentBody -replace "### $PROJECT_NAME(\r?\n|.)*?(?=###|##|$)", $dependencyMessage
} else {
# Append this package to the Development Packages section
$newBody = $currentBody -replace '(## Development Packages)', "`$1`n`n$dependencyMessage"
}
} else {
# Append the dependency message to the end of the description
$newBody = if ($currentBody) { "$currentBody`n`n$dependencyMessage" } else { $dependencyMessage }
# Create the Development Packages section with this package
$packageSection = @"
## Development Packages

$dependencyMessage
"@
$newBody = if ($currentBody) { "$currentBody`n`n$packageSection" } else { $packageSection }
}

# Update the PR description
Expand All @@ -125,10 +136,10 @@ jobs:

Invoke-RestMethod -Uri $prUri -Method Patch -Headers $headers -Body $updateBody -ContentType "application/json"

Write-Output "Updated PR description with development package information"
Write-Output "Updated PR description with development package information for $PROJECT_NAME"

- name: Build package
run: uv build
run: uv build --package ${{ matrix.package.name }}

- name: Publish
run: uv publish --index testpypi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
matrix:
package:
- uipath-llamaindex
- uipath-openai-agents

needs:
- lint
Expand Down Expand Up @@ -53,7 +54,7 @@ jobs:
run: uv sync --all-extras

- name: Build
run: uv build
run: uv build --package ${{ matrix.package }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand All @@ -69,6 +70,7 @@ jobs:
matrix:
package:
- uipath-llamaindex
- uipath-openai-agents

needs:
- build
Expand Down
137 changes: 55 additions & 82 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# UiPath LlamaIndex Python SDK
# UiPath AI Agent Runtimes for Python

A collection of Python SDKs that enable developers to build and deploy AI agents to the UiPath Cloud Platform using different agent frameworks. These packages provide programmatic interaction with UiPath Cloud Platform services and human-in-the-loop (HITL) semantics through Action Center integration.

All packages are extensions to the [UiPath Python SDK](https://github.com/UiPath/uipath-python) and implement the [UiPath Runtime Protocol](https://github.com/UiPath/uipath-runtime-python).

## Available Packages

### UiPath LlamaIndex

[![PyPI - Version](https://img.shields.io/pypi/v/uipath-llamaindex)](https://pypi.org/project/uipath-llamaindex/)
[![PyPI downloads](https://img.shields.io/pypi/dm/uipath-llamaindex.svg)](https://pypi.org/project/uipath-llamaindex/)
[![Python versions](https://img.shields.io/pypi/pyversions/uipath-llamaindex.svg)](https://pypi.org/project/uipath-llamaindex/)

A Python SDK that enables developers to build and deploy LlamaIndex agents to the UiPath Cloud Platform. It provides programmatic interaction with UiPath Cloud Platform services and human-in-the-loop (HITL) semantics through Action Center integration.
Build agents using the [LlamaIndex](https://www.llamaindex.ai/) framework with support for RAG, multiple LLM providers, and state persistence.

This package is an extension to the [UiPath Python SDK](https://github.com/UiPath/uipath-python) and implements the [UiPath Runtime Protocol](https://github.com/UiPath/uipath-runtime-python).
- **Installation**: `pip install uipath-llamaindex`
- **Documentation**: [packages/uipath-llamaindex/](packages/uipath-llamaindex/)
- **Samples**: [packages/uipath-llamaindex/samples/](packages/uipath-llamaindex/samples/)

Check out these [sample projects](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-llamaindex/samples) to see the SDK in action.

Expand All @@ -15,111 +24,75 @@ Check out these [sample projects](https://github.com/UiPath/uipath-integrations-
- Python 3.11 or higher
- UiPath Automation Cloud account

## Installation
## Quick Start

```bash
pip install uipath-llamaindex
```
Choose the agent framework that best fits your needs and follow the installation instructions for that package:

using `uv`:
- **LlamaIndex**: For RAG applications and stateful workflows → See [LlamaIndex documentation](packages/uipath-llamaindex/)
- **OpenAI Agents**: For multi-agent systems → See [OpenAI Agents documentation](packages/uipath-openai-agents/)

```bash
uv add uipath-llamaindex
```
## Documentation

## Configuration
- [Quick Start Guide](docs/quick_start.md)
- [LlamaIndex Package Documentation](packages/uipath-llamaindex/)
- [OpenAI Agents Package Documentation](packages/uipath-openai-agents/)
- [Sample Projects](packages/uipath-llamaindex/samples/)

### Environment Variables
## Monorepo Structure

Create a `.env` file in your project root with the following variables:
This repository is organized as a UV workspace with multiple packages:

```
UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
uipath-llamaindex-python/
├── packages/
│ ├── uipath-llamaindex/ # LlamaIndex runtime
│ └── uipath-openai-agents/ # OpenAI Agents runtime
├── docs/ # Shared documentation
└── pyproject.toml # Workspace configuration
```

## Command Line Interface (CLI)

The SDK provides a command-line interface for creating, packaging, and deploying LlamaIndex Agents:

### Initialize a Project

```bash
uipath init
```

Running `uipath init` will process the workflow definitions in the `llama_index.json` file and create the corresponding `entry-points.json` file needed for deployment.

For more details on the configuration format, see the [UiPath configuration specifications](https://github.com/UiPath/uipath-python/blob/main/specs/README.md).

### Authentication

```bash
uipath auth
```

This command opens a browser for authentication and creates/updates your `.env` file with the proper credentials.

### Debug a Project

```bash
uipath run WORKFLOW [INPUT]
```
## Development

Executes the agent with the provided JSON input arguments.
### Setting Up a Development Environment

### Package a Project
This repository uses [UV](https://docs.astral.sh/uv/) for workspace management:

```bash
uipath pack
```

Packages your project into a `.nupkg` file that can be deployed to UiPath.

**Note:** Your `pyproject.toml` must include:
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh

- A description field (avoid characters: &, <, >, ", ', ;)
- Author information
# Clone the repository
git clone https://github.com/UiPath/uipath-llamaindex-python.git
cd uipath-llamaindex-python

Example:

```toml
description = "Your package description"
authors = [{name = "Your Name", email = "your.email@example.com"}]
```
# Install all dependencies
uv sync --all-extras

### Publish a Package
# Run tests for all packages
uv run pytest

```bash
uipath publish
# Build a specific package
uv build --package uipath-llamaindex
uv build --package uipath-openai-agents
```

Publishes the most recently created package to your UiPath Orchestrator.

## Project Structure

To properly use the CLI for packaging and publishing, your project should include:

- A `pyproject.toml` file with project metadata
- A `llama_index.json` file with your workflow definitions (e.g., `"workflows": {"agent": "main.py:agent"}`)
- A `entry-points.json` file (generated by `uipath init`)
- A `bindings.json` file (generated by `uipath init`) to configure resource overrides
- Any Python files needed for your automation

## Development

### Developer Tools

Check out [uipath-dev](https://github.com/uipath/uipath-dev-python) - an interactive terminal application for building, testing, and debugging UiPath Python runtimes, agents, and automation scripts.

### Setting Up a Development Environment
### Contributing

Please read our [contribution guidelines](https://github.com/UiPath/uipath-integrations-python/packages/uipath-llamaindex/blob/main/CONTRIBUTING.md) before submitting a pull request.

### Special Thanks
## Special Thanks

A huge thank-you to the open-source community and the maintainers of the libraries that make this project possible:

- [LlamaIndex](https://github.com/run-llama/llama_index) for providing a powerful framework for building stateful LLM applications.
- [OpenInference](https://github.com/Arize-ai/openinference) for observability and instrumentation support.
- [Pydantic](https://github.com/pydantic/pydantic) for reliable, typed configuration and validation.
- [LlamaIndex](https://github.com/run-llama/llama_index) for providing a powerful framework for building stateful LLM applications
- [OpenAI](https://github.com/openai) for the Agents framework and APIs
- [OpenInference](https://github.com/Arize-ai/openinference) for observability and instrumentation support
- [Pydantic](https://github.com/pydantic/pydantic) for reliable, typed configuration and validation

## License

See [LICENSE](LICENSE) for details.
Loading
Loading