Human-in-the-loop API and SDK

Human-in-the-loop for your AI agent's users.

When your agent hits a step that needs a person, Pushary asks them on their phone and waits for the answer, fail-closed.

What is a human-in-the-loop API?

A human-in-the-loop API lets an AI agent pause mid-run and wait for a person to decide. Pushary is a managed one: enroll(externalId) connects a user's phone in one tap, decisions.ask() blocks until they approve, deny, or answer, and the call fails closed if nobody responds. Every decision is written to a durable ledger.

New to the pattern? Human-in-the-loop for AI agents, explained covers what it means and where the checkpoints sit.

The integration

Two calls, and your agent can ask a human

Connect a user's phone once, then ask a human where it matters. Your users tap once to connect, with no account, no app, and no key on their side.

npm i @pushary/servertwo calls
import { createPusharyServer } from "@pushary/server"

const px = createPusharyServer({ apiKey: process.env.PUSHARY_API_KEY! })

// Connect an end-user's phone once. Keyless, one tap, no app to install.
await px.enroll(user.id)

// Ask a real human. Blocks until they decide. Fail-closed on timeout.
const decision = await px.decisions.ask({
  externalId: user.id,
  type: "confirm",
  question: "Approve a $480 refund to customer #4471?",
})

if (decision.approved) await issueRefund()

How it works

From ask to resume

Connect the phone once, ask a human at the step that guards a risky action, and act on the decision. The waiting, the delivery, and the record are handled for you.

  1. 01

    Connect the phone that approves

    Call enroll(externalId) with your own id for the user. They tap a one-tap link once to connect their phone. No account, no app, no key on their side.

  2. 02

    Install the SDK

    Use @pushary/server in TypeScript or pip install pushary in Python. On the Vercel AI SDK and Eve, use the @pushary/ai-sdk and @pushary/eve adapters.

  3. 03

    Ask a human where it matters

    Call decisions.ask inside the tool or step that guards the risky action. It sends the question to the person's phone and blocks until they answer.

  4. 04

    Act on the fail-closed decision

    If nobody answers in your window, the decision comes back denied, so a timeout never turns into an unapproved action. Every answer is written to a durable ledger.

A decision is a yes or no confirm, a multiple-choice select, or a free-text input. Every one is stored with its outcome and kept in the audit log.

FAQ

Questions, answered

Give your users the final say, on their phone.

Connect a user with one tap, ask a human with one call, and act on a fail-closed decision. Every decision is saved to a durable ledger you can audit.

Partner plan, $99 a month. Your users never see a Pushary login or bill.