feat: add uipath-claude-sdk integration package - #368
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new uipath-claude-sdk package that adapts the Claude Agent SDK to the UiPath coded-agent runtime, including gateway-based model routing, durable suspend/resume via interrupt(), and accompanying templates/samples/tests. It also wires the new package into the repo’s CI and SonarCloud configuration.
Changes:
- Added
uipath-claude-sdkruntime implementation (agent loading, gateway shim routing, suspend/resume channel + hooks, telemetry/spans). - Added comprehensive unit tests plus opt-in live tests, along with runnable samples, templates, and end-to-end testcases.
- Integrated the new package into GitHub Actions (lint/test/coverage) and SonarCloud source/test/coverage inputs.
Reviewed changes
Copilot reviewed 186 out of 189 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| sonar-project.properties | Include uipath-claude-sdk in Sonar sources/tests/coverage paths |
| .github/workflows/test-packages.yml | Add matrix test job + coverage artifact for uipath-claude-sdk and gate Sonar on it |
| .github/workflows/lint-packages.yml | Add uipath-claude-sdk lint/mypy/format job |
| packages/uipath-claude-sdk/.python-version | Pin local dev Python version for this package |
| packages/uipath-claude-sdk/CONTRIBUTING.md | Document local dev + CI-equivalent checks for the new package |
| packages/uipath-claude-sdk/README.md | Package-level documentation entrypoint |
| packages/uipath-claude-sdk/docs/defer-semantics.md | Document CLI defer/suspend behavior assumptions and safeguards |
| packages/uipath-claude-sdk/pyproject.toml | Define package metadata, deps, tooling (ruff/mypy/pytest/cov), and entry points |
| packages/uipath-claude-sdk/uv.lock | Lockfile for reproducible installs |
| packages/uipath-claude-sdk/scripts/pack_sample.sh | Helper script to pack samples with a vendored local wheel |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/init.py | Public package exports and lazy attribute loading |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/agent.py | User-facing agent dataclass (UiPathClaudeAgent / alias ClaudeAgent) |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/interrupts.py | interrupt() contract, suspend channel, tool wrapping and correlation |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/mcp.py | MCP helper utilities used by samples/tests |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/middlewares.py | CLI middleware registration hook for uipath new integration |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/models.py | UiPathModel routing descriptor + discovery resolution |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/_cli/init.py | CLI integration package init |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/_cli/cli_new.py | Implementation of uipath new middleware scaffolding |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/_cli/_templates/main.py.template | Scaffolded agent template (Python) |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/_cli/_templates/claude.json.template | Scaffolded claude.json template |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/init.py | Runtime exports + factory registration helper |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/_telemetry.py | Gateway call telemetry → OTel/OpenInference spans + attribute stripping |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/config.py | claude.json config loader |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/conversational_runtime.py | Conversational runtime wrapper/behavior |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/errors.py | Package-specific runtime error types/codes |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/factory.py | Runtime factory: loads agents, configures tracing, storage, resumable wrapper |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/loader.py | Dynamic loader for file.py:var agent entrypoints |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/runtime.py | Core runtime: stream/execute, suspend/resume lifecycle, transcript handling |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/schema.py | Entrypoint JSON schema + agent graph extraction |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/session_paths.py | Runtime directory layout for durable session/workspace/transcripts |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/session_store.py | Persist session id, pending suspend record, entrypoint, transcript via storage |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/storage.py | SQLite-backed resumable storage adapter |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/suspend.py | PreToolUse hook that runs UiPath tools and defers when interrupt() occurs |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/init.py | Gateway shim package init |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/catalog.py | Tenant model discovery/catalog resolution |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/env.py | Build CLI subprocess env for gateway routing (base url, auxiliary models) |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/errors.py | Gateway shim error types |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/records.py | Streaming usage/token tee + per-call record structures |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/router.py | HTTP routing/forwarding logic for shim endpoints |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/strategies.py | Gateway routing strategies / vendor-specific handling |
| packages/uipath-claude-sdk/src/uipath_claude_sdk/runtime/gateway/upstream.py | Upstream client registry (per resolved model) |
| packages/uipath-claude-sdk/tests/init.py | Test package init |
| packages/uipath-claude-sdk/tests/conftest.py | Shared fixtures, fake SDK client patching, auto-uninstrumentation |
| packages/uipath-claude-sdk/tests/test_background_tasks_live.py | Opt-in live test for background task lifecycle handling |
| packages/uipath-claude-sdk/tests/test_cli_contract.py | Version-drift “tripwire” for bundled CLI + key SDK types |
| packages/uipath-claude-sdk/tests/test_config_and_loader.py | Tests for claude.json parsing and loader behavior |
| packages/uipath-claude-sdk/tests/test_conversational.py | Conversational mode behavior + resume prompt semantics |
| packages/uipath-claude-sdk/tests/test_debug.py | Debug-related runtime behaviors (breakpoints, etc.) |
| packages/uipath-claude-sdk/tests/test_defer_contract.py | Contract tests for defer/suspend semantics |
| packages/uipath-claude-sdk/tests/test_factory.py | Runtime factory creation, entrypoint discovery, registry integration |
| packages/uipath-claude-sdk/tests/test_gateway.py | Gateway shim behavior tests |
| packages/uipath-claude-sdk/tests/test_interrupt_tools.py | Interrupt tool server + hook integration tests |
| packages/uipath-claude-sdk/tests/test_mcp.py | MCP server validation/helpers tests |
| packages/uipath-claude-sdk/tests/test_models.py | UiPath model resolution/routing tests |
| packages/uipath-claude-sdk/tests/test_resume_payload_shapes.py | Resume payload shape handling tests |
| packages/uipath-claude-sdk/tests/test_runtime.py | Core runtime behavior tests |
| packages/uipath-claude-sdk/tests/test_schema.py | Schema and graph extraction tests |
| packages/uipath-claude-sdk/tests/test_suspend_resume.py | Suspend/resume lifecycle tests including trigger typing and entrypoint mismatch |
| packages/uipath-claude-sdk/tests/test_telemetry.py | Telemetry/span emission and attribute stripping tests |
| packages/uipath-claude-sdk/template/uipath.json | Template project config |
| packages/uipath-claude-sdk/template/README.md | Template documentation for running/eval’ing the scaffold |
| packages/uipath-claude-sdk/template/pyproject.toml | Template packaging metadata |
| packages/uipath-claude-sdk/template/project.uiproj | Template UiPath project metadata |
| packages/uipath-claude-sdk/template/main.py | Template agent implementation |
| packages/uipath-claude-sdk/template/input.json | Template input payload |
| packages/uipath-claude-sdk/template/entry-points.json | Template entrypoint schema output (generated) |
| packages/uipath-claude-sdk/template/CLAUDE.md | Template Claude instructions indirection |
| packages/uipath-claude-sdk/template/claude.json | Template claude.json entrypoint mapping |
| packages/uipath-claude-sdk/template/bindings.json | Template bindings (generated) |
| packages/uipath-claude-sdk/template/AGENTS.md | Template documentation index for agent code patterns |
| packages/uipath-claude-sdk/template/agent.mermaid | Template agent graph (generated) |
| packages/uipath-claude-sdk/template/.agent/REQUIRED_STRUCTURE.md | Template embedded agent structure guidance |
| packages/uipath-claude-sdk/template/.agent/SDK_REFERENCE.md | Template embedded SDK reference pointer |
| packages/uipath-claude-sdk/template/.agent/CLI_REFERENCE.md | Template embedded CLI reference pointer |
| packages/uipath-claude-sdk/template/evaluations/evaluators/tool-call-order.json | Eval evaluator config: tool call order |
| packages/uipath-claude-sdk/template/evaluations/evaluators/tool-call-count.json | Eval evaluator config: tool call counts |
| packages/uipath-claude-sdk/template/evaluations/evaluators/tool-call-arguments.json | Eval evaluator config: tool call args |
| packages/uipath-claude-sdk/template/evaluations/evaluators/llm-judge-output.json | Eval evaluator config: LLM judge |
| packages/uipath-claude-sdk/template/evaluations/eval-sets/evaluation-set-default.json | Default evaluation set definition |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/uipath.json | Sample: simple HITL project config |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/README.md | Sample: simple HITL docs |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/pyproject.toml | Sample: simple HITL deps |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/main.py | Sample: simple HITL agent code |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/input.json | Sample: simple HITL input |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/claude.json | Sample: simple HITL entrypoint mapping |
| packages/uipath-claude-sdk/samples/simple-hitl-agent/.env.example | Sample: simple HITL env template |
| packages/uipath-claude-sdk/samples/quickstart-agent/uipath.json | Sample: quickstart project config |
| packages/uipath-claude-sdk/samples/quickstart-agent/README.md | Sample: quickstart docs |
| packages/uipath-claude-sdk/samples/quickstart-agent/pyproject.toml | Sample: quickstart deps |
| packages/uipath-claude-sdk/samples/quickstart-agent/main.py | Sample: quickstart agent code |
| packages/uipath-claude-sdk/samples/quickstart-agent/input.json | Sample: quickstart input |
| packages/uipath-claude-sdk/samples/quickstart-agent/claude.json | Sample: quickstart entrypoint mapping |
| packages/uipath-claude-sdk/samples/quickstart-agent/project.uiproj | Sample: quickstart UiPath project metadata |
| packages/uipath-claude-sdk/samples/quickstart-agent/agent.mermaid | Sample: quickstart generated graph |
| packages/uipath-claude-sdk/samples/quickstart-agent/.env.example | Sample: quickstart env template |
| packages/uipath-claude-sdk/samples/multi-agent/uipath.json | Sample: multi-agent project config |
| packages/uipath-claude-sdk/samples/multi-agent/README.md | Sample: multi-agent docs |
| packages/uipath-claude-sdk/samples/multi-agent/pyproject.toml | Sample: multi-agent deps |
| packages/uipath-claude-sdk/samples/multi-agent/main.py | Sample: multi-agent agent code |
| packages/uipath-claude-sdk/samples/multi-agent/input.json | Sample: multi-agent input |
| packages/uipath-claude-sdk/samples/multi-agent/claude.json | Sample: multi-agent entrypoint mapping |
| packages/uipath-claude-sdk/samples/multi-agent/project.uiproj | Sample: multi-agent UiPath project metadata |
| packages/uipath-claude-sdk/samples/multi-agent/agent.mermaid | Sample: multi-agent generated graph |
| packages/uipath-claude-sdk/samples/multi-agent/.env.example | Sample: multi-agent env template |
| packages/uipath-claude-sdk/samples/chat-agent/uipath.json | Sample: conversational chat project config |
| packages/uipath-claude-sdk/samples/chat-agent/README.md | Sample: conversational chat docs |
| packages/uipath-claude-sdk/samples/chat-agent/pyproject.toml | Sample: conversational chat deps |
| packages/uipath-claude-sdk/samples/chat-agent/main.py | Sample: conversational chat agent code |
| packages/uipath-claude-sdk/samples/chat-agent/input.json | Sample: conversational chat first message |
| packages/uipath-claude-sdk/samples/chat-agent/next_message.json | Sample: conversational chat follow-up message |
| packages/uipath-claude-sdk/samples/chat-agent/claude.json | Sample: conversational chat entrypoint mapping |
| packages/uipath-claude-sdk/samples/chat-agent/.env.example | Sample: conversational chat env template |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/uipath.json | Sample: Action Center HITL project config |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/README.md | Sample: Action Center HITL docs |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/pyproject.toml | Sample: Action Center HITL deps |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/main.py | Sample: Action Center HITL agent code |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/input.json | Sample: Action Center HITL input |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/claude.json | Sample: Action Center HITL entrypoint mapping |
| packages/uipath-claude-sdk/samples/action-center-hitl-agent/.env.example | Sample: Action Center HITL env template |
| packages/uipath-claude-sdk/samples/integration-event-agent/uipath.json | Sample: Integration Services event HITL project config |
| packages/uipath-claude-sdk/samples/integration-event-agent/README.md | Sample: Integration Services event HITL docs |
| packages/uipath-claude-sdk/samples/integration-event-agent/pyproject.toml | Sample: Integration Services event HITL deps |
| packages/uipath-claude-sdk/samples/integration-event-agent/main.py | Sample: Integration Services event HITL agent code |
| packages/uipath-claude-sdk/samples/integration-event-agent/input.json | Sample: Integration Services event HITL input |
| packages/uipath-claude-sdk/samples/integration-event-agent/claude.json | Sample: Integration Services event HITL entrypoint mapping |
| packages/uipath-claude-sdk/samples/integration-event-agent/.env.example | Sample: Integration Services event HITL env template |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/uipath.json | Sample: local stdio MCP project config |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/README.md | Sample: local stdio MCP docs |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/pyproject.toml | Sample: local stdio MCP deps |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/main.py | Sample: local stdio MCP agent code |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/input.json | Sample: local stdio MCP input |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/ledger_server.py | Sample: local stdio MCP server implementation |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/claude.json | Sample: local stdio MCP entrypoint mapping |
| packages/uipath-claude-sdk/samples/simple-local-mcp-agent/.env.example | Sample: local stdio MCP env template |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/uipath.json | Sample: remote HTTP MCP project config |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/README.md | Sample: remote HTTP MCP docs |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/pyproject.toml | Sample: remote HTTP MCP deps |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/main.py | Sample: remote HTTP MCP agent code |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/input.json | Sample: remote HTTP MCP input |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/claude.json | Sample: remote HTTP MCP entrypoint mapping |
| packages/uipath-claude-sdk/samples/simple-remote-mcp-agent/.env.example | Sample: remote HTTP MCP env template |
| packages/uipath-claude-sdk/samples/autonomous-agent/uipath.json | Sample: autonomous agent project config |
| packages/uipath-claude-sdk/samples/autonomous-agent/README.md | Sample: autonomous agent docs |
| packages/uipath-claude-sdk/samples/autonomous-agent/pyproject.toml | Sample: autonomous agent deps |
| packages/uipath-claude-sdk/samples/autonomous-agent/main.py | Sample: autonomous agent code |
| packages/uipath-claude-sdk/samples/autonomous-agent/claude.json | Sample: autonomous agent entrypoint mapping |
| packages/uipath-claude-sdk/testcases/common/validate_output.sh | Shared testcase output validation script |
| packages/uipath-claude-sdk/testcases/common/trace_assert.py | Shared testcase trace assertions |
| packages/uipath-claude-sdk/testcases/template-agent/run.sh | Testcase runner for shipped template agent |
| packages/uipath-claude-sdk/testcases/template-agent/pyproject.toml | Testcase deps for template agent |
| packages/uipath-claude-sdk/testcases/template-agent/.gitignore | Ignore generated/copied files for template testcase |
| packages/uipath-claude-sdk/testcases/template-agent/.env.example | Env template for template testcase |
| packages/uipath-claude-sdk/testcases/template-agent/src/main.py | Template testcase agent entrypoint |
| packages/uipath-claude-sdk/testcases/template-agent/src/assert.py | Template testcase assertions |
| packages/uipath-claude-sdk/testcases/quickstart-agent/uipath.json | Quickstart testcase project config |
| packages/uipath-claude-sdk/testcases/quickstart-agent/run.sh | Quickstart testcase runner |
| packages/uipath-claude-sdk/testcases/quickstart-agent/pyproject.toml | Quickstart testcase deps |
| packages/uipath-claude-sdk/testcases/quickstart-agent/input.json | Quickstart testcase input |
| packages/uipath-claude-sdk/testcases/quickstart-agent/claude.json | Quickstart testcase entrypoint mapping |
| packages/uipath-claude-sdk/testcases/quickstart-agent/.env.example | Quickstart testcase env template |
| packages/uipath-claude-sdk/testcases/quickstart-agent/src/main.py | Quickstart testcase agent code |
| packages/uipath-claude-sdk/testcases/quickstart-agent/src/assert.py | Quickstart testcase assertions |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/uipath.json | Simple HITL testcase project config |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/run.sh | Simple HITL testcase runner (run + resume) |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/pyproject.toml | Simple HITL testcase deps |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/input.json | Simple HITL testcase input |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/human_response.json | Simple HITL testcase resume payload |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/claude.json | Simple HITL testcase entrypoint mapping |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/.env.example | Simple HITL testcase env template |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/src/main.py | Simple HITL testcase agent code |
| packages/uipath-claude-sdk/testcases/simple-hitl-agent/src/assert.py | Simple HITL testcase assertions |
| packages/uipath-claude-sdk/testcases/chat-agent/uipath.json | Conversational chat testcase project config |
| packages/uipath-claude-sdk/testcases/chat-agent/run.sh | Conversational chat testcase runner (multi-exchange) |
| packages/uipath-claude-sdk/testcases/chat-agent/pyproject.toml | Conversational chat testcase deps |
| packages/uipath-claude-sdk/testcases/chat-agent/input.json | Conversational chat testcase first message |
| packages/uipath-claude-sdk/testcases/chat-agent/next_message.json | Conversational chat testcase second message |
| packages/uipath-claude-sdk/testcases/chat-agent/third_message.json | Conversational chat testcase third message |
| packages/uipath-claude-sdk/testcases/chat-agent/claude.json | Conversational chat testcase entrypoint mapping |
| packages/uipath-claude-sdk/testcases/chat-agent/.env.example | Conversational chat testcase env template |
| packages/uipath-claude-sdk/testcases/chat-agent/src/main.py | Conversational chat testcase agent code |
| packages/uipath-claude-sdk/testcases/chat-agent/src/assert.py | Conversational chat testcase assertions |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/uipath.json | Action Center testcase project config |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/run.sh | Action Center testcase runner (run + resume) |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/pyproject.toml | Action Center testcase deps |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/input.json | Action Center testcase input |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/human_response.json | Action Center testcase resume payload |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/claude.json | Action Center testcase entrypoint mapping |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/src/main.py | Action Center testcase agent code |
| packages/uipath-claude-sdk/testcases/action-center-hitl-agent/src/assert.py | Action Center testcase assertions |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
radu-mocanu
force-pushed
the
feat/claude-sdk-integration-v2
branch
7 times, most recently
from
August 11, 2026 10:14
d539a07 to
b3a1d25
Compare
andreitava-uip
approved these changes
Aug 11, 2026
radu-mocanu
force-pushed
the
feat/claude-sdk-integration-v2
branch
from
August 11, 2026 10:26
b3a1d25 to
2101b1b
Compare
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
claude.jsoninterrupt()Why
coded agents on this platform had no path to the Claude Agent SDK, so its hooks, sessions and tool model could not be used against UiPath resources. the package keeps the integration thin: the gateway, the runtime contract and the CLI stay where they are, and this only adapts the SDK onto them.