What happens if request_fnc of all agents rejects ...
# ask-ai
d
What happens if request_fnc of all agents rejects a request? Is the request retried after some time or dropped?
t
Thanks for reaching out, akshat. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're asking what happens if every agent's
request_fnc
rejects a job. If all available agents reject the request, the request is dropped and is not retried. Rejection causes the framework to try the next available agent, but if every agent rejects it there are no further retries or automatic backoff. Sources: Agent server options | LiveKit docs
d
How to retry these requests in that case?
t
You're asking how to retry requests when every agent's
request_fnc
rejects them. By default those requests are dropped and not retried. You can implement retries yourself — two common patterns: Option 1 — Requeue at the application level (recommended) • When a request is rejected by all agents, have your orchestrator re-enqueue the job into an external queue (Redis, SQS, RabbitMQ). • Apply retry/backoff policies on the queue (fixed delay or exponential backoff) and a retry limit to avoid infinite retries. • Consumer flow: pull job from queue → attempt dispatch to LiveKit agents → on full rejection requeue with delay. Option 2 — Handle inside
request_fnc
or
on_request
• Instead of rejecting immediately, have
request_fnc
defer/hold and retry acceptance a few times (with short sleeps) before finally rejecting. • Or, on rejection, push the job into an internal retry mechanism (in-memory scheduler or DB) for later re-dispatch. Practical tips • Add metadata to the job (retry_count, next_retry_at) so you can limit retries and track progress. • Use exponential backoff and a max attempts value to prevent overload. • Log rejection reasons so you can decide whether to retry (transient capacity vs. permanently unsupported job). Which approach fits you best — external queue orchestration or in-agent retry logic? Tell me your current setup (language, orchestrator/queue if any) and I’ll give a concise implementation example. Sources: Agent server options | LiveKit docs | Server-side | livekit/livekit_composite | DeepWiki | server-sdk-go | livekit/livekit_composite | DeepWiki | examples/survey | livekit/livekit_composite | DeepWiki | Agents Framework | livekit/livekit_composite | DeepWiki