proud-lawyer-39815
12/28/2025, 1:27 AMtall-airline-16756
12/28/2025, 1:27 AMtall-airline-16756
12/28/2025, 1:27 AMtall-airline-16756
12/28/2025, 1:27 AMMaxRetries. After that no further delivery attempts occur.
◦ You can detect exhaustion by checking webhook delivery logs for a final failed attempt marked as "max retries reached" or by seeing no further attempts after the last retry interval (exponential backoff between RetryWaitMin and RetryWaitMax).
◦ Events may also be dropped if they exceed MaxAge (default 30s) or queue MaxDepth (default 200), which effectively ends retries.
• Agent job dispatch
◦ A worker connection timeout of 10 seconds acts as a fail-fast. If the worker never connects within that window the job is considered failed — that indicates the retry/dispatch window was exhausted.
• Client reconnections
◦ Automatic reconnect uses exponential backoff (0s, 2s, 4s, 8s, …) and gives up after 60 seconds. If reconnection attempts stop after ~60s, that means reconnection retries were exhausted.
• Server-side HTTP calls
◦ Server SDK/CLI use hashicorp/go-retryablehttp. Retry exhaustion is when the library reaches its configured max attempts; check the request/response logs or the retryablehttp wrapper logs for a final failure indicating max retries reached.
If you want, tell me:
• Which specific function/tool you’re asking about (webhook, agent dispatch, client reconnect, or server HTTP request), and
• Where you’re looking (LiveKit server logs, SDK logs, or webhook consumer logs).
I’ll give exact log fields/messages and steps to locate them for that component.
Sources: examples/survey | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki | client-sdk-swift | livekit/livekit_composite | DeepWiki | server-sdk-go | livekit/livekit_composite | DeepWikiproud-lawyer-39815
12/28/2025, 1:29 AMtall-airline-16756
12/28/2025, 1:30 AMtenacity, `requests`+`urllib3`/`retryablehttp` wrappers, or webhook handler patterns), or
• Suggest a server-side/logging approach if retries are fully managed by LiveKit and not exposed to the Python process. Sources: examples/survey | livekit/livekit_composite | DeepWiki | server-sdk-ruby | livekit/livekit_composite | DeepWikiproud-lawyer-39815
12/28/2025, 1:30 AMtall-airline-16756
12/28/2025, 1:30 AMfrom livekit.agents import function_tool, RunContext, ToolError
import asyncio
@function_tool()
async def my_tool(self, context: RunContext):
max_retries = 3
for attempt in range(1, max_retries + 1):
try:
# replace with real operation
result = await self._call_external_api()
return result
except Exception as e:
if attempt == max_retries:
# programmatic detection of exhausted retries
await context.session.say("I've tried multiple times but cannot complete the request.")
raise ToolError("Max retries exceeded after 3 attempts") from e
await asyncio.sleep(2 ** (attempt - 1)) # exponential backoff
If you want, I can:
• Customize that snippet for the specific API/library you call (requests, httpx, grpc, etc.), or
• Show how to log/emit metrics or events when retries are exhausted so you can monitor them externally.
Which would you prefer?
Sources: Tool definition and use | LiveKit docs | Agents Framework | livekit/livekit_composite | DeepWiki