XianyuAutoAgent is an AI-driven customer service robot system tailored for the Xianyu marketplace, providing uninterrupted 7×24 automated support. It leverages a multi-expert decision engine to enable context-aware conversations, intelligent price negotiation, and sentiment analysis, while integrating web search, RAG knowledge base, and operational monitoring modules. Built on a plugin-based architecture, it supports customizable prompt templates and third-party API integration, and is compatible with mainstream LLM frameworks to significantly boost customer service efficiency and user satisfaction.
🌟 Core Features
Intelligent conversation engine
Functional modules | Technical Implementation | Key Features |
---|---|---|
Context-aware | Session history storage | Lightweight dialogue memory management, with the complete dialogue history as LLM context input |
Expert Routing | LLM prompt+rule routing | Intention recognition based on prompt engineering → Dynamic distribution of expert agents, supporting bargaining/technology/customer service multi-scenario switching |
Business Function Matrix
Modules | Implemented | Planning |
---|---|---|
Core Engine | ✅ LLM automatic reply ✅ Context management |
🔄 Sentiment analysis enhancement |
Bargaining system | ✅ Step price reduction strategy | 🔄 Market price comparison function |
Technical Support | ✅ Web search integration | 🔄 RAG knowledge base enhancement |
Operation and maintenance monitoring | ✅ Basic log | 🔄 DingTalk integration 🔄 Web management interface |
🚴 Quick Start
Environmental requirements
- Python 3.8+
- NodeJS 18+
Installation Steps
1. 克隆仓库
git clone https://github.com/shaxiu/XianyuAutoAgent.git
cd xianyu-autoagent
2. 安装依赖
pip install -r requirements.txt
3. 配置环境变量
创建一个 `.env` 文件,包含以下内容,也可直接重命名 `.env.example` :
OPENAI_API_KEY=your_api_key_here
COOKIES_STR=your_cookies_here
注意:代码中OPENAI_API_KEY默认使用的是通义千问,如需使用其他API,请自行修改代码中的模型地址和模型名称;
COOKIES_STR自行在闲鱼网页端获取cookies
4. 创建提示词文件prompts/*_prompt.txt
默认提供四个模板,可自行修改
How to use
Run the main program:
python main.py
Custom prompt words
prompts
You can customize the prompt words for each expert by editing the files in the directory:
classify_prompt.txt
: Intent classification prompt wordsprice_prompt.txt
: Price Expert Tipstech_prompt.txt
: Technical Expert Tipsdefault_prompt.txt
: Default reply prompt
Libre Depot original article,Publisher:Libre Depot,Please indicate the source when reprinting:https://www.libredepot.top/5614.html