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.
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()Every framework
Add it to the agent you already built
The same two calls, in the idiom of your framework. Published adapters where they help, and the server or Python SDK everywhere else.
Vercel AI SDK
Ask a human from your Vercel AI SDK agent, answered on a phone.
npm i @pushary/ai-sdkLangGraph
Ask a human from your LangGraph agent, answered on a phone.
pip install pushary-langgraphCrewAI
Ask a human from your CrewAI agent, answered on a phone.
pip install pushary-crewaiOpenAI Agents SDK
Ask a human from your OpenAI Agents SDK agent, answered on a phone.
pip install pushary-openai-agentsEve
Ask a human from your Eve agent, answered on a phone.
npm i @pushary/eveMastra
Ask a human from your Mastra agent, answered on a phone.
npm i @pushary/mastraLangChain
Ask a human from your LangChain agent, answered on a phone.
pip install pusharyMCP
Ask a human from your MCP agent, answered on a phone.
No install. One MCP server entry.Claude Agent SDK
Ask a human from your Claude Agent SDK agent, answered on a phone.
No install. One mcpServers entry.Hermes
Ask a human from your Hermes agent, answered on a phone.
pip install pusharyOpenClaw
Ask a human from your OpenClaw agent, answered on a phone.
npm i @pushary/serverOn a framework not listed here? The same two calls work anywhere @pushary/server or pip install pushary runs.
By product type
What should not run unattended in your product
Which actions to gate, who the approver actually is, and the objection that buyer raises.
travel and expense agents
Let the agent book what fits policy on its own, and route the exception to whoever owns the budget.
customer support agents
The escalation reaches a person on their phone and comes back as an answer, not a ticket in a queue.
AI SDR and outbound agents
The rep approves the send from their lock screen, and the agent carries on without waiting for anyone to open a dashboard.
DevOps and SRE agents
Your agent gates the risky change correctly. Pushary is what gets the answer back before the incident gets worse.
legal AI agents
The supervising attorney reviews and signs off from their phone, and the record of who approved what is kept for you.
finance and accounting agents
The approver signs off from their phone, the agent blocks until they do, and the record is kept without you building one.
healthcare AI agents
The reviewing clinician approves from their phone between patients, and the review is recorded without a second system.
insurance AI agents
The adjuster or underwriter decides from their phone, inside their authority, and the record shows who it was.
security and SOC agents
The on-duty analyst authorises the containment from their phone, and the authorisation is recorded as part of the incident.
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.
- 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.
- 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.
- 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.
- 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
What is a human-in-the-loop API?
How do I add human-in-the-loop to an AI agent I already built?
What is human-in-the-loop for AI agents?
How can my agent ask my own users instead of just me?
What happens if nobody answers?
Do my end-users need an account or app?
Which frameworks does Pushary support?
How much does it cost?
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.