Push notifications developer guide#

This guide explains how Remote registers a device, creates a notification, sends it through Web Push, suppresses unnecessary alerts, and opens the correct chat when the notification is selected.

Complete flow#

flowchart LR Browser["Browser subscribes"] --> Remote["Remote stores device"] Event["Agent event"] --> Remote Remote --> Relay["Push provider"] Relay --> Worker["Service worker"] Worker --> Alert["Notification"] Alert --> Chat["Open chat"]

There are two paths into the same system:

  • Setup: the browser creates a subscription and Remote stores it for the signed-in user.
  • Delivery: a relevant agent event becomes an encrypted push message for that user's devices.

Documents#

DocumentExplains
Components and stateThe main pieces and where state lives
Device subscription lifecycleTurning notifications on and off
Event-to-delivery pipelineTurning an agent event into Web Push
Presence, display, and click routingAvoiding redundant alerts and opening chats
Security and failure modelOutbound-request protection and known gaps

Notification types#

EventNotification
Agent calls AskUserQuestionThe agent needs an answer
Interactive turn completesTurn finished
Interactive run failsRun failed
Scheduled run completes or failsScheduled task result
User selects Send a testTest notification
remote.futrx documentation