Building a Chatbot with CrewAI

Hey, I’m currently working on a chatbot for customer assistance.

I’m using a flow with multiples crew in it.
What I’m trying to do is reaching milestones during the conversation and then executing a particular crew based on the milestones. I’m having troubles achieving this in particular because I didn’t find something that could help me do this.

Also I have concerns about how every sessions will be handled if multiple conversations are occuring simultaneously.

I’m using Telegram to receive and send messages, I use the Telegram_ID to identify every different users, and I save the conversation and other informations on a data base that my crews can reach.

If someone has any idea to help me, it would be greatly appreciated, thanks !

Make sure your flow is stateless, and pass in everything you need, eg, user_id, into the flow as inputs, and then fetch any history/data you need in a flow step. This will help you with sessions by uncomplicating things

Use routers to take you to different steps based on your milestones.

If you have specific questions, ask, and I will try to help. I have a few chatbots in production that use flows.

1 Like