feat: add suspend/resume support for RPA invocations in evaluations#1083
feat: add suspend/resume support for RPA invocations in evaluations#1083
Conversation
Quick Testing GuideInstall the Dev Versionpip install git+https://github.com/UiPath/uipath-python@v2.4.9-dev.suspend-resumeRun Quick Testcd samples/event-trigger
# Test 1: Direct runtime test
python -c "
import asyncio
from uipath.functions.runtime import UiPathFunctionsRuntime
async def test():
runtime = UiPathFunctionsRuntime(
'test_suspend_resume_agent.py',
'main',
'test_suspend_resume_agent'
)
result = await runtime.execute({'query': 'Test'})
print(f'✓ Status: {result.status}')
print(f'✓ Has Trigger: {result.trigger is not None}')
if result.trigger:
print(f'✓ Process: {result.trigger.payload[\"process_name\"]}')
asyncio.run(test())
"
# Test 2: Evaluation test
uipath eval test_suspend_resume_agent evaluations/test_suspend_resume.json --output-file test_output.json
cat test_output.json | python -m json.tool | grep -A 5 "status"Expected Results✅ Status: Key Files Changed
Tag: |
0a124f0 to
a35d2a5
Compare
|
Just to understand, so the |
| @@ -22,6 +22,11 @@ | |||
| UiPathErrorContract, | |||
There was a problem hiding this comment.
you need to undo everything in this file (this is used for arbitrary python code, no langgraph deps)
|
|
||
| result = UiPathRuntimeResult( | ||
| output={**results.model_dump(by_alias=True)}, | ||
| status=UiPathRuntimeStatus.SUCCESSFUL, |
There was a problem hiding this comment.
if the runtime is suspended, you need to pass the result as suspended to the serverless exector
This commit consolidates changes for suspend/resume functionality: - Add suspend/resume support for RPA invocations in evaluations - Add --resume option and trigger pass-through to eval runtime - Add comprehensive logging for suspend/resume detection - Add architecture documentation for interrupt/suspend/resume patterns - Add Claude Code skills for agents - Add content_tokens and argument_properties to agent model - Expose more configs in manager - Add documents samples - Fix linting issues in functions runtime - Remove deprecated hello-world sample - Update evaluation spans with output attributes and metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
a35d2a5 to
c2548d0
Compare
Summary
Adds support for suspend/resume pattern in evaluation runtime, enabling agents to suspend execution when invoking RPA processes and resume after completion.
Key Changes
Suspend Detection (_runtime.py)
UiPathRuntimeStatus.SUSPENDEDafter agent executionResume Support (cli_eval.py)
--resumeflag to evaluation CLITrigger Pass-Through
interruptId: Unique interrupt identifiertriggerType: Type of trigger (e.g., "Api")payload: InvokeProcess details (process name, input arguments, folder path)Comprehensive Logging
Testing
Testing is done via the sample agent in the companion PR: UiPath/uipath-langchain-python#397
Related
Companion PR for sample agent: UiPath/uipath-langchain-python#397