Use when developer-owned execution needs inspectable branching, concurrency, joins, waits, approval, retry, runtime streams, pause/resume, recovery, or mixed sync/async orchestration. Use agently-stage instead when a provider-owned sync wrapper only bridges an async SDK.
68
82%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use TriggerFlow when the application owns visible multi-stage execution
semantics. Use ModelRequest/AgentExecution for one bounded request/run, and use
agent.create_task(...) when one Agent owns a long task's planning, evidence,
verification, and repair without application-authored stage topology.
references/overview.md.references/recovery.md.references/runtime-intervention.md.references/stream-bridge.md.references/devtools-graph.md.../agently-design/references/execution-topology-validation.md.agently-stage.Before implementation, map:
Use batch(...), for_each(...), when(...), and managed emits to make
fan-out and joins graph-visible. Represent repetition with an explicit back
edge; do not hide lifecycle, retry, or revision loops inside while True chunk
handlers.
A ModelRequest is a dispatch-time snapshot. instant output may update UI or
start idempotent/cancelable preparation, but a later model request that needs
the resulting observation must start after a visible join and validation
barrier.
Graph adjacency proves activation, not value transfer. For audits, trace exact values, signals, refs, and consumers through ModelRequest, Action, subflow, TaskWorkspace/RecordStore, wait/resume, repair, and terminal boundaries.
agently-stage.flow.start(...) / flow.async_start(...) only for finite self-closing
runs whose caller needs no execution handle.flow.create_execution(auto_close=False) for external emit, pause/resume,
save/load, intervention, inspection, cancellation, or host-controlled close.await execution.async_close().
Close drains execution-managed nowait work and reports unresolved ownership.data.is_resume branch; a suspended Python frame is not the recovery
contract.flow_data is shared across executions. Save/load serializes and replaces a
copy of that shared value; it does not provide isolation, CAS, merge, or
concurrency safety.create_execution(concurrency=N) bounds execution-wide handler dispatch;
batch(..., concurrency=N) and for_each(..., concurrency=N) bound local
fan-out.emit_nowait(...) / async_emit_nowait(...) instead of untracked
asyncio.create_task(...); execution close settles registered work.pause_for(..., resume_to=...) for required external input. Use runtime
intervention only for optional context at declared boundaries.Save/load owns TriggerFlow progress and declared recovery metadata, not live clients, callbacks, semaphores, coroutine frames, secrets, or external session state. Restore live ExecutionResources through host/plugin resolvers and verify external refs, versions, leases, and fence tokens before readiness. A local RecordStore proves local restart only; do not claim distributed recovery without a real shared provider and operational evidence.
Define developer-owned stable topology directly in importable TriggerFlow
modules with top-level handlers. Explicit submitted or model-generated DAG
data is a low-frequency TaskDAG case; read
../agently/references/task-dag.md. Never compile unvalidated runtime plan data
into ad hoc TriggerFlow definitions.
from agently import Agently, TriggerFlow
flow = TriggerFlow(name="workflow-name")
factory_flow = Agently.create_trigger_flow("factory-workflow")
execution = flow.create_execution(auto_close=False)when, emit_nowait, and pause_for are flow/runtime methods, not top-level
imports. Do not use @flow.when(...) as a decorator or pass a flow name as the
first positional TriggerFlow(...) argument.
flow_data as ordinary per-execution state.5dc8d96
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.