Repository navigation
@livekit/agents@1.9.4
Patch Changes
-
Watch an async tool's deferred reply as a
Task, sosession.run()settles after the reply instead of hanging onhandle.addDoneCallback is not a function. - #2781 (@longcw) -
Record final completion when an async tool returns null or undefined after reporting progress without requesting a follow-up reply. Cancel pending replies during shutdown so foreground work cannot leave the run waiting after close. - #2492 (@paulheinrichs-jb)
-
Add
tokenize.blingfire.SentenceTokenizer(backed by@livekit/blingfire) and make it the default sentence tokenizer, matching the Python agents. The framework TTS adapters now also retain formatting like Python. - #2709 (@davidzhao) -
Send session keyterms to the Speechmatics Linden inference model. - #2740 (@rosetta-livekit-bot)
-
Add Cartesia sonic-3.6 to the model lists and remove the sunset sonic, sonic-2 and sonic-turbo ids. - #2743 (@cartesia-amarat)
-
Clarify that realtime providers append chat history items when their preceding item is unknown. - #2767 (@rosetta-livekit-bot)
-
Correct the inference Deepgram
mip_opt_outdocs: it is always true for LiveKit Inference, and the passed value is ignored. - #2742 (@shawnfeldman) -
Treat an
awayuser as inactive inAgentActivity.waitForInactive, souserAwayTimeoutno longer blocks the activity's idle wait. A user who went quiet afteruserAwayTimeoutkept the wait loop spinning ondelay(0), and the deferred result of a non-blocking tool (ToolExecutor.deliverReply, which awaitswaitForIdle()) was never spoken. Only aspeakinguser holds the activity busy now, which matches the Pythonwait_for_idle. - #2569 (@nhodges) -
Reject idle waits with
AbortErrorwhen session shutdown starts or their activity closes so pending foreground callbacks cannot run during shutdown or handoff. - #2822 (@chenghao-mou) -
Add
language_detection,inactivity_timeoutandpromptto the inferenceAssemblyAIOptionstype, matching the Python SDK. - #2779 (@adrian-cowham) -
Add MCP toolset refresh and persistent filtering, support HTTP header updates, and preserve intentional resolver errors. Require finite connection and request timeouts in milliseconds. Keep realtime tools in sync when discovery or filters change during an agent greeting. Retain refreshes queued during discovery or publication, and allow shutdown while SSE startup is stalled. - #2492 (@paulheinrichs-jb)
-
Preserve MCP tool metadata as
FunctionTool.metaso applications can inspect it during tool filtering and execution. Omit empty MCP metadata and keep application metadata out of provider tool schemas. - #2492 (@paulheinrichs-jb) -
feat(mcp): add MCP (Model Context Protocol) server integration - #2492 (@paulheinrichs-jb)
Tools exposed by an MCP server are fetched by
MCPToolsetduring activation.
Both stdio and HTTP transports (SSE + streamable HTTP) are supported.const tools = [ new llm.MCPToolset({ id: 'mcp', mcpServer: new llm.MCPServerHTTP({ url: 'https://docs.livekit.io/mcp/' }), }), ];
HTTP transports require TLS by default. Set
allowInsecureHttp: trueonly when connecting to a
trusted local development server.@modelcontextprotocol/client(2.3.1 or newer, Node.js 20+) is an optional peer dependency:
install it withpnpm add @modelcontextprotocol/clientto use this feature.Protocol auto-negotiation supports the stateless MCP 2026-07-28 protocol and older servers.
Stateless HTTP servers can return JSON responses without sessions, notifications, or persistent
connections. SettransportType: 'streamable_http'explicitly for endpoints that do not end in/mcp. -
Remove the abort listener
waitForOrAbortadds once its race settles, sowaitForIdleandctx.fillerno longer pile listeners on the activity's close signal. - #2727 (@Apeksha9389) -
Add
inference.TurnDetector({ localFallback: false })to disable cloud-to-local fallback, matching Python. Prediction timeouts keep cloud detection active. A terminal cloud failure disables detection for the stream and lets endpointing commit turns. Fallback remains enabled by default. - #2726 (@chenghao-mou) -
Allow pooled connection attempts to receive an abort signal. - #2837 (@rosetta-livekit-bot)
-
Cancel pending TTS and transcript stream reads when speech is interrupted so cleanup does not delay the next reply. - #2784 (@devp19)
-
Answer every completed tool call, including interrupted, silent, and invalid calls, and keep realtime providers quiet when supported. A tool can return a handoff inside a list, and a handoff batched with another tool now applies even when that tool finishes last. - #2289 (@rosetta-livekit-bot)
-
Fix a crash when a session recording upload fails while reading the response, such as on a socket reset. Also retry the same DNS and connection errors as the Python SDK, such as
EPIPEandEAI_FAIL. - #2350 (@rosetta-livekit-bot) -
Set the session report duration when audio recording is disabled. - #2829 (@rosetta-livekit-bot)
-
Text simulations no longer warn about a missing VAD for the turn detector or adaptive interruption detection; both are disabled directly since there is no audio. - #2746 (@u9g)
-
Add
silenttoctx.update(). A silent update is recorded for the model with no reply. The reply to an update still usestoolChoice: 'none', and the reply to an async tool's final result now uses the model's default tool choice instead of'none'. - #2783 (@longcw) -
Stop
waitForIdlefrom spinning ondelay(0)while the agent or the user is speaking. It now waits for the current speech to end or for the user state to change, which also cuts the calls that leave abort listeners on the activity's close signal. - #2782 (@longcw)