Problem
Checkout, onboarding, and applications span several steps. Agents driving them through the UI lose their place when interrupted, and cannot tell which steps are complete.
Context
Use this pattern when:
- A task requires several inputs collected over time, possibly with human input in between.
- Steps have dependencies: shipping must be chosen before payment.
Recommended solution
Represent the task as a workflow resource. The workflow lists its steps, the status of each, the inputs still required, and the next available action.
Agents advance the workflow one step at a time and can read it at any point to recover their position.
- 01Create a workflow resource with a stable ID.
- 02Describe each step's required input and status.
- 03Expose the next action explicitly.
- 04Persist progress so the workflow can resume after interruption.
Interaction diagram
Example implementation
Illustrative exampleExamples use a fictional store and illustrative field names. Adapt the shape to your stack; the qualities matter more than the exact format.
{
"id": "wf_19",
"type": "checkout",
"status": "in_progress",
"steps": [
{ "name": "shipping", "status": "completed" },
{ "name": "payment", "status": "awaiting_input", "requires": ["paymentMethodId"] },
{ "name": "review", "status": "pending" }
],
"next": { "action": "submit_payment", "input": { "$ref": "#/schemas/PaymentInput" } },
"expiresAt": "2026-10-06T16:00:00Z"
}Accessibility and security
Accessibility
- Stepped workflows with visible progress already help people with cognitive disabilities; exposing the same step model to agents keeps both experiences aligned.
Security
- Bind workflows to the grant that created them; do not let another agent resume someone else's workflow.
- Expire abandoned workflows and release any held resources.
Related patterns
Applies the principles Transparent State and Predictable Actions.