Skip to content
AX Framework
Interaction pattern

Multi-step Workflows

Model long tasks as named workflows with explicit steps, persistent state, and resumable progress.

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.

  1. 01Create a workflow resource with a stable ID.
  2. 02Describe each step's required input and status.
  3. 03Expose the next action explicitly.
  4. 04Persist progress so the workflow can resume after interruption.

Interaction diagram

Interaction diagram for Multi-step Workflows. 1. AI agent to Product · AX layer: start_checkout(cartId). 2. Product · AX layer to AI agent: workflow wf_19: step shipping. 3. AI agent to Product · AX layer: submit shipping. 4. Product · AX layer to AI agent: step payment: needs approval. 5. AI agent to Person: Ask to approve payment.PersonAI agentProduct · AX layerstart_checkout(cartId)1workflow wf_19: step shipping2submit shipping3step payment: needs approval4Ask to approve payment5
request response internal step

Example implementation

Illustrative example

Examples use a fictional store and illustrative field names. Adapt the shape to your stack; the qualities matter more than the exact format.

GET /workflows/wf_19json
{
  "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.

Applies the principles Transparent State and Predictable Actions.