I'm trying to implement a multi-tenant system wher...
# telephony
s
I'm trying to implement a multi-tenant system where each customer has their own Agent. I can already route different phone requests to different Agents through dispatch rules, but I'm currently manually starting the Agent using cli.run. I'd like to implement an API endpoint where, when a customer initiates a Start Agent request on the front end, the back end starts the Agent worker. I haven't found any documentation on how to do this. Any suggestions? Thanks.
r
I am not sure using
cli run
is the best design approach for this as scaling this way will be quite difficult for you. I have seen this use-case a fair amount and there are a couple of common approaches to this. 1. have an agent_name per customer that services the calls. This would mean you have 1 or more agents running per customer. This should scale well but maybe not best of you have many customers and they only receive calls infrequently. 2. Design a "common" agent that at the top of the entrypoint gets and indication which persona to load. Now you can spread the calls for any agent to any of your instances. WIth my limited view into your usecase I am expecting this is the one you will want to explore first.
s
Thanks, I'll explore it. 🎉