do you know if we launch a same agent by the same ...
# ask-ai
b
do you know if we launch a same agent by the same agent_name it could get the same cache or do we have to empty it?
t
Thanks for reaching out, timothe. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I totally understand your curiosity about how LiveKit handles launching the same agent with the same
agent_name
. Here's a little insight to help clarify things! The system actually uses a cached dispatcher to boost performance, which is pretty neat. This cache is refreshed automatically in two key moments: • After a time-to-live (TTL) of 1 minute passes. • When an
AgentRegistered
update comes in, like when new agent workers register. So, the great news is you don’t have to worry about manually clearing the cache when launching the same agent by name. LiveKit takes care of refreshing it for you, making the process smooth and hassle-free. Sources: pkg/agent/client.go