The browser client for web calls: methods, options and events of TriedWebClient.
title: Web SDK
description: The browser client for web calls: methods, options and events of TriedWebClient.
order: 2#
@tried/web-sdk connects a browser to a web call. It wraps livekit-client: you create the call on your server with Create web call, pass access_token and livekit_url to the browser, and call startCall(). The package lives in packages/web-sdk of the Tried repo.
The browser joined the room and the microphone is on.
call_ready
none
The agent joined the room.
agent_start_talking
none
The agent's state changed to speaking.
agent_stop_talking
none
The agent stopped speaking.
update
{ transcript: [{ role, content }] }
The live transcript changed. role is agent or user. Each segment updates in place as it streams.
metadata
any
The agent sent a JSON data message (no topic, or topic metadata).
audio
Float32Array
Agent audio samples, only with emitRawAudioSamples.
call_ended
none
The call ended: stopCall(), the room disconnected, or the agent left. Emitted once.
error
unknown
Connection failure, a transcript stream error, or an error thrown by one of your listeners.
The agent's speaking state comes from the lk.agent.state participant attribute, and transcripts from the lk.transcription text stream that the agent worker publishes.