Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

awaithumans

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awaithumans

HITL infrastructure for AI agents. Your agent calls awaitHuman(), a human reviews via Slack/email/dashboard, agent resumes with a typed response.

latest
Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
216
-54.33%
Maintainers
1
Weekly downloads
 
Created
Source

awaithumans — HITL infrastructure for AI agents

awaithumans

Your agents already await promises. Now they can await humans.


npm installs GitHub stars

npm Node License Discord

Docs · Quickstart · Examples · Discord


HITL infrastructure for AI agents — open source. A single primitive (awaitHuman()) your agent calls when the model can't or shouldn't proceed alone. A human gets notified (Slack, email, or dashboard), reviews the request, submits a typed response, and your agent resumes — like awaiting any other promise.

import { awaitHuman } from "awaithumans";
import { z } from "zod";

const RefundRequest = z.object({
  orderId: z.string(),
  amountUsd: z.number(),
});

const Decision = z.object({
  approved: z.boolean(),
  note: z.string().optional(),
});

const decision = await awaitHuman({
  task: "Approve refund request",
  payloadSchema: RefundRequest,
  payload: { orderId: "A-4721", amountUsd: 180 },
  responseSchema: Decision,
  timeoutMs: 900_000,
});

if (decision.approved) {
  await processRefund(...);
}

awaithumans demo — an agent creates a task, a human reviews it, the agent resumes with the typed response

The awaithumans dashboard — pending tasks queued for human review

Install

npm install awaithumans
# or
pnpm add awaithumans
# or
bun add awaithumans

Works in Node 20+, Bun, Deno, and edge runtimes (Cloudflare Workers, Vercel Edge). No node:* imports.

Run the server

The awaithumans server (which handles task storage, Slack/email channels, and hosts the review dashboard) is written in Python. As a TypeScript developer you don't have to touch a Python environment — the npm CLI wraps it:

npx awaithumans dev

Under the hood this uses uv to fetch + run the Python server on demand. Install uv once:

curl -LsSf https://astral.sh/uv/install.sh | sh   # unix
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"  # windows

First run prints a setup URL. Open it, create the operator account, you're in. The dashboard is at http://localhost:3001.

Prefer Docker? docker run -p 3001:3001 ghcr.io/awaithumans/awaithumans:latest.

Tasks can be delivered to Slack channels with a "Claim this task" button — first clicker atomically wins, response form opens as a modal, agent unblocks when they submit. Add notify: ["slack:#ops"] to the awaitHuman() call:

Slack broadcast — a task posted to a channel with a Claim button

Durable workflows

When your agent runs inside Temporal or LangGraph, you don't want the wait sitting on an orchestrator thread for 15 minutes:

// Temporal — signal-based suspend + callback
import { awaitHuman } from "awaithumans/temporal";

// LangGraph — interrupt/resume
import { awaitHuman } from "awaithumans/langgraph";

Same awaitHuman shape, same typed response. The adapter just changes how the wait is orchestrated.

Testing

An in-memory mock client so your agent tests don't need a running server:

import { createTestClient } from "awaithumans/testing";

const client = createTestClient();

// Drive the human's response programmatically.
client.onAwait((task) => ({ approved: true, note: "looks good" }));

Documentation

License

Apache License 2.0. The TypeScript SDK, every adapter subpath export, and the Python server + dashboard it talks to are all under the same license — permissive, OSI-approved, with an explicit patent grant.

Keywords

human-in-the-loop

FAQs

Package last updated on 24 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts