Are there any consistency guarantees with regards ...
# agents
f
Are there any consistency guarantees with regards to agent dispatches. What I think I'm seeing is: • room create via lk api with agent dispatch • agent joins the room as expected • all participants leave the room • I manually delete the room + agent dispatch using the room api (to be extra persuasive 😉 ) • I recreate the room w/ the same name and agent dispatch • new agent seems to never join!!!
r
@full-insurance-11657 it is recommended to use a unique room name for each dispatch. When you delete a room it can take time to propagate the state and the room ID may linger even though the session was deleted. In that case when you create a room with the same name it is actually binding back to the original room. I am not sure of a guaranteed contract for when that room is really gone from cache.
f
Hrmm i'd really like to keep the same room name (it's for a customer where room names are akin to discord channel ids). How about this, are agent dispatches idempotent? If I create two dispatches with the same agent name will there be two agents in the room? If not, are agent dispatches consistent, if I first list dispatches and then create the dispatch (instead of on room creation) are there any races?
r
They are not so only one agent in the room. I believe a second agent dispatch will overwrite a current agent in that room. But I've not tried it. I don't think you can rely on polling. It is better to have your agent code signal to your server and track state that way.
f
i see, overwrite meaning the existing agent will be removed from the room?
r
I was thinking in the case of there are two dispatches. I am not sure on what happens if you dispatch an agent_name to a room that already has that agent name. I can't really look now but I will try and find out on Monday.
f
ok sounds good, appreciate it, i'll give it a shot and see what happens
ok when dispatching w/ the same name, seems like just multiple agents are added to the room