Skip to content

feat(agent): add tool-output and V2 escalation recipient types [ACTN-10480]#1667

Open
kunaluipath wants to merge 1 commit into
mainfrom
feat/custom-assignments
Open

feat(agent): add tool-output and V2 escalation recipient types [ACTN-10480]#1667
kunaluipath wants to merge 1 commit into
mainfrom
feat/custom-assignments

Conversation

@kunaluipath
Copy link
Copy Markdown

Adds the agent + platform models needed for the V2 HITL escalation recipient flow consumed by the langchain runtime.

uipath/agent/models:

  • New literal recipient classes for Workload (9), RoundRobin (10), and CustomAssignees (11) matching the storage schema v50 surface.
  • New ToolOutputRecipient class accepting types USER_ID/GROUP_ID/WORKLOAD/ ROUND_ROBIN/CUSTOM_ASSIGNEES with source="toolOutput", toolName, outputPath fields for runtime-resolved assignees.
  • ToolOutputRecipient listed first in the recipient Union so payloads carrying source match before falling through to literal variants.

uipath/platform/action_center:

  • TaskRecipientType gains Workload and RoundRobin members.
  • TaskRecipient gains an optional values list field for the multi-assignee assigneeNamesOrEmails payload.
  • _tasks_service updated to forward the new fields when present.

Backwards-compatible: existing payloads without source/values parse and serialize identically.

@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels May 20, 2026
@kunaluipath kunaluipath force-pushed the feat/custom-assignments branch from 3b6310b to e7fe287 Compare June 2, 2026 00:46
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@kunaluipath kunaluipath force-pushed the feat/custom-assignments branch from e7fe287 to c43467d Compare June 2, 2026 02:25
Copilot AI review requested due to automatic review settings June 4, 2026 20:32
@kunaluipath kunaluipath force-pushed the feat/custom-assignments branch from c43467d to be04069 Compare June 4, 2026 20:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the agent escalation-recipient model surface to support V2 HITL escalation recipient flows (including tool-output-resolved recipients) and updates the Action Center task-assignment client models/services to send the new recipient variants and multi-assignee payloads. It also bumps package versions and lockfiles accordingly.

Changes:

  • Add new agent escalation recipient types (Workload/RoundRobin/CustomAssignees) plus a ToolOutputRecipient binding for runtime-resolved assignees.
  • Extend Action Center task recipient modeling with WORKLOAD/ROUND_ROBIN and support multi-assignee values mapped into assigneeNamesOrEmails.
  • Bump uipath and uipath-platform versions and refresh uv.lock metadata.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/uipath/src/uipath/agent/models/agent.py Adds new escalation recipient types and the tool-output recipient binding; adjusts union parsing strategy.
packages/uipath/tests/agent/models/test_agent.py Adds deserialization tests for new recipient variants and tool-output binding behavior.
packages/uipath-platform/src/uipath/platform/action_center/tasks.py Adds WORKLOAD/ROUND_ROBIN recipient types and optional values for multi-assignee payloads.
packages/uipath-platform/src/uipath/platform/action_center/_tasks_service.py Updates assignment request building to emit Workload/RoundRobin criteria and forward multi-assignee values.
packages/uipath-platform/tests/services/test_actions_service.py Adds tests asserting new assignment payload shapes for Workload/RoundRobin and multi-assignee values.
packages/uipath/pyproject.toml Bumps uipath version and uipath-platform dependency lower bound.
packages/uipath-platform/pyproject.toml Bumps uipath-platform version.
packages/uipath/uv.lock Updates lock metadata and bumps editable package versions.
packages/uipath-platform/uv.lock Updates lock metadata and bumps editable package version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +690 to +694
# Note: order matters in this union — ToolOutputRecipient is listed first so payloads
# carrying `source: "toolOutput"` match it before the literal variants get a chance.
# The literal classes don't define a `source` field, so Pydantic's overlap heuristics
# pick the right class via the presence of required fields (value/displayName vs
# source/toolName/outputPath). A `Field(discriminator="type")` cannot be used here
Adds the agent + platform models needed for the V2 HITL escalation
recipient flow consumed by the langchain runtime.

uipath/agent/models:
- New literal recipient classes for Workload (9), RoundRobin (10), and
  CustomAssignees (11) matching the storage schema v50 surface.
- New ToolOutputRecipient class accepting types USER_ID/GROUP_ID/WORKLOAD/
  ROUND_ROBIN/CUSTOM_ASSIGNEES with source="toolOutput", toolName,
  outputPath fields for runtime-resolved assignees.
- ToolOutputRecipient listed first in the recipient Union so payloads
  carrying `source` match before falling through to literal variants.

uipath/platform/action_center:
- TaskRecipientType gains Workload and RoundRobin members.
- TaskRecipient gains an optional `values` list field for the
  multi-assignee assigneeNamesOrEmails payload.
- _tasks_service updated to forward the new fields when present.

Backwards-compatible: existing payloads without source/values parse and
serialize identically.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@kunaluipath kunaluipath force-pushed the feat/custom-assignments branch from be04069 to 2ddb1da Compare June 5, 2026 23:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants