Featured projects#Open source#Agents
XianyuAutoAgent: an AI customer-service agent for Xianyu
An open-source customer-service bot for Xianyu (Idle Fish) sellers: it uses an LLM for intent recognition to route buyer messages to specialist agents—negotiation, technical, customer service—and answers automatically using conversation context, with a built-in tiered discount strategy for haggling, keeping the store staffed around the clock.
Project facts
GitHub Ecosystem- License
- GPL-3.0
- Language
- Python
- Stars
- 9,251
- Data checked
- 2026-09-25
Snapshot figures reflect the check date and may change over time.
Most sellers on Xianyu (Idle Fish), China’s secondhand marketplace, know this feeling: you’re at work or asleep, a buyer asks about the price or tries to haggle, and by the time you get back to them the order has already gone to someone else. XianyuAutoAgent is a Xianyu customer-service bot written in Python that connects to the platform via a web-session cookie, letting an LLM watch the store’s messages for the seller and automatically answer inquiries and haggling around the clock. GitHubDaily recommended this open-source tool in March 2025.
Core features
- Context-aware conversation: the full conversation history is fed to the model as input, so replies follow on from prior context rather than answering each message in isolation, backed by lightweight session-memory management.
- Specialist routing: intent recognition based on prompts plus rules dynamically routes buyer messages to specialist agents—negotiation, technical, customer service—covering different kinds of conversations.
- Smart negotiation: when a buyer pushes for a lower price, it responds automatically according to a built-in tiered discount strategy; market price-comparison is not yet implemented.
- Technical Q&A: the technical specialist answers product-related technical questions with the help of web search; knowledge-base retrieval is still on the roadmap.
- Manual handoff: sending a switch keyword (a period, by default) toggles between AI and human control, and can even simulate human-like reply delays.
- Customizable prompts: editing the four templates in the
promptsdirectory—classification, pricing, technical, default—adjusts each specialist’s behavior and tone.
Typical use cases
- Unattended coverage: automatically answer buyer inquiries when the seller isn’t at their computer, avoiding lost orders from long response gaps.
- Secondhand-goods negotiation: when buyers repeatedly try to haggle, the bot responds according to its discount tiers, cutting down on back-and-forth.
- Technical Q&A for gadgets: when selling electronics or devices, the technical agent answers first using search, escalating complex questions to a human.
Quick start
Requires Python 3.8 or later, plus two credentials you provide yourself: an LLM API key (Qwen by default, though the model endpoint and name can be changed in the config) and a Xianyu web-session cookie.
git clone https://github.com/shaxiu/XianyuAutoAgent.git && cd XianyuAutoAgent && pip install -r requirements.txt
Then rename .env.example to .env and fill in API_KEY, COOKIES_STR, MODEL_BASE_URL, and MODEL_NAME, and strip the _example suffix from the prompt templates in the prompts directory to activate them. Run python main.py to start it; newcomers can follow the detailed walkthrough included in the README.
Summary
This suits Xianyu sellers and secondhand-shop operators with a high volume of listings who need round-the-clock message coverage; developers researching multi-agent routing and prompt-engineering practice will also find the codebase small enough to read and learn from. The project is licensed under GPL-3.0, and the README states it’s for learning and exchange only—the development team may stop updating it at any time; market price-comparison, a knowledge base, and a web admin UI are all still on the roadmap, and there’s no formal release yet. It also relies on an unofficial web interface for platform access, and the README doesn’t address account risk-control exposure, so evaluate that risk yourself before using it. Overall, it grounds multi-agent collaboration in a sufficiently concrete scenario with clear functional boundaries, though its maturity depends on continued community maintenance.