This is a chatbot created with CrewAI that acts as a Walmart Assistant. It is comprised of three main agents that work together to answer the user's questions if the input was approved by the initial guardrail agent. In addition to the chatbot, some features were created to ensure a better user experience, such as the ability to choose between short-term and long-term memory.
- Guardrails: A model separate from the CrewAI Chatbot will evaluate the user's input and its relevance to Walmart before allowing it to reach the main logic
- Short-term Memory: The Chatbot utilizes short-term memory as the conversation goes on and will use the user's past responses when formulating an output
- Long-term Memory: The Chatbot can use long-term memory with the help of Mem0. It will perform a vector search to find the most relevant memories from both the user and the chatbot to provide a stronger answer
- Speech to Text: Using FFMPEG and WhispherAI, the user can choose to speak out loud for an input
- Speed Optimization: Utilizing memories can lead to long delays, so threading is used with long-term memory to improve speed and provide a better user experience
The Walmart CrewAI Chatbot is composed of multiple AI agents, each with unique roles, goals, and tools. The four main agents include:
- Guardrail Agent: This agent will take in the user's prompt and check if it is related to Walmart, Walmart services, and/or Walmart products. It will also be given the last three exchanges in the conversation between the chatbot and the user to ensure it has context of the current discussion. If it deems the user's input to be relevant and appropriate, it will rephrase the prompt and pass it to the CrewAI Agents
- Walmart Research Agent: This agent will take the prompt given by the guardrail agent and research information related to the user's question from verifiable Walmart sources. Once it has gathered its research, it will pass it on to the next agent
- Walmart Summarizer Agent: The research findings given by the Research Agent may not be very clear or contain unnecessary information. The summarizer agent will create a summary of the research findings that will be easy for the user to view
- Walmart QA Agent: This is the final agent that will review the summary and ensure the final summary is clear, concise, and aligned with Walmart's communication standards and policies. Once the final review is finished, it will give the user an output.
pip install -r requirements.txtEnsure you have Python >=3.10 <3.14 installed on your system. This project uses UV for dependency management and package handling, offering a seamless setup and execution experience.
pip install uv(Optional) Lock the dependencies and install them by using the CLI command:
crewai installAdd your OPENAI_API_KEY, SERPER_API_KEY, and MEM0_API_KEY into the .env file
You can modify specific things to change the purpose of the Chatbot. This would include:
- Modify
src/crewai_knowledge_chatbot/config/agents.yamlto define your agents - Modify
src/crewai_knowledge_chatbot/config/tasks.yamlto define your tasks - Modify
src/crewai_knowledge_chatbot/crew.pyto add your own logic, tools, and specific args - Modify
src/crewai_knowledge_chatbot/main.pyto add custom inputs for your agents and tasks, change the guardrail agent, and IDs for mem0
To kickstart your crew of AI agents and begin task execution, run this from the root folder of your project:
$ crewai runThis command initializes the Crew, assembling the agents and assigning them tasks as defined in your configuration.
MIT License - see LICENSE file for details.
Currently, an issue the download can sometimes be buggy. I have heard about both successful and unsuccessful downloads. Currently looking more in-depth.

