Skip to main content
Version: 1.14.0

Operate durable AgentWorks runs and interactions

AgentWorks records a run before a worker executes it and keeps its release, deployment, invoker, limits, events, checkpoints, and external-effect decisions together. A compatible worker can continue accepted work after a process failure without silently switching the agent definition or repeating a committed effect.

How do you follow a run?​

Use the run resource for its current state, the steps collection for its projection, and the ordered event stream for what happened. The Server-Sent Events stream assigns a stable sequence to each event and accepts the last event ID when a client reconnects.

The API and CLI expose these operator actions:

TaskCLI surfaceExpected effect
Inspect current stateagentworks run showReturns the pins, state, usage, result, or typed failure
List ordered eventsagentworks events listReturns a verified page anchored to the run's event sequence
Follow live eventsagentworks stream <run-id>Reconnects without skipping accepted events
Cancel workagentworks run cancelRequests cancellation and records its outcome
Pause safelyagentworks run pausePauses immediately or at the next safe boundary
Continue paused workagentworks run resumeRequeues the same pinned run
Plan a replayagentworks replay planShows what can and cannot be repeated before execution

An active executor that cannot resume its current exchange without repeating work refuses an unsafe pause. Treat that refusal as protection, not as a transient API error.

What does durable execution guarantee?​

AgentWorks fences worker leases, checkpoints progress, and records an external effect before another continuation can claim it. A recovered continuation reuses a committed result rather than calling the external system again.

No runtime can force an external system to be exactly-once. If a connection fails after the external action but before its result is recorded, AgentWorks reports the outcome as uncertain. Design consequential tools with their own idempotency key and reconciliation operation.

How does a run wait for a person?​

A run can create a typed interaction, block without retaining a worker, and resume after an authorized response. Interactions carry the same workspace and run pins as the work that requested them.

Supported operator workflows include listing and inspecting interactions, submitting one response, expiring an overdue request, cancelling it, or revoking a response whose authority no longer holds. Assignment and one-winner rules prevent two reviewers from deciding the same interaction differently.

Never put a secret in interaction display text. Treat submitted files, URLs, and structured values as untrusted run input and apply the same validation and policy used for other external content.

How do callbacks and sessions resume work?​

A logical session serializes deduplicated messages at safe run boundaries. Durable operations let a run start an external activity, release its worker, and continue from either an authenticated callback or bounded polling. The terminal operation result is accepted once and then delivered through the session inbox.

Use sessions for conversations or external threads that outlive one request. Use durable operations for a specific long-running dependency. Neither mechanism changes the run's release or deployment pins.

How do child runs and wake-ups behave?​

A parent can start a bounded child run against an explicit deployment or expose an agent as a tool. The child gets its own release and execution identity, a narrowed budget, and recorded parent/root lineage. Parent cancellation propagates, while child completion resumes the parent once.

A scheduled wake-up resumes an existing run with its original pins. It does not re-resolve the deployment at wake time. Portable restoration of a sandboxed process is not promised; a run that requires an unavailable restore capability is refused rather than resumed unsafely.

Next steps​