Use LangGraph with Azure OpenAI to automatically classify support tickets into predefined categories with confidence scores. UiPath Action Center integration for human approval step.
- Clone the repository:
git clone
cd samples\ticket-classification- Install dependencies:
pip install uv
uv venv -p 3.11 .venv
.venv\Scripts\activate
uv sync- Create a
.envfile in the project root with the following configuration:
UIPATH_URL=https://alpha.uipath.com/ada/byoa
UIPATH_ACCESS_TOKEN=xxx
AZURE_OPENAI_API_KEY=xxx
AZURE_OPENAI_ENDPOINT=xxxuipath run <entrypoint> <input> [--resume]To classify a ticket, run the script using UiPath CLI:
uipath run agent '{"message": "GET Assets API does not enforce proper permissions Assets.View", "ticket_id": "TICKET-2345"}'To resume the graph with approval:
uipath run agent true --resumeThe input ticket should be in the following format:
{
"message": "The ticket message or description",
"ticket_id": "Unique ticket identifier",
"assignee"[optional]: "username or email of the person assigned to handle escalations"
}The script outputs JSON with the classification results:
{
"label": "security",
"confidence": 0.9
}This guide walks you through deploying and running the ticket classification agent on the UiPath Cloud Platform.
- Access to UiPath Cloud Platform
- Python 3.11 or higher
- Git
# Clone the repository
git clone https://github.com/UiPath/uipath-langchain-python.git
cd uipath-langchain-python/samples/ticket-classificationThe Ticket Classification Agent utilizes HITL (Human In The Loop) technology, allowing the system to incorporate feedback directly from supervisory personnel. We'll leverage UiPath Action Center for this functionality.
There are two ways to configure the escalation app:
After publishing the agent package, you can override the escalation app directly from the Package Requirements tab in UiPath, without modifying any code. This is made possible by the bindings.json file included in this sample.
In the Package Requirements tab, select the app you want to use as the escalation app. The app you bind must respect the following contract expected by the agent code:
- Inputs:
AgentOutput(string) — the classification summary sent to the reviewerAgentName(string) — the name of the agent creating the task
- Output:
Answer(boolean) —trueto approve,falseto reject
This approach allows you to use any compatible UiPath App as the escalation interface, swapping it out without redeploying or editing code.
Follow these steps to deploy the pre-built application using UiPath Solutions Management:
-
Upload Solution Package
- Navigate to UiPath Solutions Management
- Drag and drop generic-escalation-app-solution-1.0.0.zip to the upload area
- Click the Upload button
-
Initiate Deployment
- Wait for the package to be processed and ready for deployment
-
Select Destination
- Choose a destination folder or install as root folder under tenant
-
Complete Configuration
- Follow the solution configuration wizard prompts
-
Activate the Apps
- After deployment, activate the apps following the UiPath documentation
-
Verify and Configure
- Navigate to the solution folder to verify the escalation app creation
- Copy the folder path for configuration
- Update the
FOLDER_PATH_PLACEHOLDERstring inmain.py(line 148) with the copied folder path
- Set Up Python Environment
# Install UV package manager
pip install uv
# Create and activate virtual environment
uv venv -p 3.11 .venv
# Windows
.venv\Scripts\activate
# Unix-like Systems
source .venv/bin/activate
# Install dependencies
uv sync- UiPath Authentication
uipath authNote: After successful authentication in the browser, select the tenant for publishing the agent package.
👇 Select tenant:
0: DefaultTenant
1: Tenant2
2: Tenant3
...
Select tenant: 2
- Package and Publish
# Create and publish the package
uipath pack
uipath publishSelect the feed to publish your package:
👇 Select package feed:
0: Orchestrator Tenant Processes Feed
1: Orchestrator Folder1 Feed
2: Orchestrator Folder2 Feed
3: Orchestrator Personal Workspace Feed
...
Select feed number: 3
Note: When publishing to personal workspace feed, the process will be auto-created for you.
-
Start the Agent
- Navigate to your agent in the UiPath workspace
- Click "Run" to start a new job
-
Monitor Progress
- Track the agent's progress using the details side panel
-
Handle Human-in-the-Loop Tasks
- When a ticket is classified, a Resume Condition tab will appear
- Use this link to navigate to UiPath Action Center for human intervention
For detailed information about UiPath Action Center and its features, refer to the official documentation.












