Web Push Notifications for Agent Approvals
说明与用途
事件响应代理收到新待处理操作的即时系统通知,降低了错过重要任务的风险。
问题
Incident‑response agents miss critical pending actions when they rely on polling a web tab, causing delays in human review.
结果
Agents receive instant OS notifications for new pending actions, reducing missed approvals and improving incident response speed.
工作流
- 1. Fetch Impri’s VAPID public key via GET /v1/push/vapid-public-key.
- 2. Register a service worker and call pushManager.subscribe() with userVisibleOnly:true and the fetched VAPID key.
- 3. Send the subscription JSON (endpoint and keys) to Impri via POST https://api.impri.dev/v1/push/subscribe with the API key in the Authorization header.
- 4. When an agent creates a pending action via POST /v1/actions, Impri triggers a push to all subscribed browsers for that project.
- 5. The OS displays a native notification immediately; the agent can click to open the action in the inbox.
- 6. To revoke, call DELETE /v1/push/subscribe or log out to invalidate the endpoint.
证据
Wire browser-native web push into Impri so a pending AI agent action pops a real OS notification on your desktop the instant it lands, no Slack workspace or polling tab required.
The browser talks to two things: the browser's own push service (Chrome/FCM, Safari/APNs, etc.) and Impri's /v1/push endpoints.
Only genuinely new pending actions fire a push — action.created events where status="pending".
- 记录日期: 2026-09-21T17:45:20.989Z