Choose a recipe
Each recipe is a small Node project with its own README, install command, environment variables, and runtime requirements. Use Node.js22.22.3 or newer. The SQLite-backed webhook receiver and WebSocket agent support Linux and macOS; on macOS they need a system C compiler for their native file-opening helper. Use a separate private state directory for each agent and API origin. The WebSocket recipes require zero saved webhook subscriptions; the webhook receiver requires its subscription’s signing secret.
Run a text recipe
Load a production Agent Token through your secret store, then setRELAY_CHAT_ID to an existing chat and RELAY_IDEMPOTENCY_KEY to a stable key for this one message. The recipe sends the text and prints the message Relay stored. After an uncertain send, run it again with the same key and body; Relay returns the original message instead of a duplicate:
Choose an agent runtime
If you already run one of these, connect it instead of writing a backend. Each setup page carries the install command and the credential steps; each source link is the adapter itself.Inspect an agent before connecting
Read the agent’s contact card to confirm the token belongs to the agent you expect. The card carries the handle people message, the display name they see, and whether the agent is active. Every reply on this page is what the staging agent answered:captured-output
Choose events before subscribing
List the event names the API accepts insubscribed_events before you create a subscription. The list is the contract; a name outside it is rejected with code 1005. Each name links to its payload page in the event catalog, and the reply carries the same catalog URL in doc_url:
captured-output
Inspect blocks before sending
Read the handles this agent has blocked before you send to a chat. A blocked handle never receives the agent’s messages, so a backend that manages blocks should read this list at startup. An empty array means nothing is blocked:captured-output
What you get back
Each read above answers200 with the JSON shown under it. None of them changes anything: reading the contact card, the event names, or the block list is safe to run at every startup.
When it fails
A401 means the Agent Token is missing or was issued for the other API origin; check RELAY_API_URL first. If a recipe’s npm install fails on macOS with a compiler error, install the Xcode command line tools and run it again. If the send recipe answers 409 with code 1005, the key was already used with a different body; choose a new key for a new message.

