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
4 changes: 2 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: discover
run: |
# Find all testcase folders (excluding common folders like README, etc.)
testcase_dirs=$(find testcases -maxdepth 1 -type d -name "*-*" | sed 's|testcases/||' | sort)
testcase_dirs=$(find packages/uipath-llamaindex/testcases -maxdepth 1 -type d -name "*-*" | sed 's|packages/uipath-llamaindex/testcases/||' | sort)

echo "Found testcase directories:"
echo "$testcase_dirs"
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
CLIENT_ID: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_ID || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_ID || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_ID }}
CLIENT_SECRET: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_SECRET || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_SECRET || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_SECRET }}
BASE_URL: ${{ matrix.environment == 'alpha' && secrets.ALPHA_BASE_URL || matrix.environment == 'staging' && secrets.STAGING_BASE_URL || matrix.environment == 'cloud' && secrets.CLOUD_BASE_URL }}
working-directory: testcases/${{ matrix.testcase }}
working-directory: packages/uipath-llamaindex/testcases/${{ matrix.testcase }}
run: |
echo "Running testcase: ${{ matrix.testcase }}"
echo "Environment: ${{ matrix.environment }}"
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
jobs:
publish-dev:
runs-on: ubuntu-latest
strategy:
matrix:
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 @@ -36,7 +43,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$pyprojcontent = Get-Content pyproject.toml -Raw
$pyprojPath = "${{ matrix.package.path }}/pyproject.toml"
$pyprojcontent = Get-Content $pyprojPath -Raw

$PROJECT_NAME = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?name\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
$CURRENT_VERSION = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
Expand All @@ -55,9 +63,9 @@ jobs:
$DEV_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR$PADDED_RUN"

# Update version in pyproject.toml
(Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
(Get-Content $pyprojPath) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content $pyprojPath

Write-Output "Package version set to $DEV_VERSION"
Write-Output "Package $PROJECT_NAME version set to $DEV_VERSION"

$dependencyMessage = @"
## Development Package
Expand Down Expand Up @@ -119,7 +127,7 @@ jobs:
Write-Output "Updated PR description with development package information"

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

- name: Publish
run: uv publish --index testpypi
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ jobs:
uses: ./.github/workflows/test.yml

build:
name: Build
name: Build ${{ matrix.package }}
runs-on: ubuntu-latest
strategy:
matrix:
package:
- uipath-llamaindex
- uipath-openai-agents

needs:
- lint
Expand Down Expand Up @@ -46,18 +51,23 @@ 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
with:
name: release-dists
name: release-dists-${{ matrix.package }}
path: dist/

pypi-publish:
name: Upload release to PyPI
name: Upload ${{ matrix.package }} to PyPI
runs-on: ubuntu-latest
environment: pypi
strategy:
matrix:
package:
- uipath-llamaindex
- uipath-openai-agents

needs:
- build
Expand All @@ -69,7 +79,7 @@ jobs:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
name: release-dists-${{ matrix.package }}
path: dist/

- name: Publish package distributions to PyPI
Expand Down
147 changes: 64 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,106 @@
# UiPath LlamaIndex Python SDK
# UiPath AI Agent Runtimes for Python

[![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.
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.

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).
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).

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

## Requirements

- Python 3.11 or higher
- UiPath Automation Cloud account

## Installation

```bash
pip install uipath-llamaindex
```
### UiPath LlamaIndex

using `uv`:
[![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/)

```bash
uv add uipath-llamaindex
```
Build agents using the [LlamaIndex](https://www.llamaindex.ai/) framework with support for RAG, multiple LLM providers, and state persistence.

## Configuration
- **Installation**: `pip install uipath-llamaindex`
- **Documentation**: [packages/uipath-llamaindex/](packages/uipath-llamaindex/)
- **Samples**: [packages/uipath-llamaindex/samples/](packages/uipath-llamaindex/samples/)

### Environment Variables
### UiPath OpenAI Agents

Create a `.env` file in your project root with the following variables:
[![PyPI - Version](https://img.shields.io/pypi/v/uipath-openai-agents)](https://pypi.org/project/uipath-openai-agents/)

```
UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME
UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE
```
Build agents using [OpenAI's native Agents framework](https://platform.openai.com/docs/agents) for multi-agent coordination.

## Command Line Interface (CLI)
- **Installation**: `pip install uipath-openai-agents`
- **Documentation**: [packages/uipath-openai-agents/](packages/uipath-openai-agents/)
- **Status**: ⚠️ Early development (v0.1.0)

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

### Initialize a Project
- Python 3.11 or higher
- UiPath Automation Cloud account

```bash
uipath init
```
## Quick Start

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.
Choose the agent framework that best fits your needs and follow the installation instructions for that package:

For more details on the configuration format, see the [UiPath configuration specifications](https://github.com/UiPath/uipath-python/blob/main/specs/README.md).
- **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/)

### Authentication
## Documentation

```bash
uipath auth
```
- [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/)

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

### Debug a Project
This repository is organized as a UV workspace with multiple packages:

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

Executes the agent with the provided JSON input arguments.

### Package a Project

```bash
uipath pack
uipath-llamaindex-python/
├── packages/
│ ├── uipath-llamaindex/ # LlamaIndex runtime
│ └── uipath-openai-agents/ # OpenAI Agents runtime
├── docs/ # Shared documentation
└── pyproject.toml # Workspace configuration
```

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

**Note:** Your `pyproject.toml` must include:

- A description field (avoid characters: &, <, >, ", ', ;)
- Author information

Example:
## Development

```toml
description = "Your package description"
authors = [{name = "Your Name", email = "your.email@example.com"}]
```
### Setting Up a Development Environment

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

```bash
uipath publish
```

Publishes the most recently created package to your UiPath Orchestrator.
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh

## Project Structure
# Clone the repository
git clone https://github.com/UiPath/uipath-llamaindex-python.git
cd uipath-llamaindex-python

To properly use the CLI for packaging and publishing, your project should include:
# Install all dependencies
uv sync --all-extras

- 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
# Run tests for all packages
uv run pytest

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

### 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-llamaindex-python/blob/main/CONTRIBUTING.md) before submitting a pull request.
Please read our [contribution guidelines](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.
42 changes: 42 additions & 0 deletions packages/uipath-llamaindex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# UiPath LlamaIndex SDK

Build intelligent AI agents with LlamaIndex and UiPath.

## Installation

```bash
pip install uipath-llamaindex
```

### Optional dependencies

For AWS Bedrock support:
```bash
pip install uipath-llamaindex[bedrock]
```

For Google Vertex AI support:
```bash
pip install uipath-llamaindex[vertex]
```

## Quick Start

See the [main repository documentation](../../docs/quick_start.md) for getting started guides and examples.

## Features

- **LlamaIndex Integration**: Build agents using LlamaIndex's powerful orchestration framework
- **Multiple LLM Providers**: Support for OpenAI, Azure OpenAI, AWS Bedrock, and Google Vertex AI
- **RAG Capabilities**: Built-in retrieval-augmented generation with context grounding
- **State Management**: Resumable workflows with SQLite-based state persistence
- **Breakpoints & HITL**: Human-in-the-loop support with debugging capabilities
- **Observability**: Built-in tracing and instrumentation

## Documentation

Full documentation is available in the [main repository](https://github.com/UiPath/uipath-llamaindex-python).

## License

See [LICENSE](../../LICENSE) in the repository root.
Loading
Loading