feat: add client side tools to bridge and new cas events [JAR-9629]#1638
feat: add client side tools to bridge and new cas events [JAR-9629]#1638norman-le wants to merge 11 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds client-side tool support to the Python SDK bridge and conversation models, including new tool-call event schemas and agent model parsing for ClientSide tools.
Changes:
- Adds
ClientSideagent tool resource parsing and tests. - Adds
executingToolCall, client-side tool declaration, and tool schema fields to chat event models. - Updates the SocketIO chat bridge to emit execution-phase tool events and resume from client-originated
endToolCall.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/uipath/src/uipath/_cli/_chat/_bridge.py |
Emits executingToolCall and accepts endToolCall as a resume signal. |
packages/uipath/src/uipath/agent/models/agent.py |
Adds ClientSide tool type and resource config support. |
packages/uipath-core/src/uipath/core/chat/tool.py |
Adds client-side/tool execution fields and executingToolCall schema. |
packages/uipath-core/src/uipath/core/chat/exchange.py |
Adds client-side tool declarations to exchange start events. |
packages/uipath-core/src/uipath/core/chat/__init__.py |
Exports the new executing tool-call event model. |
packages/uipath/tests/cli/chat/test_bridge.py |
Adds bridge tests for execution-phase events and resume from tool events. |
packages/uipath/tests/agent/models/test_agent.py |
Adds agent model tests for client-side tool resources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🚨 Heads up:
|
|
| mode="python", by_alias=False | ||
| ) | ||
| if value: | ||
| return value.model_dump(mode="python", by_alias=False) |
There was a problem hiding this comment.
Curious why we have the check for None, and then a clear when its None. Shouldn't the overall logic be identical to before, only difference being some renames because it can be either a confirmation-event or end-event? I might be missing something though
There was a problem hiding this comment.
Responded in the thread but posting here too:
wait_for_resume is called after the graph suspends, but executingToolCall was sent earlier during streaming (during the mapper). The client receives it, executes, and could send endToolCall back before wait_for_resume is called. The guard checks if a response already arrived and skips the wait. Without it, the response would be cleared and wait_for_resume hangs. Unlikely in practice (network latency helps), but technically possible
There was a problem hiding this comment.
Gotcha - cool, I'm good for this but I think let's let @JoshParkSJ give final approval on this repo's PR since it mainly touches tool-confirmation logic
| ) | ||
| await self.emit_message_event(executing_event) | ||
|
|
||
| async def wait_for_resume(self) -> dict[str, Any]: |
There was a problem hiding this comment.
I wonder if we can make the return type, our core types UiPathConversationToolCallConfirmationEvent | UiPathConversationToolCallEndEvent for stronger typing?
There was a problem hiding this comment.
Ah I see, those types are BaseModels so might not be possible due to the model_dump. Could be worth a quick Claude check though, not a blocker



Had to make new PR (old PR here: #1609)
Videos in CAS localhost (Agent Builder changes already published, but this will be the debug experience as well when the sdk is upgraded):
Without tool confirmation for client side tool:
Screen.Recording.2026-05-13.at.9.32.26.PM.mov
With tool confirmation for client side tool:
Screen.Recording.2026-05-13.at.9.27.56.PM.mov
URT Eval:

Related to changes in other PRs:
CAS: https://github.com/UiPath/AgentInterfaces/pull/949
uipath-langchain-python (message mapping and firing executing tool call if no confirmation): UiPath/uipath-langchain-python#856
uipath-python (definitions): #1638
uipath-agents-python (skipping for evals, so it can be mocked): https://github.com/UiPath/uipath-agents-python/pull/485
uipath-runtime-python (protocol changing to emit executing tool call event after confirmation): UiPath/uipath-runtime-python#115
Another Agents PR fixing some issues with debug: https://github.com/UiPath/Agents/pull/5250