resonate-human-in-the-loop-pattern-python

Create durable Python workflows that wait for external approvals and webhook callbacks via Resonate's SDK promises API.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-human-in-the-loop-pattern-python
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-human-in-the-loop-pattern-python
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-human-in-the-loop-pattern-python
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-human-in-the-loop-pattern-python

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill lets durable Python workflows pause execution and await decisions or data that originate outside the worker process, removing brittle polling and enabling wake-on-event behavior for approvals, callbacks, and operator actions.

Core Features & Use Cases

  • Deterministic promise coordination: Create promise IDs from stable workflow inputs so external systems can reliably resolve or reject them.
  • Webhook and CLI integration: Resolve or reject promises from webhooks, UIs, or operator tooling using the Python SDK's prometes API.
  • Timeouts and error handling: Support absolute ms-since-epoch timeouts and natural try/except handling for rejected or expired promises.
  • Parallel approvers and fan-out patterns: Manage multi-approver workflows by composing multiple promises and aggregating decisions.

Quick Start

Start a workflow that yields ctx.promise with a deterministic id and resolve it from an external webhook using resonate.promises.resolve to unblock the worker.

Frequently Asked Questions about resonate-human-in-the-loop-pattern-python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pause a Python durable workflow to wait for external human approvals?

You pause a durable workflow to wait for external human approvals by yielding a promise with a deterministic ID, which blocks execution until an external system resolves or rejects it via the Python SDK.

Can I use FastAPI webhooks to resolve workflow promises in Python?

FastAPI webhooks can resolve workflow promises in Python by calling the SDK's promises API to unblock waiting workers, enabling wake-on-event behavior for external callbacks and UI integrations.

How do I handle timeouts and rejections for webhook-driven workflow approvals?

Timeouts and rejections for webhook-driven workflow approvals are handled using absolute ms-since-epoch timeouts and natural try/except exception handling for expired or rejected promises.

What is the best way to coordinate multi-approver fan-out patterns in durable workflows?

Multi-approver fan-out patterns in durable workflows are coordinated by composing multiple promises with deterministic IDs and aggregating the external resolver decisions to reach a final outcome.

Does this human-in-the-loop pattern require polling to check for external webhook events?

This human-in-the-loop pattern removes brittle polling by enabling deterministic promise coordination, allowing durable workflows to wake-on-event when external webhook or operator actions arrive.

When do I need deterministic promise IDs for external workflow callbacks?

Deterministic promise IDs for external workflow callbacks are needed when creating approval gates or operator-driven runbook steps, ensuring external systems can reliably resolve or reject the correct promise.