liangdabiao/langgraph_multi-agent-rag-customer-support

本项目实现了一个基于多智能体(Multi-Agent)和检索增强生成(Retrieval-Augmented Generation, RAG)技术的客户支持系统。它利用 Python、LangChain 和 LangGraph 构建了一个能够处理各种旅行相关查询的对话式 AI,包括航班预订、租车、酒店预订和行程推荐。还有对接了woocommerce商城进行商品查询,文章查询,表单提交,订单查询等商城功能。

What it solves

This project provides a secure, professional enterprise-grade AI customer support system. It solves the problem of AI chatbots providing inaccurate answers (hallucinations) or performing risky actions without oversight. By using a multi-agent architecture and Retrieval-Augmented Generation (RAG), it ensures responses are grounded in real data and that sensitive operations are strictly controlled.

How it works

The system is built as a state graph using LangGraph and LangChain. It employs a "Primary Assistant" that routes user queries to specialized agents (e.g., Flight Booking, Hotel Booking, WooCommerce, and Blog Search agents).

Key mechanisms include:

  • RAG: Uses a Qdrant vector database to retrieve relevant information from a knowledge base before generating answers.
  • Security Guardrails: An AI "security inspector" checks for jailbreak attempts and ensures user queries are relevant to the business domain before processing.
  • Human-in-the-Loop: For sensitive operations (like canceling a flight), the system requires both user confirmation and a final administrator approval via the GoHumanLoop framework (e.g., via Feishu notifications).
  • Tool Access: Agents use a mix of "safe" tools (automatic) and "sensitive" tools (requiring confirmation).

Who it’s for

  • Developers looking for a practical implementation of LangGraph and multi-agent orchestration.
  • Enterprises needing a reliable customer support AI that integrates with e-commerce (WooCommerce) and internal databases.
  • AI Engineers interested in implementing security guardrails and human-approval workflows in LLM applications.

Highlights

  • Multi-Agent Orchestration: Specialized agents for different domains (flights, hotels, cars, e-commerce).
  • Double-Layer Security: Combines AI-driven jailbreak protection with manual administrator oversight.
  • WooCommerce Integration: Ability to query products, orders, and submit forms.
  • Observability: Integrated with LangSmith for tracking request lifecycles and debugging.
  • State Management: Uses memory checkpoints to save conversation progress.

Related

  • Project
  • Project
  • Project
  • Project
  • Project