-
Notifications
You must be signed in to change notification settings - Fork 31
feat: add tool-calling suspend/resume sample #442
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
Merged
Merged
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
027753c to
727a8b3
Compare
akshaylive
reviewed
Jan 24, 2026
727a8b3 to
d12d76b
Compare
smflorentino
approved these changes
Jan 24, 2026
Add comprehensive sample demonstrating suspend/resume pattern for agents that need to pause execution for external work (RPA processes, HITL, etc.). **Sample Contents:** - graph.py: Agent with RPA process invocation using interrupt() - graph_simple.py: Simplified variant for testing without auth - demo_suspend_resume.py: Interactive demo showing full suspend/resume cycle - Comprehensive test files for validation - README with usage guide and architecture explanation - Evaluation sets for testing suspend/resume behavior **Key Features:** - Shows proper use of LangGraph's interrupt() for suspension - Demonstrates checkpoint persistence with SQLite - Includes both RPA invocation and simplified test variants - Comprehensive documentation and testing **Use Cases:** - Long-running RPA automations - Human-in-the-loop workflows - External API calls with async callbacks - Multi-step processes across systems 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> fix: remove missing custom evaluators from eval set The eval set was referencing two custom evaluators that don't exist: - ResumeCompletedEvaluator - SuspendResumeTrajectoryEvaluator This caused the eval command to fail with: 'Could not find the following evaluators' Changes: - Removed evaluatorRefs and evaluationCriterias - Removed expectedOutputs (agent suspends, doesn't complete on first run) - Updated description to clarify suspend/resume testing workflow - Kept simple inputs for testing suspend phase The eval set now works for demonstrating suspend behavior without requiring custom evaluators. For full suspend/resume testing with evaluators, use the demo scripts or --resume flag. feat: configure eval set to use built-in ContainsEvaluator - Add evaluator JSON configuration for uipath-contains evaluator - Update eval set to reference uipath-contains evaluator - Configure evaluationCriterias to check for "Completed with resume data" in agent output - Eval command now runs successfully with suspend/resume workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> feat: add calculator agent with RPA process invocation Add new agent variant demonstrating suspend/resume with calculator RPA process: **New Files:** - graph_calculator.py - Calculator agent invoking RPA process for arithmetic operations - agent-calculator.py - Symlink to graph_calculator.py for entry point - agent-calculator.mermaid - Visual flowchart for calculator agent - evaluations/eval-sets/test_calculator_process.json - Evaluation set with 4 test cases: * Addition: 12 + 12 = 24 * Subtraction: 50 - 20 = 30 * Multiplication: 7 * 8 = 56 * Division: 100 / 4 = 25 **Updated Files:** - entry-points.json - Add agent-calculator entry point definition - README.md - Document calculator variant in "Three Graph Variants" section **Key Features:** - Demonstrates InvokeProcess with structured input (operands + operator) - Shows how to extract calculation results from RPA process output - Reuses existing uipath-contains evaluator for result validation - Complete with evaluation set for automated testing **Usage:** ```bash uv run uipath eval agent-calculator evaluations/eval-sets/test_calculator_process.json ``` This complements the existing suspend/resume sample with a practical computational workflow example. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> fix: register agent-calculator in langgraph.json and add single test eval **Fixes:** - Add agent-calculator to langgraph.json graphs mapping - This resolves "Graph 'agent-calculator' not found" error **New Files:** - evaluations/eval-sets/test_calculator_single.json - Single test case eval set * Contains only one evaluation (12 + 12 = 24) for simpler testing **Regenerated Files:** - entry-points.json - Auto-regenerated by uipath init with 3 entrypoints - agent-calculator.mermaid - Updated diagram file Now `uv run uipath eval agent-calculator evaluations/eval-sets/test_calculator_single.json` will work correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]> feat: add process bindings for calculator suspend/resume sample - Add bindings.json with Add.Two.Number.API.Workflow.Tool process configuration - Update graph_calculator.py to use process from bindings instead of hardcoded values - Regenerate entry-points.json unique IDs for agent variants This enables the calculator agent to invoke real RPA processes with proper suspend/resume behavior, demonstrating production-ready workflow orchestration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Add agent-basic.py with basic suspend/resume functionality - Add graph_basic.py for graph construction - Add test evaluation set for basic agent - Update configuration files (entry-points.json, langgraph.json, pyproject.toml, uipath.json) - Update dependencies in uv.lock 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
6c7e5bc to
b54870d
Compare
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
Add comprehensive sample demonstrating the suspend/resume pattern for LangGraph agents that need to pause execution for external work (RPA processes, human-in-the-loop, external APIs, etc.).
What's Included
Core Agent Variants
interrupt()Process Bindings 🆕
Documentation
Testing & Evaluation
Configuration
Key Features
✅ Three Agent Variants - Production RPA, development-friendly, and calculator demonstrations
✅ Process Bindings - 🆕 Real RPA process integration with bindings.json
✅ Proper Suspend/Resume Pattern - Uses LangGraph's
interrupt()for clean suspension points✅ Checkpoint Persistence - State saved to SQLite for reliable resume
✅ Comprehensive Testing - Full test suite with validation and evaluations
✅ Rich Documentation - README, guides, and inline documentation
✅ Inspection Utilities - inspect_state.py for checkpoint database analysis
Use Cases
This sample is essential for:
Testing
Run the interactive demo:
cd samples/tool-calling-suspend-resume uv run python demo_suspend_resume.pyThis demonstrates:
interrupt()→ SUSPENDSTest with evaluations:
Architecture
The suspend/resume pattern enables:
Recent Updates
🤖 Generated with Claude Code