Five direct packages connect Xianyu messages to one model client
XianyuAutoAgent pins 5 direct Python dependencies and uses the OpenAI client with a configurable base URL. The default environment points to Alibaba DashScope and names qwen-max. On the marketplace side, main.py opens a WebSocket using a browser session cookie, decodes incoming messages, fetches item details, and sends the generated text back to the buyer. This is direct account automation, not a draft inbox with an approval button.
The reply path has four roles. A classifier chooses between price, technical, default, or no-reply handling. Keyword rules catch common price and specification questions before the model classifier runs. The price agent changes sampling temperature as bargaining rounds accumulate, while the technical agent enables model-provider search. A small output filter replaces replies containing WeChat, QQ, Alipay, bank-card, or offline-contact terms with a platform-communication reminder.
What happened when we ran it
Our sandbox cloned commit 540bbc2 into an unprivileged Debian container with 3 CPUs and 8 GB of RAM. Installation succeeded in 15 seconds, adding 51 packages and taking 51 MB on disk. The build completed in 7 seconds. The repository itself contained 65 files, about 2,042 source lines, and used 9.8 MB before those packages were installed.
There was no test script or target, so our run skipped tests. The checkout also had no tests directory and no CI workflow. Pip-audit found 3 known vulnerabilities in the installed environment; the measurement does not assign them severity here. A Dockerfile and Compose file are present, which helps packaging, but neither substitutes for automated checks of message parsing, bargaining limits, duplicate suppression, or reply delivery.
Python 3.8 starts the script after four prompt files are ready
The README sets Python 3.8 or newer as the local floor. Setup needs an API key, COOKIES_STR, model endpoint, model name, and 4 prompt files for classification, price, technical, and general replies. Template prompts are included. The program can ask interactively for a missing key or cookie and write it into .env, which is convenient on a workstation but awkward in a noninteractive deployment.
One SQLite file keeps up to 100 messages per conversation
ChatContextManager defaults to 100 retained messages for each chat and stores messages, item details, prices, descriptions, and bargain counts in data/chat_history.db. The agent formats the stored user and assistant history into the next model prompt alongside current item information. That continuity helps a negotiation stay coherent. It also means buyer text and product data cross the boundary to whichever model endpoint the operator configured.
The data directory persists through the supplied Compose volume, while .env holds both the model credential and the Xianyu cookie. Treat both as sensitive state. Back up the SQLite file only where chat data is permitted, restrict access to the mounted secret file, and decide how long conversations should remain. The code's 100-message default is an implementation limit, not a retention policy written for a business.
Issue 61 records repeated cookie and risk-control interruptions
Open issue 61 gathered 8 comments between July 2025 and January 2026 about recurring risk-control checks. The maintainer advised stopping the script, opening Xianyu in a browser, passing the slider check, and refreshing the cookie. Later commenters reported the session failing again after short periods. These reports do not establish a failure rate, but they contradict the idea that a configured cookie guarantees unattended service.
One repeated message can become several customer replies
Issue 75 reports the same seller message being read with different timestamps, causing multiple model requests and replies. A later pull request proposes deduplicating incoming messages, but the issue remains open. Duplicate handling deserves a regression test keyed to a stable message identifier, especially when each extra pass incurs model cost and sends visible text to a buyer. Our measured checkout offered no test target for that behavior.
Human takeover exists, though it is easy to trigger accidentally. The default toggle is the Chinese full stop character, and the code stores manual-mode state in memory with a default 1-hour timeout. A restart clears that in-memory set. Before using the feature, choose an unambiguous command, test it per conversation, and verify the bot stays silent throughout the intended handoff window.
June 10 code and 53 open items point to an experiment, not a release line
GitHub recorded the last push on June 10, 2026, and showed 53 open issues and pull requests on September 2. Activity continued through an August 16 pull request, but the latest default-branch commits were updates to community group QR images. The latest-release API returned no release. That combination shows ongoing interest without a versioned artifact or recent default-branch feature work to anchor an operator.
The repository had 8,966 stars, so the concept clearly attracts sellers and builders. Its README still labels the project for learning and communication, warns that maintenance or the repository may stop, and puts RAG, market comparison, sentiment work, DingTalk, and a web console in the planned column. Read those as aspirations. The available code is a compact automated responder with local memory and prompt routing.
A 51 MB install is suitable for a watched trial
XianyuAutoAgent is small enough to inspect and cheap to run in a disposable environment. XianYuApis is a better base when you want to own every rule. Chatwoot better fits a staffed support queue, while Dify gives more structure to model workflows if you can supply the marketplace connector. The choice depends on whether direct Xianyu access or operational control is harder for your team.
Our 15-second install and 7-second build make a trial easy, while 3 known vulnerabilities, no tests, cookie risk checks, and the duplicate-reply report make unattended selling hard to justify. Start with a low-risk account, a narrow prompt, conservative pricing rules, and visible monitoring. Keep a human able to disable the process immediately, because the software sends its decisions straight into a live buyer conversation.

