Async tools and filler phrases introduced
livekit-agents@1.6.0
Introducing Asynchronous Tools
When a long-running tool is in progress, the user will be met with silence until it completes. Asynchronous tools can hand control back to the LLM before it finishes, streaming updates into the conversation as it progresses.
class TravelAgent(Agent):
@llm.function_tool(flags=llm.ToolFlag.CANCELLABLE, on_duplicate="confirm")
async def book_flight(self, ctx: RunContext, origin: str, destination: str, date: str) -> str:
"""Book a flight."""
# First update is delivered immediately and releases control back to the LLM,
# so the agent can say e.g. "Sure, searching flights to Tokyo — this'll take a minute."
await ctx.update(
f"Searching flights from {origin} to {destination} on {date}. "
"This will take a couple of minutes."
)
await asyncio.sleep(30) # simulate long-running work
# Later updates are coalesced into a deferred reply, delivered when the agent
# is idle: "Good news — best price is $289 on Delta, confirming now."
await ctx.update("Found 3 options. Best price $289 on Delta. Confirming now.")
await asyncio.sleep(40) # simulate more long-running work
# The final return is also delivered when the agent is idle.
return f"Booked! Confirmation FL-{random.randint(100000, 999999)}."
Filler phrases
Use filler words to break long silences via ctx.with_filler(). You can set delay to the amount of quiet seconds per interval for when the filler words are played. You can also rotate between phrases, set interval to configure the cooldown between filler fires.
followups = [
"Almost there, just confirming.",
"Still working on it, won't be long.",
"Hang tight — almost done.",
]
async with ctx.with_filler(
lambda step: followups[step], delay=5, interval=10, max_steps=len(followups)
):
await asyncio.sleep(40) # simulate a long API call
Read more about async tools in our docs.
Complete Changelog
- test: categorize tests and select via
pytest --unit/--plugin openai/ … flags by @Bobronium in https://github.com/livekit/agents/pull/5945 - hamming plugin: add customer_metadata, external_links, and session_mode fields by @sumanyu in https://github.com/livekit/agents/pull/5263
- fix(job): log unhandled exceptions in fire-and-forget tasks by @theomonnom in https://github.com/livekit/agents/pull/5961
- ci(deploy-examples): drop manifest publishing job by @theomonnom in https://github.com/livekit/agents/pull/5963
- ci(deploy-examples): deploy from the dispatched branch instead of hardcoded main by @theomonnom in https://github.com/livekit/agents/pull/5964
- feat(voice): flush audio and text output per FlushSentinel by @longcw in https://github.com/livekit/agents/pull/5956
- add ctx.with_filler() for acoustic fillers during long tools by @longcw in https://github.com/livekit/agents/pull/5885
- first-class async tools via ctx.update() by @longcw in https://github.com/livekit/agents/pull/5841
- Deploy examples against the deployed git ref instead of PyPI by @theomonnom in https://github.com/livekit/agents/pull/5969
- feat(job): expose single_peer_connection in JobContext.connect by @renal128 in https://github.com/livekit/agents/pull/5966
- docs: add filler_agent.py to examples README table of contents by @detail-app[bot] in https://github.com/livekit/agents/pull/5967
- docs: update test commands to use pytest category flags by @detail-app[bot] in https://github.com/livekit/agents/pull/5958
- Enable git-lfs in example images so git-installed deps get real LFS binaries by @theomonnom in https://github.com/livekit/agents/pull/5970
- fix(ipc): rate-limit and contextualize high-memory warnings by @Bobronium in https://github.com/livekit/agents/pull/5962
- (examples deploy): fix lfs by @tinalenguyen in https://github.com/livekit/agents/pull/5973
- (openai responses): surface phase field by @tinalenguyen in https://github.com/livekit/agents/pull/5975
- fix(openai): skip empty messages in realtime chat updates by @nightcityblade in https://github.com/livekit/agents/pull/5952
- fix quick reconnect participant keyerror by @tinalenguyen in https://github.com/livekit/agents/pull/5979
- livekit-agents@1.5.18 by @github-actions[bot] in https://github.com/livekit/agents/pull/5981
- fix(google): require compatible google-genai version by @nightcityblade in https://github.com/livekit/agents/pull/5988
- Hotel Receptionist example by @theomonnom in https://github.com/livekit/agents/pull/5983
- fix(openai): handle string realtime status details by @he-yufeng in https://github.com/livekit/agents/pull/5994
- fix(google): preserve request timeout with http options by @he-yufeng in https://github.com/livekit/agents/pull/5976
- fix: resolve shutdown futures when IPC reader stops by @longcw in https://github.com/livekit/agents/pull/6003
- livekit-agents@1.5.19.rc1 by @github-actions[bot] in https://github.com/livekit/agents/pull/5986
- simulation glue code by @theomonnom in https://github.com/livekit/agents/pull/5688
- feat(cli): python -m livekit.agents start|console <entrypoint> discovers the AgentServer by @theomonnom in https://github.com/livekit/agents/pull/6024
- tests: speed up unit tests by @Bobronium in https://github.com/livekit/agents/pull/5980
- feat(bargein): add default threshold support and drop http transport by @chenghao-mou in https://github.com/livekit/agents/pull/5946
- feat(anam): forward output video dimensions via SessionOptions by @Smidge in https://github.com/livekit/agents/pull/5935
- ci: speedup type checking by @Bobronium in https://github.com/livekit/agents/pull/5982
- simulation: shut the job down when the simulator disconnects by @theomonnom in https://github.com/livekit/agents/pull/6037
- fix(sarvam): emit speech timing for STT metrics by @dhruvladia-sarvam in https://github.com/livekit/agents/pull/5995
- fix(elevenlabs): end server vad turns by @he-yufeng in https://github.com/livekit/agents/pull/5872
- (inference tts): add inworld delivery_mode param by @tinalenguyen in https://github.com/livekit/agents/pull/6048
- fix(aws): recover Nova Sonic system instability errors by @nightcityblade in https://github.com/livekit/agents/pull/6042
- simulation: --simulation flag disables the worker load limit; text sims skip STT/TTS by @theomonnom in https://github.com/livekit/agents/pull/6036
- fix(voice): route and drain AsyncToolset executors correctly on handoff by @toubatbrian in https://github.com/livekit/agents/pull/6049
- fix(deepgram): use stored language when validating model in update_options by @adityajha2005 in https://github.com/livekit/agents/pull/6041
- simulation: read the dispatch from a simulator participant attribute by @theomonnom in https://github.com/livekit/agents/pull/6053
- remove the next-release changeset machinery by @theomonnom in https://github.com/livekit/agents/pull/6054
- fix(bargein): error when no interruption threshold is known by @chenghao-mou in https://github.com/livekit/agents/pull/6034
- feat(assemblyai): add agent_context, previous_context_n_turns, and u3-rt-pro-beta-1 streaming options by @dlange-aai in https://github.com/livekit/agents/pull/6017
- simulation: don't start the worker HTTP server by @theomonnom in https://github.com/livekit/agents/pull/6055
- simulation: don't cache a pre-connect simulation_context miss by @theomonnom in https://github.com/livekit/agents/pull/6061
- (sarvam stt): fix end of speech timing by @tinalenguyen in https://github.com/livekit/agents/pull/6052
- feat(elevenlabs): add no_verbatim option to STT by @jaime-wiselook in https://github.com/livekit/agents/pull/6032
- fix(google): correct pitch parameter type from int to float in TTS by @adityajha2005 in https://github.com/livekit/agents/pull/6058
- (deepgram stt): add keyterm to batch config by @tinalenguyen in https://github.com/livekit/agents/pull/6062
- Elevenlabs stream api missing flags by @devb-enp in https://github.com/livekit/agents/pull/6031
- restore dev mode log format by @theomonnom in https://github.com/livekit/agents/pull/6065
- fix(neuphonic): use configured encoding and lang_code in TTS requests by @adityajha2005 in https://github.com/livekit/agents/pull/6064
- livekit-agents@1.6.0 by @github-actions[bot] in https://github.com/livekit/agents/pull/6066
New Contributors
- @Bobronium made their first contribution in https://github.com/livekit/agents/pull/5945
- @sumanyu made their first contribution in https://github.com/livekit/agents/pull/5263
- @renal128 made their first contribution in https://github.com/livekit/agents/pull/5966
- @Smidge made their first contribution in https://github.com/livekit/agents/pull/5935
- @adityajha2005 made their first contribution in https://github.com/livekit/agents/pull/6041
- @jaime-wiselook made their first contribution in https://github.com/livekit/agents/pull/6032
Full Changelog: https://github.com/livekit/agents/compare/livekit-agents@1.5.17...livekit-agents@1.6.0
Fetched June 12, 2026


