Build approvals into your agent
The decision layer for AI agents. Your agent asks. Your user decides, on their phone.
Some things your agent does need a yes first: a refund, an email to a customer, a delete. Don't build an approval app for that. Add Pushary. Your user gets a notification with your product's name in it, taps Approve or Deny, and your agent carries on. If nobody answers, the action does not run.
This page gets you to a first answer in about five minutes. Want to see it work first? Try it in your browser. No signup.
What you need
- A Partner plan and its API key. Get both at Partner onboarding.
- Your own id for each user, such as
user.id. Pushary calls itexternalId. - Your users install the free Pushary app and open your link once. They never sign up or pay.
1. Install
npm i @pushary/server
export PUSHARY_API_KEY=pk_xxx.sk_xxx2. Connect a user once
import { createPusharyServer } from '@pushary/server'
const pushary = createPusharyServer({ apiKey: process.env.PUSHARY_API_KEY! })
const { universalLink } = await pushary.enroll(user.id)
// Show universalLink to this user as a button or a QR code.The user opens the link on their phone. It opens the Pushary app if they have it.
If not, the page offers the app or browser notifications. After that, every question
for this externalId reaches their phone. The link works once and expires, so save that the user connected, not the link.
3. Ask before the risky step
const decision = await pushary.decisions.ask({
externalId: user.id,
question: 'Refund $480 to order #4471?',
})
if (decision.approved) {
await issueRefund()
}That is the whole integration. ask waits up to 55 seconds for an answer.
approved is true only when the person tapped Approve. Deny, an expired question
and no answer at all give approved: false, so the refund does not run.
What your user sees
- A notification titled with your product name, such as Acme needs your approval.
- They tap Approve or Deny from the lock screen.
- Your code gets the answer and carries on.
Next
- Use your framework's own approval hook: Vercel AI SDK, LangGraph, OpenAI Agents SDK, Mastra, Claude Agent SDK, or every other adapter.
- Wait longer than one request can hold, with callbacks and resume: the full Partner guide.
- Test without a phone: sandbox testing.