Skip to content

feat(tasks): add QuickForm task creation SDK + agent.json model#1683

Open
chetanyauipath wants to merge 11 commits into
mainfrom
feat/quickform-task-creation
Open

feat(tasks): add QuickForm task creation SDK + agent.json model#1683
chetanyauipath wants to merge 11 commits into
mainfrom
feat/quickform-task-creation

Conversation

@chetanyauipath
Copy link
Copy Markdown

What

  • TasksService.create_quickform_async / create_quickform — POSTs to /orchestrator_/tasks/GenericTasks/CreateTask with type=6 (QuickFormTask), taskSchemaKey, inline schema, plus standard data / priority / labels / actionableMessageMetaData / taskSource. Mirrors create_async including the OData.AssignTasks follow-up call.
  • AgentEscalationChannel — new optional schema_id / schema fields for QF channels in agent.json.
  • AgentQuickFormEscalationResourceConfig, new resource config for escalationType=2, mirroring the existing IXP pattern. Wired into the EscalationResourceConfig discriminated union via Tag(2).

@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels May 26, 2026
@chetanyauipath chetanyauipath marked this pull request as ready for review June 2, 2026 10:00
Copilot AI review requested due to automatic review settings June 2, 2026 10:00
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

Adds first-class QuickForm (schema-first HITL) task creation support to the Action Center SDK and extends the agent.json model to represent QuickForm escalation channels/resources.

Changes:

  • Added TasksService.create_quickform_async / create_quickform targeting /orchestrator_/tasks/GenericTasks/CreateTask with type=6, taskSchemaKey, and inline schema, plus optional AssignTasks follow-up.
  • Extended AgentEscalationChannel with QuickForm schema fields and added AgentQuickFormEscalationResourceConfig (escalationType=2) into the escalation discriminated union.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/uipath/src/uipath/agent/models/agent.py Adds QuickForm schema fields to escalation channels and introduces escalationType=2 resource config in the discriminated union.
packages/uipath-platform/src/uipath/platform/action_center/_tasks_service.py Implements QuickForm task creation request building and exposes sync/async service methods.

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

Comment on lines +728 to +732
# schema_id is the UUID key under which the schema is registered in Orchestrator's
# TaskSchemas table. schema is the inline schema body, sent on every task creation
# so Orchestrator can upsert it (the Agents runtime has no separate registration step).
schema_id: Optional[str] = Field(None, alias="schemaId")
schema: Optional[Dict[str, Any]] = Field(None, alias="schema")
Comment on lines +252 to +255
if is_actionable_message_enabled is not None:
json_payload["isActionableMessageEnabled"] = is_actionable_message_enabled
if actionable_message_metadata is not None:
json_payload["actionableMessageMetaData"] = actionable_message_metadata
Comment on lines +596 to +684
@traced(name="tasks_create_quickform", run_type="uipath")
async def create_quickform_async(
self,
title: str,
task_schema_key: str,
schema: Dict[str, Any],
data: Optional[Dict[str, Any]] = None,
*,
folder_path: Optional[str] = None,
folder_key: Optional[str] = None,
assignee: Optional[str] = None,
recipient: Optional[TaskRecipient] = None,
priority: Optional[str] = None,
labels: Optional[List[str]] = None,
is_actionable_message_enabled: Optional[bool] = None,
actionable_message_metadata: Optional[Dict[str, Any]] = None,
creator_job_key: Optional[str] = None,
source_name: str = "Agent",
) -> Task:
"""Creates a new QuickForm task asynchronously.

QuickForm tasks are schema-first HITL tasks rendered by FormLib in Action
Center. Both task_schema_key AND schema are required: the Agents runtime
does not pre-populate TaskSchemas via a package.uploaded subscriber, so
Orchestrator upserts the schema (keyed by task_schema_key) and creates
the task in the same call.

Args:
title: The title of the task.
task_schema_key: UUID key of the schema. Used as the key under which
Orchestrator stores/looks up the schema in TaskSchemas.
schema: The HITL schema body to register/upsert. Sent inline on every
call.
data: Optional dictionary containing input data for the task.
folder_path: Optional folder path for the task. Required by the
Orchestrator controller (RequireOrganizationUnit) unless
folder_key is provided.
folder_key: Optional folder key, alternative to folder_path.
assignee: Optional username or email to assign the task to.
recipient: Optional structured recipient (user id / group id /
email). Resolved via identity service before assignment.
priority: Optional priority. Low / Medium / High / Critical.
labels: Optional list of labels for the task.
is_actionable_message_enabled: Whether actionable notifications are
enabled for this task.
actionable_message_metadata: Optional metadata override. For
QuickForm, when null, Orchestrator derives it from the
referenced TaskSchema.
creator_job_key: Optional. Identifies the job that triggered the
inline schema creation/upsert.
source_name: Source name on TaskSource. Defaults to 'Agent'.

Returns:
Task: The created task object.
"""
spec = _create_quickform_spec(
title=title,
data=data,
task_schema_key=task_schema_key,
schema=schema,
creator_job_key=creator_job_key,
folder_key=folder_key,
folder_path=folder_path,
priority=priority,
labels=labels,
is_actionable_message_enabled=is_actionable_message_enabled,
actionable_message_metadata=actionable_message_metadata,
source_name=source_name,
)

response = await self.request_async(
spec.method,
spec.endpoint,
json=spec.json,
content=spec.content,
headers=spec.headers,
)
json_response = response.json()
if assignee or recipient:
assign_spec = await _assign_task_spec(
self, json_response["id"], assignee, recipient
)
await self.request_async(
assign_spec.method,
assign_spec.endpoint,
json=assign_spec.json,
content=assign_spec.content,
)
return Task.model_validate(json_response)
Comment on lines 987 to 994
EscalationResourceConfig = Annotated[
Union[
Annotated[AgentEscalationResourceConfig, Tag(0)],
Annotated[AgentIxpVsEscalationResourceConfig, Tag(1)],
Annotated[AgentQuickFormEscalationResourceConfig, Tag(2)],
],
Discriminator(lambda v: v.get("escalation_type") or v.get("escalationType") or 0),
]
@chetanyauipath chetanyauipath force-pushed the feat/quickform-task-creation branch from de3e012 to a34ae78 Compare June 2, 2026 10:11
chetanyauipath and others added 10 commits June 2, 2026 20:28
…orm HITL

Adds SDK support for the new TaskType.QuickFormTask (=6) path that targets
Orchestrator's GenericTasks/CreateTask endpoint. QuickForm is the schema-first
HITL flow where the form is rendered by FormLib in Action Center from a
.hitl.json schema persisted in the TaskSchemas table; tasks reference it via
taskSchemaKey.

Mirrors the existing create_async path but:
- POSTs to /orchestrator_/tasks/GenericTasks/CreateTask instead of AppTasks
- Sets type=6 (QuickFormTask) and taskSchemaKey (Guid)
- Skips the AppTask app-key fetch and action-schema-derived fieldSet/actionSet
- Supports optional inline schema body + creatorJobKey for the publish-time
  race window (when AC has not yet persisted the schema)
- Reuses the same OData.AssignTasks flow for recipient assignment

Wire contract: UiPath/Orchestrator TaskCreateRequest (Core/Application/Dto/Tasks).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…d inline

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- AgentEscalationChannel: new optional schema_id and schema fields, carried
  through agent.json for QuickForm escalations.
- AgentQuickFormEscalationResourceConfig: new resource config for
  escalationType=2, mirroring the IXP pattern.
- EscalationResourceConfig discriminated union extended with Tag(2).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… docstrings

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ssignee coverage

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chetanyauipath chetanyauipath force-pushed the feat/quickform-task-creation branch from 8f2843f to 2399ce3 Compare June 2, 2026 14:59
…to drop duplication

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 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 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
8.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@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 →

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