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: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):- Call args (
serverUrl,apiKey) - Environment variables —
globalThis.process?.env?.AWAITHUMANS_URL/AWAITHUMANS_ADMIN_API_TOKEN - Defaults (
http://localhost:3001, no token)
process.env, only call args + defaults are read. Set explicitly for production deployments to Cloudflare Workers, Deno Deploy, etc.
Type narrowing
Zod’sz.infer<typeof Schema> gives you the static type: