Documentation Index
Fetch the complete documentation index at: https://docs.awaithumans.dev/llms.txt
Use this file to discover all available pages before exploring further.
zod) and works on Node, Bun, Deno, and edge runtimes — no node:* imports.
awaitHuman
The primitive:Options
| Option | Type | Required | Description |
|---|---|---|---|
task | string | yes | Human-readable task description. |
payloadSchema | ZodType | yes | Drives the UI the human sees. |
payload | matches payloadSchema | yes | Data sent to the human. |
responseSchema | ZodType | yes | Drives the response form. |
timeoutMs | number | yes | Min 60,000 (1 min), max 2,592,000,000 (30 days). |
assignTo | AssignTo | undefined | no | Routing target. See Routing. |
notify | string[] | undefined | no | Channel destinations. |
verifier | VerifierConfig | undefined | no | Server-side LLM verification. |
idempotencyKey | string | undefined | no | Default: deterministic from task + payload. |
redactPayload | boolean | undefined | no | Default false. |
serverUrl | string | undefined | no | Override AWAITHUMANS_URL. |
apiKey | string | undefined | no | Override AWAITHUMANS_ADMIN_API_TOKEN. |
Returns
Promise<TResponse> — typed against responseSchema. Zod-validated. Validation failure throws SchemaValidationError.
Throws
| Error | When |
|---|---|
TaskTimeoutError | Task hit timeout. |
TaskCancelledError | Cancelled by agent or operator. |
VerificationExhaustedError | Verifier rejected maxAttempts times. |
SchemaValidationError | Response didn’t match schema. |
TaskNotFoundError | Task disappeared. |
TaskCreateError | Server rejected create. |
PollError | Long-poll non-200. |
ServerUnreachableError | Connection failure. |
MarketplaceNotAvailableError | Reserved for Phase 3. |
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: