AI Personal Learning
and practical guidance
讯飞绘镜

AI customer service bots that are automatically manned by idle sellers throughout the day

General Introduction

XianyuAutoAgent is an intelligent customer service robot system designed for the Idlefish platform and open-sourced by developer shaxiu on GitHub. It realizes 7×24 hour automatic duty through AI technology to help Idlefish sellers reply messages, handle bargaining and technical advice. Core features include context-aware dialog, intelligent laddering bargaining and multi-expert collaborative decision-making. The project is aimed at sellers who want to improve the efficiency of their stores and developers who are interested in AI technology. The code is free and open, and users can download, modify and deploy it. It is easy to install and suitable for individuals or small teams.

闲鱼卖家24小时自动服务的AI客服工具-1


闲鱼卖家24小时自动服务的AI客服工具-1

 

Function List

  • 7×24 hours automatic guarding: Online 24/7, responding to buyer messages in real time.
  • Context-sensitive dialog: Memorize conversation history and provide coherent responses.
  • Intelligent Bargaining: Automatically gives a reasonable price based on a step-down strategy.
  • Multi-expert synergy: Multiple AI models divide their work to handle different scenarios.
  • Web Search Integration: The technical support module can be networked to find answers.
  • Basic Log Monitoring: Records operational status for easy troubleshooting.

 

Using Help

Installation process

To use XianyuAutoAgent, you need to complete the following steps on your computer:

  1. clone warehouse
    Open a terminal (CMD or PowerShell for Windows, Terminal for Mac) and enter the command to download the code:
复制复制复制复制复制复制复制
复制
 git clone https://github.com/shaxiu/XianyuAutoAgent.git

Download and go to the project directory:

复制复制复制复制复制复制
复制
 cd XianyuAutoAgent
  1. Inspection of environmental requirements
  • Make sure you have Python 3.8 or later installed on your computer. This can be checked by typing python --version in a terminal.
  • Install NodeJS 18 or later (some features may be required). Download and install it from the official NodeJS website.
  1. Installation of dependencies
    Install the required toolkit by entering the following command in the terminal:
复制复制复制复制复制
复制
 pip install -r requirements.txt

If the network is poor, use a domestic mirror source:

复制复制复制复制
复制
 pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
  1. Configuring Environment Variables
    Create a new .env file in the project folder and enter it with a text editor such as Notepad or VS Code:
复制复制复制
复制
 OPENAI_API_KEY=你的API密钥
COOKIES_STR=你的闲鱼Cookies
  • OPENAI_API_KEY: Register on the OpenAI website to get a key.
  • COOKIES_STR: Log in to the web version of Idle Fish (xianyu.com), press F12 to open Developer Tools, find Cookies, and copy the full string. Save the file.
  1. Preparing a Cue Word File
    The project comes with a prompts folder containing four default templates:
  • classify_prompt.txt : Intent classify prompt word.
  • price_prompt.txt: prompt for bargaining experts.
  • tech_prompt.txt : technologist prompt.
  • default_prompt.txt : Default reply prompt word.
    Use them directly, or edit them as needed.
  1. running program
    When the configuration is complete, enter the command start:
复制复制
复制
 python main.py

After the terminal displays "Started successfully", the robot starts working. If it fails, check environment variables or dependencies.

Main function operation flow

1. 7 x 24 hour automatic guarding

  • How to turn on: The program runs and automatically listens for idle fish messages without manual intervention.
  • procedure: The buyer sends a message and the bot replies immediately. For example, if a buyer asks "Yes?" and the bot might reply "Yes, how can I help you?" What can I do for you?".
  • caveat: Keep your computer turned on and your network stable, Cookies work.

2. Context-sensitive dialogues

  • How to use: Bots store conversation history to ensure consistent responses.
  • procedureBuyers ask "Does this bag come in black?", the robot replies "It comes in black". The robot replies "It comes in black and is in stock". The buyer then asks "What's the price?" and the robot replies "$120 for the black one. The robot will then answer "This bag in black is $120". No need for user operation, AI automatic processing.
  • Commissioning method: If the responses are not coherent, check classify_prompt.txt or replace it with a stronger model.

3. Intelligent bargaining

  • How to use: When a buyer makes an offer, the bot responds with a step-down strategy.
  • procedureIf the item is listed at $150 and the buyer offers $100, the bot may reply "$130 minimum, do you think it's okay?". The strategy is preset in the code, so there is no need to adjust it manually. The strategy is preset in the code and does not need to be adjusted manually.
  • Customized settings: Edit price_prompt.txt to modify the price reduction or minimum price.

Featured Functions Operation Procedure

Multi-expert synergy

  • How to turn on: Enabled by default. The program distributes tasks to different experts through intent recognition.
  • procedure: Buyers ask for price, price experts respond; ask for technical details, technical experts take over. The user does not need to intervene.
  • Method of adjustment: Modify expert prompts in the prompts folder, or add new expert types.

Web Search Integration

  • How to use: The technical support module can be networked to search for answers.
  • procedure: The buyer asks "Does this cell phone support 5G?". The robot searches and replies "It supports 5G, the specific model is XX". The function runs automatically.
  • Optimization Recommendations: Ensure that the network is open to avoid search timeouts.

Basic Log Monitoring

  • How to view: Log files are generated when the program is run.
  • procedure: Open the log file (usually log.txt) in the project directory and view the runtime log. For example, "2025-03-18 10:00: Successful reply to message".
  • use: Used when troubleshooting problems, such as checking for missed messages.

Frequently Asked Questions

  • Program startup failure: Verify the Python and NodeJS versions and check that the dependencies are complete.
  • Inaccurate responses: Replace the OPENAI_API_KEY with a stronger one, or adjust the prompt word file.
  • Idlefish account anomaly: Log back into the web version to update cookies.
  • runtime interruption: Check the network connection or run it locally with a cloud server instead.

 

application scenario

  1. Busy Idle Fish Seller
    Scenario Description: You receive a lot of inquiries every day, but you don't have time to respond to them all. XianyuAutoAgent automatically guards the store, handles the messages and bargains, and all you have to do is confirm the deal.
  2. AI Technology Learning
    SCENARIO DESCRIPTION: You are new to programming and want to learn about AI applications. Download this program and study the code and cue words to quickly learn how to develop smart customer service.
  3. Multi-Collaboration Store
    Scenario Description:Teams run idle fish business. Robot unified response to ensure the same caliber of customer service and reduce the cost of manual coordination.

 

QA

  1. Do I have to pay for it?
    Answer: The project is free and open source, and can be downloaded directly from GitHub. However, you need to pay a small fee to use the OpenAI API.
  2. Was it hard to install?
    Answer: It's not difficult. As long as you know how to use a terminal to enter commands and follow the steps, you can do it. It works even if you don't know how to program.
  3. Will I be blocked by Idle Fish?
    Answer: Officially not explicitly prohibited, but high-frequency operation may be risky. It is recommended to control the speed of reply and comply with the platform rules.
May not be reproduced without permission:Chief AI Sharing Circle " AI customer service bots that are automatically manned by idle sellers throughout the day
en_USEnglish