agently-triggerflow-interrupts-and-stream
SKILL.md
Agently TriggerFlow Interrupts And Stream
This skill covers TriggerFlow interrupt handling and runtime stream. It focuses on pause_for(...), continue_with(...), pending interrupts, runtime stream lifecycle, interactive wait-and-resume loops, and forwarding live model output into TriggerFlow runtime stream. It does not cover general orchestration patterns, flow config export/import, or execution-state persistence and restore.
Prerequisite: Agently >= 4.0.8.5.
Scope
Use this skill for:
async_pause_for(...)andpause_for(...)get_pending_interrupts()async_continue_with(...)andcontinue_with(...)- interrupt status transitions and resume events
async_put_into_stream(...),put_into_stream(...),async_stop_stream(...), andstop_stream(...)get_async_runtime_stream(...)andget_runtime_stream(...)- runtime stream behavior when a TriggerFlow stream contract exists
- runtime stream timeout behavior
- interactive loops that alternate between waiting and resuming
- forwarding model delta or other live producer output into runtime stream
Do not use this skill for:
batch(...),for_each(...),collect(...), or sub-flow orchestration designruntime_datavsflow_dataarchitecture in general- flow config export/import or Mermaid output
- execution
save()/load()restore mechanics after restart - provider setup or standalone model-output parsing outside the TriggerFlow boundary
Workflow
- Start with references/pause-and-resume.md if the workflow must wait for a human or external system.
- Read references/runtime-stream.md when the flow should produce live business output during execution.
- Read references/interactive-loop-patterns.md when the flow alternates between input, live output, and resume events.
- If live model output should flow through TriggerFlow, read references/model-stream-bridge.md.
- If the main task is saving and restoring a waiting execution, switch to
agently-triggerflow-execution-state. - If behavior still looks wrong, use references/troubleshooting.md.
Core Mental Model
TriggerFlow has two live interaction surfaces:
- interrupts for waiting and resuming
- runtime stream for progressive output
They are related, but different:
- interrupts change execution status and wait for external continuation
- runtime stream pushes live items to consumers without deciding final result
- user stream contract validation applies to user-defined stream items, while system interrupt events can still pass through the runtime stream
Public guidance for this skill should remain async-first:
- prefer
async_pause_for(...) - prefer
async_continue_with(...) - prefer
get_async_runtime_stream(...) - prefer
async_put_into_stream(...)
Use sync wrappers only when the caller truly needs a sync bridge.
Selection Rules
- workflow must stop and wait for human approval ->
pause_for(...) - external system should resume a specific waiting execution ->
get_pending_interrupts()+continue_with(...) - UI should see live progress events before final result -> runtime stream
- runtime stream should carry both typed business events and built-in interrupt events -> use runtime stream and account for system interrupt events in the consumer
- long-running interactive loop should keep streaming output while re-entering the flow -> runtime stream plus explicit resume or loop events
- model tokens or structured stream events should be surfaced through the workflow -> forward them into runtime stream
- final result is still needed after streaming or resume -> reach
end()or callset_result(...) - saving and restoring a waiting execution -> use
agently-triggerflow-execution-state
Important Boundaries
- runtime stream is independent from final result
continue_with(...)resumes through the interrupt's configured resume event- runtime stream can end by explicit
stop_stream()or by consumer timeout - if a flow has a stream contract, user-defined stream items are validated but system interrupt events are still legal runtime stream items
- saving and restoring a waiting execution is a separate persistence skill, not this one
References
references/source-map.mdreferences/pause-and-resume.mdreferences/runtime-stream.mdreferences/interactive-loop-patterns.mdreferences/model-stream-bridge.mdreferences/troubleshooting.md
Weekly Installs
1
Repository
agentera/agently-skillsGitHub Stars
4
First Seen
7 days ago
Security Audits
Installed on
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1