-
Notifications
You must be signed in to change notification settings - Fork 29
feat: add suspend/resume sample for RPA invocations #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Chibionos
wants to merge
7
commits into
main
Choose a base branch
from
feat/suspend-resume-evaluations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,751
−3
Conversation
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
049eab8 to
c3488ae
Compare
c3488ae to
745d124
Compare
cristipufu
reviewed
Jan 15, 2026
| version = "0.1.0" | ||
| description = "Tool-calling agent demonstrating suspend/resume with RPA process invocation" | ||
| requires-python = ">=3.11" | ||
| dependencies = [] |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add uipath & uipath-langchain deps, same as the other samples
e1cd818 to
eab151f
Compare
Add sample agent demonstrating suspend/resume pattern for RPA invocations: - graph.py: LangGraph agent using interrupt(InvokeProcess(...)) - Uses official InvokeProcess from uipath.platform.common - Includes comprehensive logging for suspend/resume flow - Evaluation sets for testing suspend/resume behavior - README with usage instructions Architecture documentation: - Add INTERRUPT_SUSPEND_RESUME.md explaining proper separation of concerns - Documents that LangGraph-specific interrupt detection belongs in uipath-langchain-python, not framework-agnostic uipath-python layer Configuration: - langgraph.json: defines 'agent' and 'agent-simple' entrypoints - uipath.json: runtime configuration - pyproject.toml: dependencies This sample provides: - Reference implementation for suspend/resume with RPA - Test cases for evaluation runtime - Clear documentation of architecture boundaries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Add graph_simple.py with dict payload (no authentication required) - Add test_simple_no_auth.json evaluation set for quick testing - Update README with graph variants and evaluation set descriptions - Provides easier entry point for testing suspend/resume without RPA setup
- Add test_suspend_resume_with_validation.py with checkpoint assertions - Validates checkpoint count and structure - Verifies interrupt data persistence - Validates resume data flow - Checks final result completion - Asserts checkpoint parent-child chain integrity - Add test_suspend_step1.py and test_suspend_step2.py - Demonstrates separate process suspend/resume pattern - Shows state persistence across Python process restarts - Add inspect_state.py for debugging - Decodes msgpack checkpoint data - Shows interrupt and resume data structure - Helps understand LangGraph checkpoint internals - Update graph_simple.py with proper checkpointer - Use MemorySaver for simple testing (documented) - Add note about AsyncSqliteSaver for persistence - Update langgraph.json - Add agent-simple entrypoint for simple graph variant These tests validate the complete suspend/resume lifecycle and can be used as reference for understanding the checkpoint mechanism.
This architecture documentation should live in the uipath-python repo where the core evaluation runtime is located, not in the langchain-specific repo.
- Add tool-calling agent sample demonstrating suspend/resume pattern - Add comprehensive validation tests with checkpoint assertions - Add proper dependencies (uipath>=2.5.4, uipath-langchain>=0.4.3) - Update minimum uipath version to 2.5.4 for suspend/resume fixes - Include both RPA invocation variant and simplified test variant
eab151f to
608c8e0
Compare
- Add demo_suspend_resume.py: consolidated interactive demo - Single script showing complete suspend/resume lifecycle - Can run full demo or individual suspend/resume steps - Clear logging with emojis for visual flow - Simulates process restart between steps - Enhance README.md: comprehensive documentation - Clear Quick Start section with demo command - Visual lifecycle diagram showing suspend/resume phases - Organized file listing with purpose of each file - Multiple usage examples (full demo, step-by-step, eval runtime) - Common patterns section with code examples - Troubleshooting guide for common issues - Integration details with UiPath evaluation runtime - All commands use 'uv run' for consistency - Makes sample easy to understand and run
cristipufu
approved these changes
Jan 15, 2026
…ization When using Pydantic BaseModel for State schema, nodes must return plain dicts rather than BaseModel instances. LangGraph cannot properly serialize BaseModel objects to checkpoints, resulting in empty state and validation errors during resume. Changes: - graph_simple.py: Return dict instead of State object from suspend_node - runtime.py: Add Command(resume=...) wrapper for resume mode - Add test_resume_direct.py: Test script for direct resume without API - Add test_full_cycle.py: Interactive test for full suspend/resume cycle - Add SUSPEND_RESUME_FIX.md: Detailed documentation of the fix - Add MANUAL_TEST_GUIDE.md: Step-by-step manual testing guide - Update README.md: Document new test files and evaluation setup - Update uipath.json: Add agent-simple entrypoint for eval This enables proper suspend/resume functionality for evaluations with RPA invocations, allowing agents to persist state across process restarts.
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.
Overview
This PR adds a comprehensive sample demonstrating the suspend/resume pattern for agents that invoke RPA processes using LangGraph's
interrupt()function.What's New
🎬 Interactive Demo
demo_suspend_resume.py: Single consolidated script demonstrating complete lifecycleuv run python demo_suspend_resume.py📖 Comprehensive README
🔧 Core Agent Files
graph.py: LangGraph agent withInvokeProcessfor real RPA integrationgraph_simple.py: Simplified variant using dict payload (no auth required)langgraph.json: Graph entrypoint definitions🧪 Testing Support
test_suspend_resume_with_validation.py: Comprehensive test with checkpoint assertionstest_suspend_step1.py&test_suspend_step2.py: Separate suspend/resume stepsinspect_state.py: Utility to decode and inspect checkpoint databaseuipath eval📦 Dependencies
uipath-devin dev dependency groupKey Features
InvokeProcessfor RPAQuick Start
What You'll See
The demo shows:
interrupt()→ SUSPENDS__uipath/state.db)Related Work
interrupt()Files Structure