Ship real-time features with Relay
Open a channel, subscribe from any client and publish your first message in five minutes. Then add presence, history and agents when you need them.
Install
Publish
Subscribe
›_
terminal
1
npm i @relay/client
2
npx relay login
3
npx relay channels create support
Quickstart
Three steps from an empty project to a live channel.
01
Install the SDK
Add the client package to your web, mobile or server project.
02
Open a channel
Create a channel with a name that describes the room or document.
03
Publish and subscribe
Send a message and watch every subscriber receive it.
›_
chat.ts
1
import { Relay } from ‘@relay/client’
2
3
const relay = new Relay({ key: process.env.RELAY_KEY })
4
const room = relay.channel(‘support:4821’)
5
6
room.subscribe(‘message’, (msg) => render(msg))
7
await room.publish(‘message’, { text: ‘Hi there!’ })
SDKs
Official client libraries, all speaking the same protocol.
JavaScript
Browsers, Node.js, Bun and edge runtimes.
React
Hooks for channels, presence and history.
Swift
Native client for iOS and macOS apps.
Kotlin
Native client for Android and the JVM.
Python
Server-side publishing and agent streaming.
Go
High-throughput publishing from your backend.
Guides
Step-by-step walkthroughs from the Relay team.
Stream agent replies
Send tokens and tool calls to every client.
Read guide →
Presence for large rooms
Keep member lists smooth as rooms grow.
Read guide →
Verify and replay webhooks
Check signatures and resend deliveries.
Read guide →
Scope and rotate keys
Give each client exactly the access it needs.
Read guide →
How delivery works
Follow a message across the edge network.
Read guide →
Live comments at scale
Lessons from moving a live product to Relay.
Read guide →
What’s new
Edge presence is generally available
Presence now runs in every edge region, so online status updates reach every client with low latency.
Message history search
Full-text search across channel history with filters for sender, date and metadata.
Relay MCP server
Let coding agents create channels, inspect traffic and roll keys with the new Model Context Protocol server.
Webhooks v2 with retries
Signed webhooks with automatic retries, backoff and a replay console.