You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(agent): run eligible RPA process tools on the user's local robot (JAR-9786) - #1256
URT-side support for attended RPA via client-side tools. Pairs with CAS: UiPath/AgentInterfaces#1362. JAR-9786 · Design doc
Changes:
local_robot.py: core module — parses job inputs, per-call routing decision, reads client reply/fallback, marks results to prevent duplicate endToolCall
process_tool.py: two durable_interrupts for local-then-server-fallback; local_robot_capable requires is_conversational, PROCESS type, and not entry_point_path
messages.py: marks eligible tools as isClientSideTool with localExecution metadata on startToolCall; suppresses executingToolCall for local robot tools (deferred to runtime). peek_message_id_for_tool_call added for non-consuming lookup so the tool-call/message mapping survives for final completion.
runtime.py: emits executingToolCall after guardrails pass (when graph suspends at wait_for_local_robot); filters CAS list to graph-capable tools; skips local routing when storage is None; resets exchange_local_robot_processes contextvar in execute()/stream() finally blocks
tool_node.py: _resolve_tool_from_subgraph recovers LOCAL_ROBOT_CAPABLE metadata from compiled guardrail subgraphs so guarded process tools remain eligible for local execution
executingToolCall deferred to after guardrails (same pattern as confirmation) — client doesn't get the execution signal until the tool is approved
isClientSideTool + localExecution metadata set on startToolCall so client can prepare handlers
CAS list filtered to LOCAL_ROBOT_CAPABLE tools in this graph (prevents stale entries)
No local routing when storage unavailable (prevents interrupt replay mismatch)
Not in this PR: CAS eligibility, widget Robot.js handler
Known limitation: post-execution guardrails on locally-executed tool results — the client already has the original output. Shared with all client-side tools; needs a protocol-level result update event to fix.
… (JAR-9786)
When CAS passes local robot job inputs, the process tool sends the call to the
client (same pause as client-side tools) instead of starting a server job. The
client runs the process with Robot.js and replies with output or a fallback, in
which case the tool starts the server job as usual.
- local_robot.py: core module — parses job inputs, decides per-call routing,
reads client reply/fallback, marks results so the runtime skips a duplicate
endToolCall
- process_tool.py: integrates with local_robot_request/read_local_robot_reply;
two durable_interrupts for the local-then-fallback path
- messages.py: marks eligible tools as isClientSideTool per call, attaches
localExecution metadata on startToolCall, persists/restores local robot
processes across job resumes via storage
- runtime.py: reads job inputs at start, restores from storage on resume
- client_side_tool.py: fixes is_error/isError dual-key handling
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Intersect the CAS-provided local robot process list with the tools that
carry LOCAL_ROBOT_CAPABLE metadata in this graph. Prevents stale or
mismatched entries from being marked as isClientSideTool by the mapper.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Local process execution is dispatched before per-tool interrupts and argument validation, allowing calls to run out of graph order with inputs the tool wrapper may reject or transform.
Tools with an explicit entry_point_path are still marked local-capable, but the local execution payload contains no entry point. The client can therefore run the release's default workflow instead of the configured one. Keep those tools server-side until the local execution contract carries and honors the configured entry point.
Preserve local routing decisions when storage is unavailable
src/uipath_langchain/runtime/runtime.py:426
When a runtime created without storage is reconstructed against a suspended checkpoint, its local eligibility list is lost. Replay then skips the local wait and consumes the client reply at the server-job interrupt, causing job.state to fail instead of completing or falling back. Keep these calls on the server when storage is unavailable, or persist their routing decision in checkpointed state.
…xtvar reset
- Add peek_message_id_for_tool_call (non-consuming) so _emit_local_robot_executing_events
doesn't delete the tool-call/message mapping before the tool completes
- Recover LOCAL_ROBOT_CAPABLE metadata from compiled guardrail subgraphs via
_resolve_tool_from_subgraph, so guarded process tools are still eligible for local execution
- Reset exchange_local_robot_processes contextvar in execute()/stream() finally blocks
to prevent stale routing lists leaking between exchanges
- Add 12 tests covering all three fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Local-result routing suppresses guardrail-modified and human-reviewed outputs, while streaming execution signals and fallback behavior across resumes remain unverified.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Partial resumes can emit duplicate tool-execution signals and launch the same RPA process twice, while checkpoint-backed coverage of the fallback interrupt sequence is missing.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because local-routing interactions with non-streaming execution and guardrail-wrapped tools can leave execution suspended or unexpectedly route jobs to the server.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because local routing can stall non-streaming execution without notifying the client, while guarded process tools can lose capability metadata and incorrectly fall back to server execution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
URT-side support for attended RPA via client-side tools. Pairs with CAS: UiPath/AgentInterfaces#1362. JAR-9786 · Design doc
Changes:
local_robot.py: core module — parses job inputs, per-call routing decision, reads client reply/fallback, marks results to prevent duplicate endToolCallprocess_tool.py: twodurable_interrupts for local-then-server-fallback;local_robot_capablerequiresis_conversational,PROCESStype, andnot entry_point_pathmessages.py: marks eligible tools asisClientSideToolwithlocalExecutionmetadata on startToolCall; suppressesexecutingToolCallfor local robot tools (deferred to runtime).peek_message_id_for_tool_calladded for non-consuming lookup so the tool-call/message mapping survives for final completion.runtime.py: emitsexecutingToolCallafter guardrails pass (when graph suspends atwait_for_local_robot); filters CAS list to graph-capable tools; skips local routing whenstorage is None; resetsexchange_local_robot_processescontextvar inexecute()/stream()finally blockstool_node.py:_resolve_tool_from_subgraphrecoversLOCAL_ROBOT_CAPABLEmetadata from compiled guardrail subgraphs so guarded process tools remain eligible for local executionclient_side_tool.py: fixesis_error/isErrordual-key handlingKey decisions:
executingToolCalldeferred to after guardrails (same pattern as confirmation) — client doesn't get the execution signal until the tool is approvedisClientSideTool+localExecutionmetadata set on startToolCall so client can prepare handlersLOCAL_ROBOT_CAPABLEtools in this graph (prevents stale entries)Not in this PR: CAS eligibility, widget Robot.js handler
Known limitation: post-execution guardrails on locally-executed tool results — the client already has the original output. Shared with all client-side tools; needs a protocol-level result update event to fix.
🤖 Generated with Claude Code