Skip to content

feat: support coded DeepAgents runtime workspaces#991

Open
andreitava-uip wants to merge 5 commits into
mainfrom
feat/coded-deepagents-runtime
Open

feat: support coded DeepAgents runtime workspaces#991
andreitava-uip wants to merge 5 commits into
mainfrom
feat/coded-deepagents-runtime

Conversation

@andreitava-uip

@andreitava-uip andreitava-uip commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add create_uipath_deep_agent with the supported DeepAgents authoring surface
  • keep compile-time configuration runtime-owned, including the filesystem backend and SQLite checkpointer
  • provision isolated per-runtime workspaces and hydrate/dehydrate them through job attachments
  • defer authenticated workspace service creation through the runtime hydrator factory so schema discovery remains credential-free
  • preserve bound graph configuration when recompiling entrypoints with the managed checkpointer
  • add a task-mode coded DeepAgent sample covering tools, subagents, structured output, workspace files, and the uipath init workflow
  • require uipath-runtime>=0.12.4 and bump uipath-langchain to 0.14.10

Design

UiPath-compatible DeepAgents use the dedicated authoring API and are explicitly marked for runtime integration. The API injects a FilesystemBackend whose root is resolved from typed runtime configuration. The runtime creates a clean workspace for each runtime ID, restores registered attachments before execution, and persists workspace changes on suspension or successful completion.

HydrationRuntime owns lazy hydrator construction. uipath init can load and inspect the graph schema without constructing authenticated platform services; a single UiPath client and its attachment/job services are created when hydration first runs.

Backend selection, checkpointer, store, cache, debug, graph identity, attachment protocol, and hydration policy are not exposed through the authoring API. They remain runtime-owned so support can be added deliberately without introducing an unsupported public contract.

Normal coded LangGraph entrypoints continue through the existing resumable runtime without workspace hydration.

Verification

  • pytest tests/deepagents --no-cov -p no:cacheprovider (21 passed)
  • ruff check src tests
  • ruff format --check src tests
  • mypy src/uipath_langchain (192 source files)
  • uv lock --check
  • installed package verification against uipath-runtime 0.12.4
  • workspace lifecycle test covering upload, workspace recreation, and hydration before resumed execution
  • schema discovery test confirming UiPath services are not constructed during get_schema()
  • manual write/read hydration validation across separate runtime processes
  • two independent review rounds; final review reported no actionable findings

@andreitava-uip
andreitava-uip marked this pull request as ready for review July 15, 2026 14:01
Copilot AI review requested due to automatic review settings July 15, 2026 14:01
@andreitava-uip
andreitava-uip marked this pull request as draft July 15, 2026 14:02
@andreitava-uip
andreitava-uip force-pushed the feat/coded-deepagents-runtime branch from b193f5a to c851ecd Compare July 15, 2026 14:05

Copilot AI left a comment

Copy link
Copy Markdown

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 adds first-class support for UiPath-managed DeepAgents workspaces in the LangGraph runtime integration. It introduces a UiPath-specific DeepAgents authoring API that marks graphs as runtime-compatible, and extends the runtime factory to provision per-runtime workspaces that can be hydrated/dehydrated via job attachments.

Changes:

  • Add create_uipath_deep_agent() which mirrors deepagents.create_deep_agent while enforcing a UiPath-managed filesystem backend and explicit runtime metadata.
  • Extend the runtime factory/runtime config plumbing to inject a workspace path via LangGraph configurable and to wrap DeepAgents runtimes in a HydrationRuntime.
  • Add comprehensive tests plus a new coded DeepAgent sample demonstrating tools, subagents, structured output, and workspace files.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/deepagents/test_runtime_factory.py Verifies DeepAgent marker preservation across compilation and validates hydrated workspace wiring.
tests/deepagents/test_runtime_config.py Tests merging of internal LangGraph configurable values while protecting thread_id.
tests/deepagents/test_metadata.py Confirms the UiPath API signature matches upstream (minus backend) and validates runtime metadata marking.
tests/deepagents/test_backend.py Tests workspace backend factory behavior and config resolution.
tests/deepagents/test_agent.py Ensures the UiPath DeepAgent authoring API forwards upstream arguments and injects the UiPath backend.
tests/deepagents/init.py Declares the deepagents tests package.
src/uipath_langchain/runtime/runtime.py Adds support for passing extra internal LangGraph configurable values (e.g., workspace path).
src/uipath_langchain/runtime/factory.py Detects UiPath DeepAgents graphs, preserves metadata through recompilation, provisions workspaces, and wraps runtimes with hydration.
src/uipath_langchain/deepagents/metadata.py Implements the DeepAgents runtime marker (uipath_integration=deepagents).
src/uipath_langchain/deepagents/backend.py Provides a backend factory that binds DeepAgents filesystem access to the runtime workspace path.
src/uipath_langchain/deepagents/agent.py Adds create_uipath_deep_agent() enforcing UiPath-managed backend and metadata marking.
src/uipath_langchain/deepagents/init.py Exposes the UiPath DeepAgents authoring API.
samples/README.md Adds documentation entry for the coded DeepAgent sample.
samples/coded-deepagent/uipath.json Declares task-mode runtime options for the sample.
samples/coded-deepagent/README.md Documents how the sample works and how workspace hydration is used.
samples/coded-deepagent/pyproject.toml Defines the sample project dependencies.
samples/coded-deepagent/langgraph.json Defines the LangGraph entrypoint for the sample.
samples/coded-deepagent/input.json Provides sample input payload.
samples/coded-deepagent/graph.py Implements the sample coded DeepAgent graph with structured output, tools, and subagent.
samples/coded-deepagent/agent.mermaid Adds a high-level diagram of the sample agent flow.

Comment thread samples/coded-deepagent/pyproject.toml
@andreitava-uip
andreitava-uip force-pushed the feat/coded-deepagents-runtime branch from c851ecd to 5126480 Compare July 15, 2026 14:09
@andreitava-uip
andreitava-uip force-pushed the feat/coded-deepagents-runtime branch from 5126480 to a9136c7 Compare July 15, 2026 14:56
@andreitava-uip andreitava-uip changed the title Support coded DeepAgents runtime workspaces feat: support coded DeepAgents runtime workspaces Jul 16, 2026
@andreitava-uip
andreitava-uip marked this pull request as ready for review July 16, 2026 11:31
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants