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
2 changes: 1 addition & 1 deletion packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.10.35"
version = "2.10.36"
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.11"
Expand Down
4 changes: 4 additions & 0 deletions packages/uipath/samples/csv_employee_generator/bindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "2.0",
"resources": []
}
55 changes: 55 additions & 0 deletions packages/uipath/samples/csv_employee_generator/entry-points.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "https://cloud.uipath.com/draft/2024-12/entry-point",
"$id": "entry-points.json",
"entryPoints": [
{
"filePath": "main",
"uniqueId": "d3fdfadf-469d-408a-89bb-9f3202467632",
"type": "function",
"input": {
"type": "object",
"properties": {
"department": {
"title": "Department",
"type": "string"
},
"count": {
"default": 3,
"title": "Count",
"type": "integer"
}
},
"required": [
"department"
],
"title": "Input"
},
"output": {
"type": "object",
"properties": {
"csv_data": {
"title": "Csv Data",
"type": "string"
}
},
"required": [
"csv_data"
],
"title": "Output"
},
"graph": {
"nodes": [
{
"id": "main.py:72",
"name": "main",
"type": "function",
"metadata": {
"file": "main.py"
}
}
],
"edges": []
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
{
"id": "employee-csv-eval",
"name": "Employee CSV Generator Evaluation",
"description": "Tests the CSV employee generator agent with various scenarios",
"fileName": "employee_csv_eval_set.json",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"evaluatorRefs": [
"csv-name-match",
"csv-name-age-match",
"csv-line-by-line-name"
],
"evaluations": [
{
"id": "eng-3-name-only",
"name": "Engineering - 3 employees - Name only",
"inputs": {
"department": "Engineering",
"count": 3
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nAlice Johnson,28,Software Engineer\nBob Smith,32,Senior Engineer\nCarol Davis,26,DevOps Engineer"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "eng-3-name-age",
"name": "Engineering - 3 employees - Name and Age",
"inputs": {
"department": "Engineering",
"count": 3
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nAlice Johnson,28,Software Engineer\nBob Smith,32,Senior Engineer\nCarol Davis,26,DevOps Engineer"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "sales-2-name-age",
"name": "Sales - 2 employees - Name and Age",
"inputs": {
"department": "Sales",
"count": 2
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nFrank Brown,30,Sales Rep\nGrace Lee,27,Account Manager"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "hr-2-line-by-line",
"name": "HR - 2 employees - Line by line Name check",
"inputs": {
"department": "HR",
"count": 2
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nKelly White,34,HR Manager\nLiam Garcia,28,Recruiter"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "eng-wrong-name-fail",
"name": "Engineering - Wrong name (should fail)",
"inputs": {
"department": "Engineering",
"count": 3
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nWrong Name,28,Software Engineer\nBob Smith,32,Senior Engineer\nCarol Davis,26,DevOps Engineer"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
},
{
"id": "eng-partial-match",
"name": "Engineering - Line by line with partial match",
"inputs": {
"department": "Engineering",
"count": 3
},
"expectedOutput": {
"csv_data": "Name,Age,Role\nAlice Johnson,28,Software Engineer\nWrong Name,32,Senior Engineer\nCarol Davis,26,DevOps Engineer"
},
"evaluationCriterias": {
"csv-name-match": null,
"csv-name-age-match": null,
"csv-line-by-line-name": null
},
"evalSetId": "employee-csv-eval",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
],
"modelSettings": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"fileName": "csv_line_by_line_name.json",
"id": "csv-line-by-line-name",
"name": "CSV Line-by-Line Name Match",
"description": "Checks if Name column matches for each row in the CSV output",
"category": 0,
"type": 10,
"targetSubOutputKey": "Name",
"targetOutputKey": "csv_data",
"lineByLineEvaluation": true,
"lineDelimiter": "\n",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"fileName": "csv_name_age_match.json",
"id": "csv-name-age-match",
"name": "CSV Name and Age Match",
"description": "Checks if Name and Age columns match in the CSV output",
"category": 0,
"type": 10,
"targetSubOutputKey": "Name,Age",
"targetOutputKey": "csv_data",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"fileName": "csv_name_match.json",
"id": "csv-name-match",
"name": "CSV Name Column Match",
"description": "Checks if the Name column matches in the CSV output",
"category": 0,
"type": 10,
"targetSubOutputKey": "Name",
"targetOutputKey": "csv_data",
"createdAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z"
}
72 changes: 72 additions & 0 deletions packages/uipath/samples/csv_employee_generator/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
"""CSV Employee Generator Agent.

This agent generates employee data in CSV format based on the department and count.
"""

from pydantic import BaseModel


class Input(BaseModel):
"""Input schema for employee generation."""

department: str
count: int = 3


class Output(BaseModel):
"""Output schema with CSV data."""

csv_data: str


def main(input: Input) -> Output:
"""Generate employee CSV data based on department and count.

Args:
input: Request with department and count

Returns:
Output with CSV formatted employee data
"""
# Employee database by department
employees_by_dept = {
"Engineering": [
("Alice Johnson", 28, "Software Engineer"),
("Bob Smith", 32, "Senior Engineer"),
("Carol Davis", 26, "DevOps Engineer"),
("David Wilson", 35, "Tech Lead"),
("Eve Martinez", 29, "QA Engineer"),
],
"Sales": [
("Frank Brown", 30, "Sales Rep"),
("Grace Lee", 27, "Account Manager"),
("Henry Taylor", 33, "Sales Director"),
("Ivy Chen", 25, "Sales Associate"),
("Jack Kumar", 31, "Regional Manager"),
],
"HR": [
("Kelly White", 34, "HR Manager"),
("Liam Garcia", 28, "Recruiter"),
("Maya Patel", 29, "HR Specialist"),
("Noah Johnson", 32, "Training Coordinator"),
("Olivia Rodriguez", 26, "HR Assistant"),
],
}

# Get employees for the requested department
department = input.department
count = min(input.count, 5) # Max 5 employees per department

if department not in employees_by_dept:
# Return empty result for unknown department
csv_lines = ["Name,Age,Role"]
return Output(csv_data="\n".join(csv_lines))

employees = employees_by_dept[department][:count]

# Generate CSV
csv_lines = ["Name,Age,Role"]
for name, age, role in employees:
csv_lines.append(f"{name},{age},{role}")

return Output(csv_data="\n".join(csv_lines))
12 changes: 12 additions & 0 deletions packages/uipath/samples/csv_employee_generator/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "csv-employee-generator"
version = "0.0.1"
description = "csv-employee-generator"
authors = [{ name = "John Doe", email = "john.doe@myemail.com" }]
dependencies = [
"uipath"
]
requires-python = ">=3.11"

[tool.uv.sources]
uipath = { path = "../..", editable = true }
17 changes: 17 additions & 0 deletions packages/uipath/samples/csv_employee_generator/uipath.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://cloud.uipath.com/draft/2024-12/uipath",
"runtimeOptions": {
"isConversational": false
},
"packOptions": {
"fileExtensionsIncluded": [],
"filesIncluded": [],
"filesExcluded": [],
"directoriesExcluded": [],
"includeUvLock": true
},
"functions": {
"main": "main.py:main"
},
"agents": {}
}
Loading
Loading