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.
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
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.