Foundations

Hitl SDK splits into two import layers. Use the right one in workflow functions.

LayerImport fromAPIs
Workflow clientlib/hitl-client.tsrequestHuman, waitForHuman, notify
SDK helpers@hitl-sdk/hitlactions, field, remind, escalate, isResolved

The workflow client is a thin HTTP wrapper over your engine's suspend() / sleep(). It POSTs to your server's internal API; state and channel delivery live only on the server (new Hitl({ … })).

One call vs create + wait

One call creates and waits in a single step:

const result = await waitForHuman({ message: "Approve?", actions, timeout: "72h" });

Create + wait splits creation and waiting when you need to send context in between:

const pending = await requestHuman({ message: "Approve?", actions });
await notify({ after: pending, message: "Extra context for the reviewer" });
const result = await waitForHuman(pending, { reminders: [remind.after("1h")] });

Use create + wait when reviewers need follow-up messages, multi-step timelines, or logic between creation and waiting.

API reference

PageWhat it covers
Human stepsrequestHuman, waitForHuman, one-shot vs create+wait, batch mode
Actions and fieldsactions(), field.*, isResolved, typed results
Notificationsnotify, TimelineAnchor, thread chaining
Timeouts & reminderstimeout, remind.*, escalate.to() schedules

Typical flow

See also: Overview for architecture, Quickstart for a full end-to-end loop.