Skip to content

Conversation

@mjnovice
Copy link
Contributor

Summary

  • Add --poll-for-triggers CLI flag to uipath run that enables polling for resume triggers instead of suspending
  • Create SilentDebugBridge for non-interactive polling mode
  • Reuse existing UiPathDebugRuntime polling mechanism

Usage

# Poll with default 5s interval
uipath run agent.py '{}' --poll-for-triggers

# Poll with custom 10s interval
uipath run agent.py '{}' --poll-for-triggers=10

Behavior

  • API/HITL triggers: Prompts for JSON input via stdin
  • Other triggers (TASK, JOB, DEEP_RAG, QUEUE_ITEM, etc.): Polls backend until complete
  • Ctrl+C: Graceful termination during polling

Test plan

  • Test basic polling: uipath run agent.py '{}' --poll-for-triggers
  • Test custom interval: uipath run agent.py '{}' --poll-for-triggers=10
  • Test Ctrl+C interruption during polling
  • Test API trigger prompts for input
  • Verify existing tests pass

🤖 Generated with Claude Code

Add a new CLI flag that enables polling for resume triggers instead of
suspending execution. This reuses the existing UiPathDebugRuntime polling
mechanism with a new SilentDebugBridge for non-interactive use.

Usage:
- `uipath run agent.py '{}' --poll-for-triggers` (5s default interval)
- `uipath run agent.py '{}' --poll-for-triggers=10` (custom 10s interval)

For API/HITL triggers, prompts for JSON input via stdin.
For other triggers (TASK, JOB, DEEP_RAG, etc.), polls until complete.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 30, 2026
@mjnovice mjnovice changed the title feat: add --poll-for-triggers flag to uipath run WIP feat: add --poll-for-triggers flag to uipath run Jan 30, 2026
help="Keep the temporary state file even when not resuming and no job id is provided",
)
@click.option(
"--poll-for-triggers",
Copy link
Member

@cristipufu cristipufu Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would call this --auto-resume (and have an implicit value like 10 seconds for polling)

)

silent_bridge = SilentDebugBridge()
runtime = UiPathDebugRuntime(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're wrapping the base runtime twice in a Debug Runtime for the code path w/o job key

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

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants