Repository navigation
feat(advanced): keep coded agents' workspace files across suspend and resume [PC-5359] - #1194
Open
tudormatei1 wants to merge 3 commits into
Open
tudormatei1 wants to merge 3 commits into
tudormatei1 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The sample’s uipath>=2.15.1 requirement conflicts with the release’s uipath<2.15.0 constraint, preventing the documented uv sync from installing it.
1 open issue
What changed in this PR
Adds managed workspace support so coded LangGraph and DeepAgents agents can retain files across job suspension and resumption.
Changes:
- Enables CLI-managed workspaces and exports a workspace-aware file backend.
- Adds workspace isolation, fallback, and persistence tests.
- Documents usage, adds a review-and-resume sample, and bumps the version to 0.18.57.
| File | Description |
|---|---|
uv.lock |
Updates package version. |
tests/runtime/test_factory_managed_workspace.py |
Tests workspace opt-in. |
tests/agent/advanced/test_workspace_backend.py |
Tests workspace operations and persistence. |
src/uipath_langchain/runtime/factory.py |
Requests managed workspaces. |
src/uipath_langchain/agent/advanced/workspace_backend.py |
Adds dynamically rooted file backend. |
src/uipath_langchain/agent/advanced/__init__.py |
Exports the backend. |
samples/README.md |
Lists the new sample. |
samples/deepagent-workspace-files/uipath.json |
Configures sample runtime. |
samples/deepagent-workspace-files/README.md |
Explains sample setup and persistence. |
samples/deepagent-workspace-files/pyproject.toml |
Defines sample dependencies. |
samples/deepagent-workspace-files/langgraph.json |
Registers the sample graph. |
samples/deepagent-workspace-files/graph.py |
Demonstrates file editing across human review. |
samples/deepagent-workspace-files/agent.mermaid |
Shows sample graph flow. |
samples/deepagent-workspace-files/.env.example |
Provides connection placeholders. |
pyproject.toml |
Bumps release version. |
docs/human_in_the_loop.md |
Documents managed workspace usage. |
Review effort: Balanced
| dependencies = [ | ||
| "deepagents>=0.7.11, <0.8.0", | ||
| "langgraph>=1.0.10", | ||
| "uipath>=2.15.1", |
… resume Files a coded LangGraph or deepagents agent writes are lost when its job suspends and resumes on another machine. The factory now opts in to the host-managed workspace, so the uipath CLI persists the run's workspace folder as job attachments. UiPathWorkspaceBackend is a deepagents FilesystemBackend that looks up the current run's folder on every file operation. Coded graphs are built once at import time, before any run, so a root fixed at build time would point at the wrong folder. Outside a managed run it uses one temporary folder and logs a warning, and never the project folder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Shows UiPathWorkspaceBackend in a job: the agent writes a report, suspends for a human review, and edits the same file after it resumes. Its review tool opens the draft from disk with plain Python, which is the reason to keep files on disk instead of in DeepAgents' default StateBackend. The tool tolerates a missing draft, because LangGraph re-runs an interrupted tool from the top on resume, and a local run without a job starts the resume in a new, empty folder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The factory now asks for a managed workspace, and only the uipath CLI from 2.15.16 acts on that. With an older CLI the backend falls back to a temporary folder and job files are lost on resume. The lock is regenerated once uipath 2.15.16 is on PyPI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tudormatei1
force-pushed
the
feat/PC-5359-coded-workspace-persistence
branch
from
December 3, 2026 11:15
4f3e1ae to
b31df88
Compare
|
This branch has not been deployed
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.



Coded LangGraph and deepagents agents now keep the files they write across suspend and resume. The factory opts in to the CLI-managed workspace from UiPath/uipath-python#1976, and
UiPathWorkspaceBackendgives deepagents a file backend rooted in that workspace.Changes
UiPathWorkspaceBackend(agent/advanced/workspace_backend.py) is a deepagentsFilesystemBackendthat looks up its root withget_workspace_path()on every file operation. Coded graphs are built once at import, before any run, so a root fixed when the graph is built would never be the run's folder. Outside a managed run (local runs,uipath dev, older CLIs) it uses one temp folder and logs a warning naming it. It never falls back to the project folder, so an agent can't edit the project's files.get_settings()returnsmanaged_workspace=True. Older CLIs ignore the flag.docs/human_in_the_loop.md, for the backend and for plain tools that callget_workspace_path().samples/deepagent-workspace-files, a deepagents agent that writes/report.md, suspends oninterrupt()for a review, and edits the same file after resume. Its review tool reads the draft from disk with plain Python, which is the case for real files over DeepAgents' defaultStateBackend.uipath>=2.15.16: older CLIs ignore the flag, and the backend would then fall back to a temp folder in jobs.uv.lockis still main's until uipath 2.15.16 is on PyPI; relock before merge.Note
This works with the released uipath-runtime. The docs describe CLI behavior from UiPath/uipath-python#1976, so release that first or together. uipath-agents overrides
get_settingswith the flag off, so low-code agents aren't wrapped twice.Testing
UiPathWorkspaceBackend, suspends oninterrupt(), anduipath run --resumein a new process reads the file back from job attachments./report.mdand suspended inrequest_review.uipath run --resumein a new process ranedit_fileon the restored file, and the final report included the feedback. Without a job key, the resume finds no draft, as its README says.🤖 Generated with Claude Code