Provider subscriptions bind an external resource to a Relay recipient. When an event fires — an issue opened, a comment posted — Relayfile writes it to the mounted tree and Relay delivers it as a message that wakes the recipient.
agent-relay integration subscribe github \
--to @watcher \
--resource AgentWorkforce/software-garden \
--events issues,issue_commentThe recipient is an agent (@watcher) or a channel (#triage). The agent does not need to exist yet; --spawn creates it.
What the agent sees
Each event is a message from the provider identity (github) with the event type and the Relayfile path holding the payload:
Relay message from github: Github issue_comment.created
Relayfile path: /github/repos/AgentWorkforce/software-garden/issues/531/comments/5744794683/meta.json
The mounted file holds the full payload — the same tree as Relayfile integrations. An in-channel reply posts back to the issue or thread when the provider supports writeback.
Events that arrive while the node is disconnected queue durably and replay on reconnect, so a subscription survives broker restarts. See Delivery.
Spawning a recipient
--spawn <cli> launches a new agent and confirms it is live before subscribing:
agent-relay integration subscribe github \
--resource AgentWorkforce/software-garden \
--events issues,issue_comment \
--spawn claude --task "Triage new issue comments and reply with a summary."Managing subscriptions
agent-relay integration subscribe --list # active bindings
agent-relay integration unsubscribe github --resource AgentWorkforce/software-gardenUnsubscribing removes the binding and its inbound webhook; agents and channels are untouched.