
This project deploys a collaborative AI ecosystem where each agent plays a key role: a Chef (RAG) designs custom recipes, a Manager (Tavily) analyzes costs and the market in real time, and a Quality Expert ensures food safety. Powered by LangGraph for state management and ChromaDB for document storage, the system transforms a simple idea into a complete, ready-to-use business report. A concrete demonstration of the power of autonomous agents in the service of artisanal food production.
This project involves creating an intelligent multi-agent system dedicated to the bakery and pastry industry. Unlike a simple chatbot, it orchestrates several virtual "experts" who collaborate to transform a product idea into a complete execution plan.
In concrete terms, the project rests on three pillars:
Culinary Expertise (Chef Agent): It uses RAG (Retrieval-Augmented Generation) to draw from a technical knowledge base and generate precise and structured recipes.
Market Analysis (Managing Agent): Using the Tavily tool, this agent connects to the web in real time to retrieve current ingredient prices and calculate profitability (costs, margins, selling price).
Food Safety (Quality Agent): He analyzes the final proposal to identify allergens and ensure compliance with hygiene standards.
The whole system is controlled by LangGraph, which manages the workflow and the state of the conversation, ensuring a smooth and logical transition between design, financial calculation, and security verification.
It is a powerful decision-making tool, capable of supporting both craftsmen and entrepreneurs in the creation of new products.
🛠️ Heart of the Orchestration


🧠 Intelligence & Models
Groq: The inference engine (LLM) that powers your agents. Groq enables extremely fast responses, which is crucial for a multi-agent system where several calls are made in succession.
ChromaDB: Our vector database. It stores technical documents about the bakery and allows the Chef agent to use RAG (Retrieval-Augmented Generation) to find reliable information instead of guessing.
🌐 Tools & Monitoring


The project follows a rigorous workflow, from knowledge indexing to multi-agent execution:
Document preparation – Storing your pastry manuals and technical sheets in the data directory.
Vector Indexing (RAG) – Splitting texts into segments (chunks) and transforming them into vectors stored in ChromaDB for fast semantic searching.
StateGraph initialization – LangGraph configuration to define the shared state (BakeryState) and the order of passage between agents.
Chef Orchestration – The Chef agent queries the vector database to extract the business context and generate a technically accurate recipe.
Market Research (Action Tooling) – The Agent Manager uses Tavily to browse the web, retrieve actual ingredient prices and calculate economic viability.
Safety Audit (Reasoning) – The Quality agent analyzes the combined output of the Chef and the Manager to validate allergens and compliance.
Final Synthesis & Monitoring – Consolidation of all analyses into a single report, with full tracking of each step via LangSmith to ensure transparency of the process.
bakery-multiagentic-ai-system
├── src/
│ ├── app.py # Main RAG application
│ ├── vectordb.py # Vector database wrapper
| └── state.py
│ ├── agents/ # List of agents
│ ├── chef.py
│ ├── inventorymanager.py
│ └── quality.py
├── data/ # Sample publications
│ ├── recette_brownies_chocolat.txt
│ ├── recette_flan_patissier.txt
│ └── recette_gateau_vanille.txt
├── .gitignore
├── LICENSE
├── README.md # This guide
└── requirements.txt # All dependencies included
Clone the repository:
git clone https://github.com/ibrahimasorydiallo1/bakery-multiagentic-ai-system.git cd bakery-multiagentic-ai-system
Install the dependencies:
pip install -r requirements.txt pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Prepare your Groq API key:
Create a file named .env at the project root and store the API key in .env:
GROQ_API_KEY=the-api-key-here
Link to generate a Groq API key.
Get your Tavily key ready
In the file .env at the project root, store
TAVILY_API_KEY=votre_cle_api_tavily
Link to generate a Tavily API key.
Prepare your LangSmith key
In the .env file at the project root, store
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY=votre_cle_api_langsmith
LANGCHAIN_PROJECT="Bakery-Agentic-RAG"
Link to generate a LangSmith API key.
This project demonstrates how artificial intelligence can move beyond purely conversational functions to become a truly operational tool. By orchestrating specialized agents capable of manipulating business data (RAG) and interacting with the real world (Tavily), we move from an AI that "talks" to an AI that "executes".
The Bakery Intelligence System is just a first step towards the intelligent automation of the craft industry. Several avenues for development are possible:
Marketing Expansion: Added an agent capable of generating product visuals (via DALL-E) and social media posts.
Inventory Management: Connecting to supplier APIs to automatically place orders as soon as a recipe is validated.
Energy Optimization: Analysis of cooking times to reduce carbon footprint and electricity costs.
By combining LangGraph and the power of LLMs, this project paves the way for a new generation of assistants capable of understanding the complexity of a business while guaranteeing technical and financial accuracy.
This project is released under the MIT License, offering maximum flexibility for use, modification, and distribution.
Permissions: The MIT license grants users the right to use the project commercially without restrictions or royalties, to modify it and create derivative works, to distribute original or modified versions, for private internal use, and to use patents for implementations. Organizations of any size can adopt this project, integrate it into commercial products, modify it to meet specific needs, and deploy it in any commercial context without legal constraints or license fees.
Limitations: The software is provided "as is," without any warranty of any kind. No liability is accepted for damages or losses arising from its use. No trademark rights are granted beyond those explicitly stated. These standard limitations protect the project while maintaining broad usability.
Conditions: Users must include the original copyright notice in distributions, as well as the license text with copies of the software. These minimum requirements ensure proper attribution while allowing maximum flexibility for deployment and modification.
The full license text can be found in the LICENSE file at the root of the repository. This permissive approach maximizes the project's potential impact on the accessibility of Business Intelligence for various organizational contexts, from startups to large enterprises.
Ibrahima Sory Diallo
Bachelor student in AI/DATA
Available on LinkedIn : https://www.linkedin.com/in/ibrahima-sory-diallo-isd/
Tags:
Retrieval-Augmented Generation (RAG)
French
French
Agentic AI
LLM Applications
ChromaDB
LangChain
Vector Databases
Document Question Answering
NLP Systems
Generative AI