The short version
Weei is a JavaScript SDK and a hosted service that turns a web page into a shared session. Your application loads one script and calls loadWeei(). Participants who open the same site, in the same room, find each other and connect over WebRTC. A hosted service handles signalling, your site's configuration and identity verification.
On top of that session Weei gives your page three things: a way to see and connect with the other participants, shared tools called widgets, and media: camera, microphone and screen sharing. It is not a separate meeting application that your users are sent to. The session lives inside your page, next to the work people are doing.
How it fits together
- Your page imports the hosted loader and calls
loadWeei(). The loader fetches the current release of Weei for your site and applies your site's settings: which widgets are enabled and who sees the control panel. - The client joins your site's session through the hosted service. Participants on the same site and in the same room appear to each other as peers.
- When two participants connect, they open a WebRTC connection between their browsers. Widget data and media are exchanged over these connections.
- Site widgets use the same connections, so exchanging data between participants does not require you to build a messaging backend.
What a session contains
Everything the built-in control panel does is also available to your own code, through three APIs on the client:
- Peers list who is online with their display names, connect and disconnect participants, and report connection events.
connect()returns a promise that rejects with the server's reason, for example when the other participant is in another room. - Rooms expose the current room, the site's scheduled meetings and who is in the room. Participants connect only within the same room.
- Media turn the camera, microphone and screen on and off, and give you each participant's stream to attach to your own
<video>element.
Weei also ships a control panel, notifications and participant video tiles, so a working call needs no interface code. If you would rather build your own, setVisibility(false) removes all of Weei's interface from the page, and notifications arrive through onNotice() instead.
const { loadWeei } = await import('https://weei-core.web.app/loader.min.js');
const weei = await loadWeei();
weei.setVisibility(false); // your page draws the interface
await weei.setUser({ id: 'user-42', displayName: 'Ada' });
weei.peers.subscribe(({ online }) => renderParticipants(online));
weei.peers.onEvent(event => {
if (event.type === 'rejected') showError(event.message);
});
await weei.media.setCamera(true);
document.querySelector('#call').onclick = () => weei.peers.connect(selectedPeerId);Widgets: shared tools in the page
A widget is a tool that every participant sees and shares: chat, a whiteboard, notes, voting, planning poker, a retrospective board, approval and decision cards, reactions, raise hand, shared document preview, live transcription and an AI assistant. Which built-in widgets your site may use is configured for your account.
Several widgets also have an API, so your application can drive them: start a poll, send an approval card, read the results, or react to a raised hand. See built-in widgets for the list.
When the tool you need is specific to your application, you build a site widget: a connector that exchanges messages between participants, and a widget that shows the interface. Both are plain classes in your page's code, added with addWidget(). Every participant's page must add the same widget; participants without it ignore its messages. The tutorial builds a shared counter in a few steps.
Beyond meetings: using participants' browsers
Two widgets use the session for more than conversation.
Recording Demos records and replays demos on your live site and captures issues together with diagnostics, so a report can show what happened instead of describing it. A replay covers the page, so the viewer cannot disturb it while it plays.
Distributed Neural Training trains a neural network across the browsers of a session. One participant, the coordinator, provides the model as a WebAssembly module and the dataset as files. Other participants accept an invitation and train on parts of the dataset, and the coordinator combines their results into a checkpoint after every round, by federated averaging or, if you choose, with momentum or an adaptive step. A model package can add GPU programs to train on WebGPU, and a model can generate its own experience instead of reading a dataset, which supports reinforcement learning.
What it is used for
The solution blueprints describe three starting points: in-product support, with embedded sessions, diagnostics and issue capture; guided onboarding, with peer sessions and shared workflow context; and collaborative AI training across browser participants. The same building blocks also serve planning meetings, retrospectives and approvals with the built-in widgets.
What integration looks like
- Register your site's origin in your Weei account. Local and production origins are registered separately.
- Serve the page over HTTPS. Camera, microphone and screen sharing require it, and the browser asks each participant for permission.
- Load one client per page. The loader selects the current release for your site; you can pin a specific release with
releaseId. - Identify your users with
setUser()and an identity token from your backend. An ID and a name alone are not proof of identity, so without a valid token the user is not authorized.
Whether the control panel appears also depends on your site settings: it can be limited, for example, to signed-in users.
Plan for these limits
- Whatever participants share in a session reaches the other participants' browsers. Decide what belongs in a shared widget and what stays on your servers.
- Widget availability, panel access and which users may use them are set per account and site, not in code.
- Experimental workflows such as distributed training need a small, verifiable first task before you scale them up.
Where to start
Follow the integration guide to load Weei and verify it with two browser tabs. Then read peers, rooms and media to run Weei with your own interface, or build your first site widget for a tool that is specific to your application.