Xianyu AutoAgent Review: Open-Source 24/7 AI Customer Service with Multi-Expert Collaboration

Xianyu AutoAgent Review: Open-Source 24/7 AI Customer Service with Multi-Expert Collaboration

Xianyu AutoAgent Review: Open-Source 24/7 AI Customer Service with Multi-Expert Collaboration

If you sell on Xianyu (China’s largest secondhand marketplace), you know the pain: buyers message at 2 AM asking about product details, and if you don’t respond quickly, they move on to another seller. That’s where Xianyu AutoAgent comes in — an open-source AI customer service system that handles conversations, negotiations, and inquiries 24/7.

In this review, I’ll break down what makes Xianyu AutoAgent stand out from other automation tools, how its multi-expert architecture works, and whether it’s worth deploying for your Xianyu store.

What Is Xianyu AutoAgent?

Xianyu AutoAgent is an open-source Python project that transforms your Xianyu store into an AI-powered operation. Unlike simple auto-reply bots that send canned responses, Xianyu AutoAgent uses large language models (LLMs) to understand context, negotiate prices, and route conversations to specialized “expert” agents.

Pain Points for Xianyu Sellers

Xianyu has over 100 million daily active users as China’s largest secondhand marketplace. But sellers face several core challenges:

  1. Delayed responses: Buyers message at unpredictable times — during meetings, at midnight — and missed replies mean lost sales
  2. Repetitive questions: 80% of inquiries are variations of “Is this still available?”, “Can you lower the price?”, “When will you ship?”
  3. Negotiation fatigue: Every buyer wants to haggle, and the back-and-forth drains your energy
  4. Multi-account management: Professional sellers often run multiple accounts and can’t keep up with messages

Xianyu AutoAgent was built to solve exactly these problems.

GitHub Repository: shaxiu/XianyuAutoAgent

Key Stats:

  • ⭐ 8,800+ GitHub stars
  • 🐍 Python 3.8+ compatible
  • 🆓 Completely open-source (MIT License)
  • 🤖 Supports multiple LLM providers (Qwen, OpenAI, etc.)
  • 📅 Created: March 2025

The project was created by developer shaxiu in March 2025 and has gained significant traction in the Chinese developer community for its practical approach to e-commerce automation. As of now, the project has 27 WeChat discussion groups, indicating high community engagement.

Core Features

1. Context-Aware Conversations

Most auto-reply tools treat each message in isolation. Xianyu AutoAgent maintains conversation history, allowing it to:

  • Remember previous messages in the same thread
  • Understand follow-up questions naturally
  • Build rapport with potential buyers

Example:

Buyer: Is this phone still available?
AI: Yes, it's available. This is a personally used phone in 90% condition 
    with all functions working properly. What would you like to know?

Buyer: What about the battery health?
AI: The battery health is at 87%. I've used it for about a year with 
    normal usage. Still holds a full day's charge easily.

2. Expert Routing System

Xianyu AutoAgent uses a multi-expert architecture that routes conversations to specialized agents based on intent:

ExpertResponsibilityUse Case
Classification ExpertIdentifies user intentRoutes conversations
Price ExpertHandles negotiations”Can you lower the price?”
Tech ExpertAnswers technical questions”What are the specs?”
Customer Service ExpertGeneral inquiries”When will you ship?”

The system uses LLM-based intent classification to determine which expert should handle each message, ensuring buyers get accurate, specialized responses.

3. Smart Negotiation System

The negotiation system is where Xianyu AutoAgent truly shines. It implements a tiered discount strategy:

  1. First negotiation: Small concession to show goodwill
  2. Second negotiation: Further reduction, but with a floor price
  3. Hold firm: Politely decline when below cost

Example negotiation:

Buyer: Can you do 1500 RMB?
AI: That's a bit low. How about 1800? That's my best price.

Buyer: 1600?
AI: I understand you want a good deal, but 1800 is really the minimum. 
    This is in excellent condition and priced fairly.

The system can be configured with:

  • Minimum acceptable price
  • Discount thresholds
  • Negotiation tone (friendly/firm)

4. Customizable Prompts

Xianyu AutoAgent provides four prompt templates you can customize:

  • classify_prompt.txt: Intent classification
  • price_prompt.txt: Price negotiation
  • tech_prompt.txt: Technical expertise
  • default_prompt.txt: General responses

This allows you to tailor the AI’s personality and knowledge to your specific products and brand voice.

Technical Architecture

Multi-Expert Collaboration System

The architecture follows a hub-and-spoke model:

User Message → Classification Expert → Intent Identified

                    ┌─────────────────┼─────────────────┐
                    ↓                 ↓                 ↓
              Price Expert      Tech Expert      CS Expert
                    ↓                 ↓                 ↓
                    └─────────────────┼─────────────────┘

                              Response Generated

Tech Stack

  • Backend: Python 3.8+
  • AI Framework: Qwen (default) / OpenAI API compatible
  • Data Storage: In-memory session management
  • Deployment: Local / Docker

How It Works

  1. Message Reception: The system monitors Xianyu messages via web API, capturing buyer messages in real-time
  2. Intent Classification: LLM analyzes the message and determines intent (price inquiry, technical question, general inquiry, etc.)
  3. Expert Routing: Message is routed to the appropriate expert agent, each with independent prompts and decision logic
  4. Response Generation: Expert generates contextual response based on conversation history, ensuring coherent and natural dialogue
  5. Auto-Reply: Response is sent back to the buyer via API, fully automated without human intervention

Key Technical Details

Session Management: The system uses lightweight in-memory session storage, maintaining separate conversations for each buyer. When a buyer sends a new message, the system retrieves their conversation history as LLM context. This approach ensures conversation continuity without excessive token consumption.

Intent Recognition: The classification expert uses a hybrid LLM prompt + rule-based routing approach. First, the LLM determines the message type (negotiation/technical/customer service/casual chat) through prompts, then routes to the corresponding expert. This is more flexible than traditional keyword matching and can handle more complex intents.

Human Simulation: The system supports a SIMULATE_HUMAN_TYPING option that, when enabled, simulates human reply delays to make conversations appear more natural and reduce the risk of being identified as a bot.

Keyword Switching: Supports switching between AI takeover and manual takeover by entering specific keywords (default is period). This means you can manually intervene when needed, then switch back to AI mode after handling the issue.

Comparison with Other Tools

FeatureXianyu AutoAgentTraditional Auto-ReplyOther AI Customer Service
Context Awareness✅ Full❌ NonePartial
Multi-Expert System✅ Yes❌ No❌ No
Smart Negotiation✅ Advanced❌ NoBasic
Open Source✅ Yes❌ No❌ No
Custom Prompts✅ Full❌ NoLimited
Web Search Integration✅ Yes❌ NoLimited
CostFree + API costsPaid subscriptionExpensive SaaS

Key Differentiator: Xianyu AutoAgent is the only open-source solution that combines multi-expert collaboration with intelligent negotiation, making it uniquely suited for secondhand marketplace scenarios.

Local Deployment Guide

Hardware Requirements

  • CPU: 1+ cores
  • RAM: 1GB+
  • Storage: 100MB free space
  • Network: Stable internet connection

Installation Steps

# 1. Clone the repository
git clone https://github.com/shaxiu/XianyuAutoAgent.git
cd XianyuAutoAgent

# 2. Install dependencies
pip install -r requirements.txt

# 3. Configure environment variables
cp .env.example .env
# Edit .env file with your API_KEY and COOKIES_STR

# 4. Run the program
python main.py

Configuration Tutorial

Getting API_KEY

  1. Visit Alibaba Cloud Model Studio (https://modelscope.cn/)
  2. Register and log in
  3. Get your API_KEY from the console

Getting COOKIES_STR

  1. Open Xianyu web version (https://www.goofish.com/)
  2. Press F12 to open Developer Tools
  3. Switch to Network tab
  4. Refresh the page and click any request
  5. Copy the Cookie value from Request Headers

Real-World Use Cases

Scenario 1: Used Electronics

Buyer: Is this phone still available? AI: Yes, it’s available. This is a personally used phone in 90% condition with all functions working properly. What would you like to know?

Buyer: Can you do 1500 RMB? AI: That’s a bit low. How about 1800? That’s my best price.

Scenario 2: Clothing & Shoes

Buyer: Do you have this in size M? AI: Yes, we have two pieces in size M. These are brand new with tags still attached.

Buyer: Can you include free shipping? AI: Sure, I’ll include free shipping if you order now.

Scenario 3: Books & Educational Materials

Buyer: Is this book authentic? AI: Yes, it’s an authentic copy. The pages are clean with no notes or highlights, just like new.

Limitations and Considerations

Platform Rule Risks

⚠️ Important: Using automation tools may violate Xianyu’s terms of service and could result in account suspension.

Technical Limitations

  1. Cookie Dependency: Cookies expire and need periodic renewal
  2. No Image Support: Currently text-only conversations
  3. Continuous Operation Required: Program must stay running for auto-replies

Best Practices

  1. Test First: Start with low-value items to verify stability, then scale up after confirming AI understanding
  2. Monitor Regularly: Check response logs to ensure AI understanding, correct erroneous replies promptly
  3. Human Intervention: Switch to manual replies for complex issues to avoid AI giving wrong answers
  4. Follow Rules: Understand and comply with Xianyu’s policies, control usage frequency
  5. Backup Cookies: Regularly backup valid cookies to reduce downtime
  6. Choose the Right Model: Qwen offers good value; OpenAI performs better but costs more

Cost Estimation

Using Qwen as an example, assuming 100 messages per day:

  • Average 500 tokens per message (input + output)
  • Approximately 50,000 tokens per day
  • Monthly cost around 15-30 RMB

For sellers with 100+ daily inquiries, this cost is far lower than hiring a human customer service representative.

Final Verdict

Pros

✅ Open-source and free ✅ Multi-expert collaboration system ✅ Context-aware conversations ✅ Intelligent negotiation ✅ Easy to deploy

Cons

❌ Platform rule risks ❌ Cookie dependency affects stability ❌ No multimedia support ❌ Requires continuous operation

Who Should Use It

  • Xianyu sellers wanting 24/7 auto-replies
  • Developers interested in AI Agent applications
  • Automation enthusiasts
  • Professional sellers with 50+ daily inquiries
  • Small to medium sellers looking to reduce customer service costs

Who Shouldn’t Use It

  • Casual sellers who only sell occasionally (setup cost isn’t worth it)
  • Users with zero tolerance for platform rule violations (ban risk)
  • Scenarios requiring大量 image/video consultation handling

Overall Rating

⭐⭐⭐⭐ 4/5

Xianyu AutoAgent is the most sophisticated open-source AI customer service solution for Xianyu. Its multi-expert architecture and intelligent negotiation capabilities set it apart from simple auto-reply bots. However, users should be aware of platform rule risks and use it responsibly.

Future Development Direction

According to the project README, the development team is planning the following features:

  1. Sentiment Analysis Enhancement: Identify buyer emotions and adjust reply strategies
  2. Market Price Comparison: Automatically analyze similar product prices to optimize negotiation strategies
  3. RAG Knowledge Base Enhancement: Support importing product materials for more professional AI answers
  4. DingTalk Integration: Real-time push of important messages to mobile
  5. Web Management Interface: Visual configuration and monitoring

Once these features are implemented, Xianyu AutoAgent will become even more comprehensive. Sellers planning long-term use should pay attention to project updates.

Comparison with Commercial Solutions

There are also commercialized Xianyu auto-customer service solutions on the market, ranging from hundreds to thousands of yuan. Compared to these, Xianyu AutoAgent’s advantages include:

  • Fully Open Source: Transparent code, no backdoors
  • Highly Customizable: Can be modified according to your needs
  • Controllable Costs: Only pay API fees, no subscription fees
  • Community Support: Active developer community continuously improving

Of course, commercial solutions offer out-of-the-box usability and technical support. Which solution to choose depends on your technical capabilities and budget.


FAQ

Q1: What is Xianyu AutoAgent? A: Xianyu AutoAgent is an open-source AI customer service bot for Xianyu (Goofish) marketplace that supports 24/7 auto-replies, smart negotiation, and multi-expert collaboration.

Q2: Will I get banned for using Xianyu AutoAgent? A: Using automation tools may violate Xianyu’s terms of service. There’s a risk of account suspension, so use it cautiously and understand the platform rules.

Q3: Is Xianyu AutoAgent free? A: The project itself is open-source and free, but calling AI models (like Qwen) requires API fees.

Q4: How do I get Xianyu cookies? A: Open Xianyu web version, press F12 for Developer Tools, go to Network tab, find a request, and copy the Cookie value from Request Headers.

Q5: Which AI models does Xianyu AutoAgent support? A: It uses Qwen by default but also supports OpenAI API and other compatible models. You can configure this in the .env file.


Hope this review helps! If you have questions about Xianyu AutoAgent or want to share your experience, feel free to leave a comment below.