I'm trying to implement a multi-tenant system wher...
# agents
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.
m
Is there a reason why you need one agent per customer? We also have a multi-tenant setup and just have one agent/worker - we use
participant.attributes.get("sip.trunkPhoneNumber")
to map this to the related customer and then inject that specific customers prompt, settings etc
this 2
s
Thanks, I'll explore it.
e
Hey @magnificent-salesclerk-38445, I just ran into a similar problem that you might be able to help. How are you managing the sip trunk numbers? You have every phone number on the numbers list on the sip trunk? In my case we have a somewhat big list of numbers so adding each one to the list might not be viable
m
We have a pool of numbers registered by automating the cli although they are individually setup via twilio first (we use WhatsApp more than livekit so each has their own subaccount)