Human-in-the-loop for Hermes
Human-in-the-loop for Hermes agents, on a phone.
Run pip install pushary and register a tool in a Hermes plugin whose handler calls decisions.ask(). When the agent hits a step that needs a person, the question is pushed to that person's phone and the handler blocks until they decide. Anything short of an explicit approval comes back as not approved. The external_id is your own id for the end-user, connected once with a keyless one-tap link.
import os
from pushary import PusharyServer
px = PusharyServer(api_key=os.environ["PUSHARY_API_KEY"])
def ask_human(params, **kwargs):
d = px.decisions.ask(
question=params["question"],
external_id=params["external_id"],
type="confirm",
)
return "approved" if d["approved"] else f"not approved ({d['status']})"
def register(ctx):
ctx.register_tool(
name="ask_human",
toolset="approvals",
schema={"type": "object", "properties": {
"question": {"type": "string"},
"external_id": {"type": "string"},
}, "required": ["question", "external_id"]},
handler=ask_human,
description="Ask a real person to approve before acting.",
)Why you need it
Hermes pauses the agent. Pushary reaches the human.
A Hermes tool handler is a plain Python function, so the whole integration is one decisions.ask() call inside it. Pushary delivers the question to the right person's phone, holds the handler open until they decide, and writes the outcome to a durable ledger. Hermes' gateway mode runs many users through one agent, so pass each user's external_id from your own user model rather than a session id.
How it works
From ask to resume
Connect the phone once, then ask a human from the tool or step that guards the action. The waiting, the delivery, and the record are handled for you.
- 01
Install the Python SDK
Run pip install pushary into Hermes' environment and set PUSHARY_API_KEY.
- 02
Connect the phone
Call px.enroll(external_id) once per end-user to connect their phone with a keyless one-tap link.
- 03
Register an ask_human tool
In a Hermes plugin's register(ctx), call ctx.register_tool with a handler that calls px.decisions.ask(). The schema tells the model what to pass.
- 04
Keep it fail-closed
Return not approved for anything short of an explicit yes. A declined, expired, or unanswered decision means the agent does not act.
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.
For your users
Your agent asks your users, not just you
Ship the agent to real users and let each of them approve their own decisions from their phone, under your brand.
Your users answer on their own phones
The externalId is your own id for the end-user. Connect their phone once with a keyless one-tap link, and every approval lands with the right person. No account, no app, no key on their side.
Durable, fail-closed waits
The agent stays open on a durable wait backed by a decisions ledger. If nobody answers in the window you set, the decision comes back denied, so a timeout or a restart never turns into an unapproved action.
Phone-first delivery
Pushary reaches the person on the device they carry: native app push first, then PWA push notifications, then Slack if you route it there. You do not build a delivery pipeline.
Signed webhooks and an audit trail
Every decision is written to a durable ledger you can query and export, and resolved decisions post a signed webhook to your callback URL. You have the record of who approved what and when.
FAQ
Questions, answered
Human-in-the-loop for other frameworks
Let your Hermes agent ask a human.
Connect a user with one tap, ask a human with one call, and act on a fail-closed decision. The durable store and the audit log come with it.
Partner plan, $99 a month. Your users never see a Pushary login or bill.