Skip to content

@livekit/agents@1.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Jul 19:25
· 242 commits to main since this release
8214240

Minor Changes

  • Require OpenTelemetry JS SDK 2.x and experimental packages 0.2xx. Migrate resources to - #2105 (@davidzhao)
    resourceFromAttributes, configure processors with spanProcessors, and pass
    registerSpanProcessor when using a custom tracer provider.

Patch Changes

  • Include agent identity in telemetry resource attributes: stamp lk.agent_name when the job carries an agent name, and honor OTEL_RESOURCE_ATTRIBUTES (via the standard env detector) so environment-provided resource attributes reach cloud tracing. - #2110 (@jmcclanahan)

  • Add agent-simulation support: resolve the scenario dispatch from the job's lk.simulator.dispatch attribute into a SimulationContext, end the job when the simulator participant leaves, run the new defineAgent onSimulationEnd callback on finalizeSimulation, and disable STT/TTS/VAD and audio I/O under text simulations. - #2075 (@u9g)

  • Expose realtime provider response IDs on assistant message metrics as providerRequestIds. - #2084 (@rosetta-livekit-bot)

  • Fix a deadlock where a recorder-wrapped audio output could leave waitForPlayout stranded when - #2114 (@toubatbrian)
    an interrupt arrived before the recorder had registered its segment. RecorderAudioOutput now
    registers its own segment before forwarding a frame downstream, and attributes each playback
    finish to the segment it belongs to instead of relying on a global counter.

    A recorded segment is also timestamped when it opens rather than when the wrapped output accepts
    its first frame, so a finish that lands while that frame is parked no longer clamps the segment's
    playback position to zero and drop the audio the sink reported as played. And a segment whose
    downstream capture throws now releases the capture latch on both the recorder and the wrapped
    output, so a caller that retries after a transient rejection is no longer rejected forever with
    recorder capture has no active segment.

    A finish reported by the wrapped output settles its segment whether or not the recorder has been
    flushed. The AudioOutput contract lets a sink report a finish as soon as its playout ends, and
    TranscriptionSynchronizer does exactly that when it reconciles a dropped segment from
    waitForPlayout, so requiring a flush first would strand the caller.

    waitForPlayout no longer depends on a flush either. A segment the wrapped output never counted
    is settled once that output reports its own playout complete, since at that point no finish can
    ever arrive for it. Waiting for a flush instead only worked because performAudioForwarding — the
    one thing that captures frames — happens to flush in a finally; a caller that waited without
    flushing hung forever.

    Behavior change: waitForPlayout now blocks while a frame is still in flight inside the wrapped
    output. Previously it could return immediately with a fabricated
    { playbackPosition: 0, interrupted: false }, reporting a turn as completed while its audio had
    not been handed to the sink yet. Callers that relied on the early return will now wait for the
    real playback result.

  • Add Fish Audio model and option types to inference TTS. - #2102 (@rosetta-livekit-bot)

  • Support adaptive interruption gating for realtime models without server-side turn detection. - #2099 (@rosetta-livekit-bot)

  • Add inference.AvatarSession for provisioning avatar sessions through the LiveKit Inference gateway. - #2101 (@rosetta-livekit-bot)

  • Use required tool choice for message judge LLM calls. - #2128 (@rosetta-livekit-bot)

  • Allow failed inference avatar provisioning to be retried safely without duplicate provider sessions or cleanup callbacks, fall back to the connected room SID when dispatch metadata omits it, refresh gateway authentication across retries, and preserve the avatar audio output in RoomIO so synchronized transcription and avatar playback share the same output. - #2103 (@toubatbrian)

  • Do not drop realtime replies when the pre-reply chat context update times out. - #2083 (@rosetta-livekit-bot)

  • Fix updateAgent handoffs so run() captures onEnter output without waiting indefinitely on long-lived onEnter flows. - #2098 (@rosetta-livekit-bot)