Skip to content

feat: let a project supply its own chat bridge and resume jobs without an inbox - #1850

Open
radu-mocanu wants to merge 1 commit into
mainfrom
feat/chat-bridge-and-job-resume
Open

feat: let a project supply its own chat bridge and resume jobs without an inbox#1850
radu-mocanu wants to merge 1 commit into
mainfrom
feat/chat-bridge-and-job-resume

Conversation

@radu-mocanu

@radu-mocanu radu-mocanu commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • a project can name a chatBridge in uipath.json as file_path:factory_name. the factory receives the runtime context and returns a UiPathChatProtocol, or None to decline and leave the conversational agent service in charge
  • the bridge is resolved independently of a platform job, so the same agent talks to its surface locally and deployed
  • adds jobs.resume_job / resume_job_async, which resume a suspended job by key with input arguments

Why

a conversational agent can only be spoken to through the conversational agent service today. everything the runtime needs to reach another surface is already framework agnostic: every runtime emits UiPathConversationMessageEvents and UiPathChatRuntime consumes them through UiPathChatProtocol. only the factory was hardcoded, so langchain, llamaindex and coded agents all gain slack, teams or a webhook with no per-framework code.

jobs.resume delivers a payload to a job's inbox, which only exists when the job suspended on an api resume trigger. a conversational exchange ends suspended carrying no interrupt and therefore has no inbox, so it could not be resumed from the sdk at all.

Development Packages

uipath

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath==2.14.2.dev1018507431",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath>=2.14.2.dev1018500000,<2.14.2.dev1018510000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }
uipath-platform = { index = "testpypi" }

[tool.uv]
override-dependencies = ["uipath-platform==0.2.18.dev1018507431"]

uipath-platform

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath-platform==0.2.18.dev1018507431",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath-platform>=0.2.18.dev1018500000,<0.2.18.dev1018510000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-platform = { index = "testpypi" }

…t an inbox

a conversational agent can only speak to the conversational agent service
today. projects can now name a chatBridge in uipath.json and reach any
surface, and a job that suspended without an api trigger can be resumed at
the job level.
Copilot AI lite review requested due to automatic review settings August 9, 2026 20:02
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Aug 9, 2026
@radu-mocanu radu-mocanu added the build:dev Create a dev build from the pr label Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 UiPath Python SDK/CLI to (1) allow projects to plug in a custom chat bridge via uipath.json so conversational agents can run against non-CAS surfaces (e.g., Slack/Teams/webhooks) both locally and when deployed, and (2) add a new Orchestrator jobs API to resume suspended jobs that have no “inbox” (common for conversational exchanges that end suspended).

Changes:

  • Add chatBridge to uipath.json schema and resolve/load a project-provided bridge factory at runtime.
  • Update uipath run execution flow to use the project chat bridge even when not running under a platform job.
  • Add jobs.resume_job / resume_job_async and tests for resuming a suspended job by key without an inbox.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/uipath/uv.lock Bumps local editable package versions for the uipath workspace.
packages/uipath/src/uipath/_cli/models/uipath_json_schema.py Adds chatBridge (chat_bridge) to the uipath.json schema model.
packages/uipath/src/uipath/_cli/cli_run.py Resolves and wires a project-provided chat bridge into run execution (not tied to jobs).
packages/uipath/src/uipath/_cli/_chat/_custom.py New dynamic loader for a project-supplied chat bridge factory.
packages/uipath/pyproject.toml Bumps uipath version.
packages/uipath-platform/uv.lock Updates lock metadata and bumps uipath-platform editable version.
packages/uipath-platform/tests/services/test_jobs_service.py Adds coverage for the new resume-by-job-key API behavior.
packages/uipath-platform/src/uipath/platform/orchestrator/_jobs_service.py Adds resume_job / resume_job_async and a new request spec for ResumeJob.
packages/uipath-platform/pyproject.toml Bumps uipath-platform version.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +65 to +67
if not spec:
return None
bridge = _load_factory(spec)(context)
if not path.is_file():
raise UiPathChatBridgeError(f"chatBridge file not found: {path}")

module_name = f"_uipath_chat_bridge_{path.stem}"
Comment on lines +45 to +47
module = importlib.util.module_from_spec(module_spec)
sys.modules[module_name] = module
module_spec.loader.exec_module(module)
Comment on lines +298 to +302
# A project's own bridge is not tied to a platform job,
# so it works the same locally and deployed.
custom_bridge = resolve_chat_bridge(
UiPathJsonConfig.load_from_file().chat_bridge, ctx
)
Comment on lines +57 to +60
def resolve_chat_bridge(
spec: str | None, context: UiPathRuntimeContext
) -> UiPathChatProtocol | None:
"""Build the project's own chat bridge, if it declared one and it wants this run.
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

🚨 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

build:dev Create a dev build from the pr test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants