{
  "format": "delx/intent-card/v1",
  "id": "pause-resume-agent-workflow",
  "intent": "pause an agent workflow and resume it when a webhook arrives",
  "title": "Pause and resume an agent workflow on a future outcome",
  "description": "Register one bounded, durable promise for $0.01: keep an opaque client-owned continuation and release it after a future time or matching webhook event. No HTTP polling, decryption, or exactly-once delivery claim.",
  "keywords": [
    "agent workflow pause resume",
    "durable agent promise",
    "webhook outcome relay",
    "wait for webhook API",
    "x402 workflow continuation"
  ],
  "updated_at": "2026-08-07",
  "canonical_url": "https://commerce.delx.ai/intents/pause-resume-agent-workflow",
  "machine_url": "https://commerce.delx.ai/intents/pause-resume-agent-workflow.json",
  "recommendation": {
    "tool_name": "create_await",
    "service_name": "Delx Await Promise",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/await",
    "price_usdc": "0.01",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "idempotency_key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "description": "Stable client key. Replaying the same paid request returns the same promise and capability."
        },
        "ttl_ms": {
          "type": "integer",
          "minimum": 1,
          "maximum": 604800000,
          "default": 86400000
        },
        "condition": {
          "type": "object",
          "oneOf": [
            {
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "time"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "kind",
                "at"
              ],
              "additionalProperties": false
            },
            {
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "webhook"
                },
                "event_type": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              },
              "required": [
                "kind",
                "event_type"
              ],
              "additionalProperties": false
            }
          ],
          "description": "A future timestamp or an inbound event type. External HTTP polling is intentionally disabled."
        },
        "resume_envelope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32768,
          "description": "Opaque client-owned continuation ciphertext. Delx stores and releases it only after capability authorization."
        },
        "delivery": {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "claim",
                "webhook"
              ]
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "HTTPS endpoint; required for webhook delivery."
            }
          },
          "required": [
            "mode"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "idempotency_key",
        "condition",
        "resume_envelope"
      ],
      "additionalProperties": false
    },
    "example_input": {
      "idempotency_key": "build-42-await",
      "ttl_ms": 3600000,
      "condition": {
        "kind": "webhook",
        "event_type": "build.completed"
      },
      "resume_envelope": "ciphertext:v1:client-owned-opaque-envelope",
      "delivery": {
        "mode": "claim"
      }
    },
    "example_output": {
      "schema": "delx/await/v1",
      "promise_id": "123e4567-e89b-12d3-a456-426614174000",
      "state": "waiting",
      "created_at": "2026-08-04T16:00:00Z",
      "expires_at": "2026-08-04T17:00:00Z",
      "condition": {
        "kind": "webhook",
        "event_type": "build.completed"
      },
      "delivery": {
        "mode": "claim",
        "state": "claim_only",
        "attempts": 0,
        "event_id": null
      },
      "resume_envelope_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "capability": "opaque-capability-returned-on-create",
      "receipt": {
        "schema": "delx/await-receipt/v1",
        "algorithm": "Ed25519"
      }
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/await -m POST -H 'x-delx-source: intent-card-pause-resume-agent-workflow' --max-amount 0.01 -b '{\"idempotency_key\":\"build-42-await\",\"ttl_ms\":3600000,\"condition\":{\"kind\":\"webhook\",\"event_type\":\"build.completed\"},\"resume_envelope\":\"ciphertext:v1:client-owned-opaque-envelope\",\"delivery\":{\"mode\":\"claim\"}}'",
      "max_amount_usdc": "0.01"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-pause-resume-agent-workflow"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/await"
  }
}
