releases.shpreview
ElevenLabs/Agents SDK (TypeScript)

Agents SDK (TypeScript)

Mon
Wed
Fri
JunJulAugSepOctNovDecJanFebMarAprMay
Less
More
Releases120Avg37/moVersions@elevenlabs/client@1.7.1 to @elevenlabs/types@0.14.0
Patch Changes
  • 0f7e2e5: Style emotion/audio tags in voice transcripts when strip_audio_tags is 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_text as 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 preferred language_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 HTMLAudioElement autoplay (including elements fed by MediaStreamDestination) when the underlying AudioContext wasn't started synchronously inside a user gesture, and additionally needs the audio element to have an explicit play() call against a non-empty playback graph. The web setup chain awaits getUserMedia, the connection handshake, and the audio worklet load before MediaDeviceOutput would have created its AudioContext, 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/click listeners on document. The first user interaction creates and unlocks an AudioContext (silent BufferSource.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 and Conversation.startSession, which would otherwise consume the gesture before any session code runs.
    • After the worklet is wired up, MediaDeviceOutput on iOS posts ~100ms of silence to the worklet and explicitly calls audioElement.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.

Minor Changes
  • 796ade1: Replace DOM Event/CloseEvent constructors in DisconnectionDetails with a platform-agnostic DisconnectionContext type. The context property on disconnection details is now { type: string; reason?: string; code?: number } instead of a DOM event object. This fixes runtime failures on React Native where Event and CloseEvent constructors 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 eventId with 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 same event_id.
Minor Changes
  • 1216ded: Add full tool result payload support to onAgentToolResponse.

    The onAgentToolResponse callback now also receives agent_tool_response_full_payload server events, delivering the raw full_tool_result string (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence of full_tool_result on the payload. To receive full payloads, enable the agent_tool_response_full_payload client 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-level Conversation.startSession in @elevenlabs/client.

Minor Changes
  • 1216ded: Add full tool result payload support to onAgentToolResponse.

    The onAgentToolResponse callback now also receives agent_tool_response_full_payload server events, delivering the raw full_tool_result string (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence of full_tool_result on the payload. To receive full payloads, enable the agent_tool_response_full_payload client 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-level Conversation.startSession in @elevenlabs/client.

Patch Changes
  • Updated dependencies [1216ded]
    • @elevenlabs/client@1.7.0
Minor Changes
  • 1216ded: Add full tool result payload support to onAgentToolResponse.

    The onAgentToolResponse callback now also receives agent_tool_response_full_payload server events, delivering the raw full_tool_result string (capped at 64 KB) alongside the existing summary events. Consumers can distinguish between the two by checking for the presence of full_tool_result on the payload. To receive full payloads, enable the agent_tool_response_full_payload client 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-level Conversation.startSession in @elevenlabs/client.

Patch Changes
  • Updated dependencies [1216ded]
    • @elevenlabs/client@1.7.0
    • @elevenlabs/react@1.6.0
Last Checked
5h ago
Latest
@elevenlabs/convai-widget-embed@0.12.9
Tracking since Dec 10, 2025