Skip to main content
The base package has a single dep (zod) and works on Node, Bun, Deno, and edge runtimes — no node:* imports.

awaitHuman

The primitive:

Options

Returns

Promise<TResponse> — typed against responseSchema. Zod-validated. Validation failure throws SchemaValidationError.

Throws

All extend AwaitHumansError. Use instanceof to discriminate:

Adapters

Temporal

Subpath export:
Requires peer deps:
See Temporal.

LangGraph

Requires peer dep:
See LangGraph.

Cross-language parity

The TS SDK and the Python SDK speak the identical wire format and produce identical signed webhook signatures (HKDF parameters locked, asserted in cross-language tests). A Python workflow can hand off webhooks to a TS receiver and vice versa without code changes.

Configuration

Reads in order (first match wins):
  1. Call args (serverUrl, apiKey)
  2. Environment variables — globalThis.process?.env?.AWAITHUMANS_URL / AWAITHUMANS_ADMIN_API_TOKEN
  3. Defaults (http://localhost:3001, no token)
In edge runtimes without process.env, only call args + defaults are read. Set explicitly for production deployments to Cloudflare Workers, Deno Deploy, etc.

Type narrowing

Zod’s z.infer<typeof Schema> gives you the static type:
The function’s generic inference picks this up automatically; you rarely need to write the type by hand.