From 7cb11e0bd2b0ff5f1b64fd17403715d5899a2eb5 Mon Sep 17 00:00:00 2001 From: Dushyant Pathak Date: Fri, 27 Mar 2026 15:35:30 +0530 Subject: [PATCH] feat: add ArgumentEmail and ArgumentGroupName escalation recipient types Adds two new recipient types to support argument-driven assignees in escalation channels. The assignee email or group name is resolved from a named input argument at runtime, rather than being fixed at design time. - ArgumentEmail (type=7): resolves to an email recipient - ArgumentGroupName (type=8): resolves to a group-name recipient Both carry argumentName (snake_case: argument_name) which is looked up in the execution input at runtime by the escalation tool layer. Co-Authored-By: Claude Sonnet 4.6 --- src/uipath/agent/models/agent.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/uipath/agent/models/agent.py b/src/uipath/agent/models/agent.py index 528367481..74698d0ec 100644 --- a/src/uipath/agent/models/agent.py +++ b/src/uipath/agent/models/agent.py @@ -133,6 +133,8 @@ class AgentEscalationRecipientType(str, CaseInsensitiveEnum): ASSET_USER_EMAIL = "AssetUserEmail" GROUP_NAME = "GroupName" ASSET_GROUP_NAME = "AssetGroupName" + ARGUMENT_EMAIL = "ArgumentEmail" + ARGUMENT_GROUP_NAME = "ArgumentGroupName" class AgentContextRetrievalMode(str, CaseInsensitiveEnum): @@ -429,6 +431,8 @@ class AgentMcpResourceConfig(BaseAgentResourceConfig): 5: AgentEscalationRecipientType.GROUP_NAME, "staticgroupname": AgentEscalationRecipientType.GROUP_NAME, 6: AgentEscalationRecipientType.ASSET_GROUP_NAME, + 7: AgentEscalationRecipientType.ARGUMENT_EMAIL, + 8: AgentEscalationRecipientType.ARGUMENT_GROUP_NAME, } @@ -484,8 +488,26 @@ class AssetRecipient(BaseEscalationRecipient): folder_path: str = Field(..., alias="folderPath") +class ArgumentEmailRecipient(BaseEscalationRecipient): + """Argument email recipient resolved from a named input argument.""" + + type: Literal[ + AgentEscalationRecipientType.ARGUMENT_EMAIL, + ] = Field(..., alias="type") + argument_name: str = Field(..., alias="argumentName") + + +class ArgumentGroupNameRecipient(BaseEscalationRecipient): + """Argument group name recipient resolved from a named input argument.""" + + type: Literal[ + AgentEscalationRecipientType.ARGUMENT_GROUP_NAME, + ] = Field(..., alias="type") + argument_name: str = Field(..., alias="argumentName") + + AgentEscalationRecipient = Annotated[ - Union[StandardRecipient, AssetRecipient], + Union[StandardRecipient, AssetRecipient, ArgumentEmailRecipient, ArgumentGroupNameRecipient], Field(discriminator="type"), BeforeValidator(_normalize_recipient_type), ]