Skip to content

feat(action-center): extend taskSourceMetadata on CreateTask/CreateEscalation - #1873

Draft
dushyant-uipath wants to merge 2 commits into
mainfrom
conversational-agent-task-source-metadata
Draft

feat(action-center): extend taskSourceMetadata on CreateTask/CreateEscalation#1873
dushyant-uipath wants to merge 2 commits into
mainfrom
conversational-agent-task-source-metadata

Conversation

@dushyant-uipath

Copy link
Copy Markdown
Contributor

AGVSOL-123456 / ACTN-123

Summary

  • HITL tasks created via interrupt(CreateEscalation(...)) cannot carry caller-supplied context (e.g. a conversational-agent id) in taskSource.taskSourceMetadata today. That dict is built entirely from UiPathConfig state (InstanceId/FolderKey/JobKey/ProcessKey) with no extension point.
  • Adds an optional task_source_metadata: dict[str, Any] | None field to CreateTask (inherited by CreateEscalation) and to TasksService.create/create_async, threaded through _create_spec into _apply_task_source, where it's merged on top of the built-in keys (caller keys win on collision).
  • Wires it through UiPathResumeTriggerCreator._handle_task_trigger so a coded agent's interrupt(CreateEscalation(task_source_metadata={...})) actually reaches the API call.
  • Purely additive. New optional param defaulting to None, no behavior change for existing callers.

Context

Raised from an internal ask (Verticals HITL / conversational-agent integration, tracked as ACTN-123). A coded agent needs to pass a conversationalAgentId downstream on the Action Center task so a Slack/Teams bot can resolve which conversational agent to associate with a HITL task. taskSourceMetadata is the natural home for this since it already carries job/process correlation ids, but the current model has no way to extend it. This is a draft for the platform team's review; the field name/shape can change, and it could instead fold into actionable_message_metadata if that fits the wire contract better.

Test plan

  • Added unit tests (test_create_merges_task_source_metadata, test_create_async_merges_task_source_metadata, test_create_omits_extra_task_source_metadata_when_unset) in packages/uipath-platform/tests/services/test_actions_service.py
  • CI. Not run locally; pushed for CI to validate.

…k/CreateEscalation

HITL tasks created via interrupt(CreateEscalation(...)) have no way to carry
caller-supplied context (e.g. a conversational-agent id) in taskSource.taskSourceMetadata
today: it is built entirely from UiPathConfig state with no extension point.

Add an optional task_source_metadata dict to CreateTask (inherited by CreateEscalation)
and TasksService.create/create_async, threaded through _create_spec and merged into
taskSourceMetadata on top of the built-in InstanceId/FolderKey/JobKey/ProcessKey keys.
Additive only; no change for existing callers.
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Aug 27, 2026
…ustom_metadata

Clearer internal param name; no behavior or public-API change.

def _apply_task_source(
payload: Dict[str, Any], source_name: str, is_debug: bool = False
payload: Dict[str, Any],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Get the alignment back to the original one so the difference doesn't look this big

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.

1 participant