github livekit/agents livekit-agents@1.4.0

4 hours ago

Python 3.14 Support & Python 3.9 Dropped

This release adds Python 3.14 support and drops Python 3.9. The minimum supported version is now Python 3.10.

Tool Improvements

Tools and toolsets now have stable unique IDs, making it possible to reference and filter tools programmatically. Changes to agent configuration (instructions, tools) are now tracked in conversation history via AgentConfigUpdate.

LLMStream.collect() API

A new LLMStream.collect() API makes it significantly easier to use LLMs outside of AgentSession. You can now call an LLM, collect the full response, and execute tool calls with a straightforward API — useful for background tasks, pre-processing, or any workflow where you need LLM capabilities without the full voice agent pipeline.

from livekit.agents import llm

response = await my_llm.chat(chat_ctx=ctx, tools=tools).collect()

for tc in response.tool_calls:
    result = await llm.execute_function_call(tc, tool_ctx)
    ctx.insert(result.fnc_call)
    if result.fnc_call_out:
        ctx.insert(result.fnc_call_out)

Manual Turn Detection for Realtime Models

Realtime models now support commit_user_turn, enabling turn_detection="manual" mode. This gives you full control over when user turns are committed — useful for push-to-talk interfaces or scenarios where automatic VAD-based turn detection isn't ideal.

@ctx.room.local_participant.register_rpc_method("end_turn")
async def end_turn(data: rtc.RpcInvocationData):
    session.input.set_audio_enabled(False)
    session.commit_user_turn(
        transcript_timeout=10.0,
        stt_flush_duration=2.0,
    )

Job Migration on Reconnection

When the agent server temporarily loses connection and reconnects, active jobs are now automatically migrated rather than being dropped. This significantly improves reliability during transient network issues.

False Interruption Fix

Fixed a bug where late end-of-speech events could trigger duplicate false interruption timers, causing the agent to incorrectly stop speaking. The agent now properly deduplicates these events and tracks STT completion state more reliably.

New Providers & Plugins

  • xAI Responses LLM — Use xAI's Responses API via xai.responses.LLM()
  • Azure OpenAI Responses — Azure-hosted Responses API via azure.responses.LLM(), with support for deployments and Azure auth
  • Camb.ai TTS — New TTS plugin powered by the MARS model family (mars-flash, mars-pro, mars-instruct), with voice selection, language control, and style instructions
  • Avatario Avatar — Virtual avatar plugin with session management and API client

What's Changed

New Contributors

Full Changelog: https://github.com/livekit/agents/compare/livekit-agents@1.3.12...livekit-agents@1.4.0

Don't miss a new agents release

NewReleases is sending notifications on new releases.