Agents SDK (TypeScript)
Patch Changes
- d1cadcd: Make microphone input chunk duration configurable via
inputChunkDurationMs(default 25ms). - Updated dependencies [d1cadcd]
- @elevenlabs/client@1.9.0
Patch Changes
- 0f7e2e5: Style emotion/audio tags in voice transcripts when
strip_audio_tagsis off. Voice agent messages render plain text with tag pills instead of markdown; text chat still uses markdown. - cf75e07: Treat null top-level
terms_html/terms_textas a kill switch for the T&C modal. Previously, agents with the dashboard "Enable terms & conditions" toggle off but stale per-language preset terms would still show the modal because the widget always preferredlanguage_presets[lang].terms_html. Per-language presets are now only consulted as overrides when the feature is enabled at top level.
Patch Changes
-
a9dcb56: Fix iOS Safari dropping the first message's audio on WebSocket voice sessions.
iOS Safari blocks
HTMLAudioElementautoplay (including elements fed byMediaStreamDestination) when the underlyingAudioContextwasn't started synchronously inside a user gesture, and additionally needs the audio element to have an explicitplay()call against a non-empty playback graph. The web setup chain awaitsgetUserMedia, the connection handshake, and the audio worklet load beforeMediaDeviceOutputwould have created itsAudioContext, so by then the gesture is already consumed. The first agent message would arrive into a suspended context and never play; subsequent messages worked because the mic capture had reactivated iOS's audio session by then.The fix has two parts:
- On import, the web entry point installs capture-phase
touchstart/touchend/clicklisteners ondocument. The first user interaction creates and unlocks anAudioContext(silentBufferSource.start(0)+resume()) and stashes it for the next session. The stash auto-discards after 30s if no session starts. Capture-phase is needed because the convai widget awaits a terms-modal promise between the user's tap andConversation.startSession, which would otherwise consume the gesture before any session code runs. - After the worklet is wired up,
MediaDeviceOutputon iOS posts ~100ms of silence to the worklet and explicitly callsaudioElement.play()to prime the MediaStream → HTMLAudioElement pipeline.
Non-iOS is unchanged: it still lazily creates the context with the requested sample-rate constraint and does not register the document listeners.
WebRTC voice sessions are unaffected by this change.
- On import, the web entry point installs capture-phase
Minor Changes
- 796ade1: Replace DOM
Event/CloseEventconstructors inDisconnectionDetailswith a platform-agnosticDisconnectionContexttype. Thecontextproperty on disconnection details is now{ type: string; reason?: string; code?: number }instead of a DOM event object. This fixes runtime failures on React Native whereEventandCloseEventconstructors are not available.
Patch Changes
- ae50508: Pin livekit-client to 2.16.1 and force dual peer connection (v0) path to fix WebRTC connection failures with newer livekit-client versions whose join protocol is incompatible with the ElevenLabs LiveKit server.
- Updated dependencies [fa64593]
- @elevenlabs/types@0.14.0
Minor Changes
- fa64593: Remove manually maintained types (
Role,Mode,Status,Callbacks,CALLBACK_KEYS,DisconnectionDetails,MessagePayload,AudioAlignmentEvent) from@elevenlabs/types. These types now live in@elevenlabs/client— import them from there instead. The types package now contains only generated code.
Patch Changes
- 2cb042f: Fix voice widget transcripts so streamed agent response parts are ignored for voice sessions and late user transcripts are inserted before their matching agent response.
Patch Changes
- 0b36f6b: Break ties on shared
eventIdwith user-before-agent in transcript ordering. Fixes voice/DTMF turns where the agent message could render before the user transcript when both events of the turn carry the sameevent_id.
Minor Changes
-
1216ded: Add full tool result payload support to
onAgentToolResponse.The
onAgentToolResponsecallback now also receivesagent_tool_response_full_payloadserver events, delivering the rawfull_tool_resultstring (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence offull_tool_resulton the payload. To receive full payloads, enable theagent_tool_response_full_payloadclient event in the agent's configuration UI.<ConversationProvider agentId="…" onAgentToolResponse={payload => { if ("full_tool_result" in payload) { if (payload.truncated) { console.warn("full payload truncated to 64 KB"); } console.log(payload.tool_name, payload.full_tool_result); } else { console.log(payload.tool_call_id, payload.is_error); } }} > … </ConversationProvider>The same callback is available on
useConversation,startSession, and the lower-levelConversation.startSessionin@elevenlabs/client.
Minor Changes
-
1216ded: Add full tool result payload support to
onAgentToolResponse.The
onAgentToolResponsecallback now also receivesagent_tool_response_full_payloadserver events, delivering the rawfull_tool_resultstring (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence offull_tool_resulton the payload. To receive full payloads, enable theagent_tool_response_full_payloadclient event in the agent's configuration UI.<ConversationProvider agentId="…" onAgentToolResponse={payload => { if ("full_tool_result" in payload) { if (payload.truncated) { console.warn("full payload truncated to 64 KB"); } console.log(payload.tool_name, payload.full_tool_result); } else { console.log(payload.tool_call_id, payload.is_error); } }} > … </ConversationProvider>The same callback is available on
useConversation,startSession, and the lower-levelConversation.startSessionin@elevenlabs/client.
Patch Changes
- Updated dependencies [1216ded]
- @elevenlabs/client@1.7.0
Patch Changes
- Updated dependencies [1216ded]
- @elevenlabs/client@1.7.0
Minor Changes
-
1216ded: Add full tool result payload support to
onAgentToolResponse.The
onAgentToolResponsecallback now also receivesagent_tool_response_full_payloadserver events, delivering the rawfull_tool_resultstring (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence offull_tool_resulton the payload. To receive full payloads, enable theagent_tool_response_full_payloadclient event in the agent's configuration UI.<ConversationProvider agentId="…" onAgentToolResponse={payload => { if ("full_tool_result" in payload) { if (payload.truncated) { console.warn("full payload truncated to 64 KB"); } console.log(payload.tool_name, payload.full_tool_result); } else { console.log(payload.tool_call_id, payload.is_error); } }} > … </ConversationProvider>The same callback is available on
useConversation,startSession, and the lower-levelConversation.startSessionin@elevenlabs/client.
Patch Changes
- Updated dependencies [1216ded]
- @elevenlabs/client@1.7.0
- @elevenlabs/react@1.6.0
