refined-hydrogen-81988
12/03/2025, 9:28 PMmin_endpointing_delay during the calltall-airline-16756
12/03/2025, 9:28 PMtall-airline-16756
12/03/2025, 9:28 PMmin_endpointing_delay during a call — yes. You can update turn-detection/endpointing settings at runtime by calling update_options() on the AgentActivity instance; min_endpointing_delay (and max_endpointing_delay) are runtime-configurable through that API.
Do you want a short code example for your language (Python/JS) or details about safe value ranges to use?
Sources: Agents (Python) | livekit/livekit_composite | DeepWikirefined-hydrogen-81988
12/03/2025, 9:29 PMtall-airline-16756
12/03/2025, 9:30 PMmin_endpointing_delay during an active call. Below is a concise example showing how to call update_options() on the AgentActivity instance to change endpointing at runtime.
from livekit.agents import AgentSession, JobContext
from livekit.plugins import silero, deepgram, openai
import asyncio
class MyAgent:
async def on_turn(self, turn):
# agent turn handling...
pass
async def entrypoint(ctx: JobContext):
stt = deepgram.STT()
llm = openai.LLM()
tts = openai.TTS()
vad = silero.VAD()
# Start session with initial endpointing config
session = AgentSession(
stt=stt,
llm=llm,
tts=tts,
vad=vad,
turn_detection="vad",
min_endpointing_delay=0.5,
max_endpointing_delay=6.0,
)
await session.start(ctx.room, agent=MyAgent())
# Example: update min_endpointing_delay during the call
# This can be triggered by any runtime condition (voice command, UI button, etc.)
new_min_delay = 1.0
session.agent.activity.update_options(min_endpointing_delay=new_min_delay)
# You can update multiple options at once
session.agent.activity.update_options(
min_endpointing_delay=0.3,
max_endpointing_delay=5.0,
turn_detection="vad"
)
# If running standalone for testing:
# asyncio.run(entrypoint(your_job_context))
If you want, I can:
• Provide a shorter snippet showing only the update_options() call,
• Show an example that updates the delay in response to a user event (e.g., noise detection or a button press). Which would you prefer? Sources: Agents (Python) | livekit/livekit_composite | DeepWiki