Full walkthrough: Human-in-the-loop for Eve. Reaching your own end-users on their phones is the Pushary Partner plan.
Human-in-the-loop for Eve. Give your agent a tool that pauses until a real human approves on their phone, answered from the lock screen.
Two calls is the whole integration:
pusharyConnectPhone()returns a link the end-user taps once to connect their phone.pusharyAskHuman()asks that person and blocks until they answer, with a fail-closed result.
Requires the Pushary Partner plan.
npm i @pushary/eveSet PUSHARY_API_KEY (get it in your dashboard).
Eve discovers tools by file. Drop in two one-line files:
// agent/tools/ask-human.ts
import { pusharyAskHuman } from '@pushary/eve'
export default pusharyAskHuman()// agent/tools/connect-phone.ts
import { pusharyConnectPhone } from '@pushary/eve'
export default pusharyConnectPhone()That is it. The agent now has ask-human (approve / choose / free-text, delivered to a phone, blocks until answered) and connect-phone (returns the one-tap connect link).
By default each tool asks the session principal, so run user-scoped auth and each end-user is their own principal. To bind a fixed end-user (single-user agents, jobs), pass one:
export default pusharyAskHuman({ externalId: 'user_123' })If there is no principal and no configured externalId, the tool throws a clear error instead of asking the wrong person.
- Fail-closed. A declined, expired, or unanswered
confirmis reported to the model as "not approved, do not proceed." Approval only happens on an explicit yes. - Serverless-safe. Each ask blocks up to 55 seconds by default (
timeoutMs). The decision stays answerable for its full lifetime.
pusharyAskHuman(config?) / pusharyConnectPhone(config?) accept { apiKey?, externalId?, agentName?, timeoutMs?, baseUrl? }. apiKey defaults to process.env.PUSHARY_API_KEY.
Thin wrapper over @pushary/server (enroll + decisions.ask). Verified against eve@0.24.x; pin your eve version. See the adapters guide.
MIT
A runnable example is in examples/.