← Back to Leaderboard
Xshaxiu

shaxiu/XianyuAutoAgent

Self-hosted Xianyu seller chat with LLM routing and stepwise bargaining

View on GitHub ↗
Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
B · 53/100
Maintenance Activity
● Updated 5mo ago
Latest Release
Rolling commits (main)
Commercial License Check
GPL-3.0 · Copyleft Warning

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption24/25
Release Cadence6/20
License Clarity11/20
DockerSelf-Hosted
Total Stars
★ 9,920
24h Growth
+24
7d Growth
+149
Forks
1,729

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

shaxiu/XianyuAutoAgent Star History (2025-03-13 - 2026-12-01) ALL-TIME STAR HISTORY (2025-03 – 2026-12) +9.9k in 628d · avg +16/day 10.5k 5.2k 0 2025-03-13: ★ 12025-04-26: ★ 1,4862025-06-07: ★ 2,5172025-07-19: ★ 2,9342025-08-30: ★ 3,5262025-10-11: ★ 3,9182025-11-22: ★ 4,2072026-01-03: ★ 4,5302026-02-14: ★ 4,8482026-03-28: ★ 5,9802026-05-09: ★ 7,3102026-06-20: ★ 7,8782026-08-01: ★ 8,4772026-09-12: ★ 9,0642026-10-24: ★ 9,4562026-12-01: ★ 9,920 ★ 9.9k 2025-03 2026-01 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Xianyu AutoAgent is a Python application specialized for Xianyu seller chat, with main.py as its entrypoint. The tree separates agent logic (XianyuAgent.py), platform integration (XianyuApis.py), and conversation context (context_manager.py). The runtime pins websockets==13.1 and requests==2.32.3 for networking, openai==1.65.5 for model access, python-dotenv==1.0.1 for configuration, and loguru==0.7.3 for logging.

The reply flow combines stored conversation history with LLM-based intent classification and routing rules, then selects a bargaining, technical-support, or default reply path. The four prompt roles in prompts/ are customization points for classification and generation. Here, “multi-expert” is best understood as specialized routing; the available interface does not establish a general-purpose agent or plugin platform.

Key Capabilities & Differentiators

The application combines context-aware automatic replies, stepwise price concessions, and web search for technical support. Sellers can toggle between automated handling and manual takeover with TOGGLE_KEYWORDS; SIMULATE_HUMAN_TYPING controls an optional reply delay. These controls make a supervised rollout possible without treating generated price responses as independently enforced business policy.

Qwen is the default model family. MODEL_BASE_URL and MODEL_NAME let operators change the endpoint and model, but a replacement should be tested against the OpenAI client and the classifier's expected behavior. Basic logging is implemented. Market-price comparison, RAG-backed knowledge, enhanced sentiment analysis, DingTalk integration, and web administration remain planned.

Trade-offs & Limitations

Compared with building on a general-purpose agent framework, this app supplies Xianyu-specific session integration and bargaining out of the box, at the cost of portability. The cookie-based integration depends on a valid session and continued platform compatibility. Compared with a support suite, the operational surface is much narrower: basic logs and manual takeover are available, but a web console is still planned and no direct commercial Xianyu substitute is verified.

Sending stored history to the model preserves continuity, but longer threads can increase token usage and expose more conversation data to an external provider. Routing and replies also inherit the endpoint's latency and availability. Test multi-turn bargaining and manual takeover before leaving it unattended, and check account automation rules and data handling separately from GPL-3.0 obligations on redistribution.

Hardware & Deployment Guide

The stated requirement is Python 3.8+. For a native installation, use an isolated environment, install requirements.txt, configure .env with API_KEY, COOKIES_STR, MODEL_BASE_URL, and MODEL_NAME, then launch python main.py. Prompt overrides can be supplied under prompts/; templates provide defaults. The agent host needs network access to Xianyu and the configured model endpoint. Self-hosting the application does not make it offline, nor does it require local GPU inference.

Compose runs shaxiu/xianyuautoagent:latest on a bridge network with restart: always and TZ=Asia/Shanghai. It mounts ./data, ./prompts, and ./.env at /app/data, /app/prompts, and /app/.env, respectively. No GitHub release is listed, so the latest tag is not a reproducible version pin. Record the tested image digest or source revision, protect the mounted credentials and chat data, and verify session recovery before unattended use.

Routing: Prompt-based intent classification and rules select bargaining, technical support, or default replies.
Conversation state: Stored chat history is supplied as LLM context for follow-up turns.
Seller control: A configurable keyword toggles between automated replies and manual handling.
Model endpoint: openai==1.65.5 with configurable MODEL_BASE_URL and MODEL_NAME; Qwen is the default.
Deployment: Compose bind-mounts ./data, ./prompts, and ./.env into /app with an always restart policy.
Operations: Basic logging is implemented; the web console and DingTalk integration are planned.
Best For

Xianyu sellers piloting supervised replies for common inquiries and routine bargaining who can manage account sessions and test reply behavior.

Skip If

You need offline operation, verified multi-channel support, mature administrative controls, or guaranteed pricing-policy enforcement.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodologyReport inaccuracy

Quick Start & Installation

DockerSelf-Hosted
1. 克隆仓库
git clone https://github.com/shaxiu/XianyuAutoAgent.git
cd XianyuAutoAgent

2. 安装依赖
pip install -r requirements.txt

3. 配置环境变量
创建一个 `.env` 文件,包含以下内容,也可直接重命名 `.env.example` :
#必配配置
API_KEY=apikey通过模型平台获取
COOKIES_STR=填写网页端获取的cookie
MODEL_BASE_URL=模型地址
MODEL_NAME=模型名称
#可选配置
TOGGLE_KEYWORDS=接管模式切换关键词,默认为句号(输入句号切换为人工接管,再次输入则切换AI接管)
SIMULATE_HUMAN_TYPING=True/False #模拟人工回复延迟

注意:默认使用的模型是通义千问,如需使用其他API,请自行修改.env文件中的模型地址和模型名称;
COOKIES_STR自行在闲鱼网页端获取cookies(网页端F12打开控制台,选择Network,点击Fetch/XHR,点击一个请求,查看cookies)

4. 创建提示词文件prompts/*_prompt.txt(也可以直接将模板名称中的_example去掉),否则默认读取四个提示词模板中的内容

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
XianyuAutoAgent ★9.9k+149PythonGPL-3.0Self-hosted Xianyu seller chat with LLM routing and stepwise bargaining
bisheng12.5k+71PythonApache-2.0Self-hosted AI workspace for enterprise agents, knowledge, and app publishing
hermes-agent267.4k+1.6kPythonMITSelf-hosted Python agent with persistent memory and automation across chat and C
dify162.2k+388Python—Visual workflow and RAG workspace for building and serving LLM apps

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/shaxiu/XianyuAutoAgent.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

shaxiu/XianyuAutoAgent Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about XianyuAutoAgent

Can I change how inquiries are routed without editing Python?

Use classify_prompt.txt to adjust intent classification and price_prompt.txt, tech_prompt.txt, or default_prompt.txt to tune the corresponding reply behavior. The configuration defines those roles; a general plugin or tool-registration interface is not established.

Does the Docker host need a GPU, and how should I size it?

The application sends inference requests to a configured model API, so the agent host does not need a GPU for that deployment. Size the host for concurrent conversations, retained data, and logs. If you also serve the model yourself, size that inference service separately for the chosen model and request load; there is no verified VRAM minimum.

Can a business self-host it or distribute a modified image?

The code is GPL-3.0, which permits commercial use. Distributing covered software can trigger source-code and license obligations; private operation generally does not trigger those distribution obligations. The license does not grant permission to automate Xianyu or govern what data your model provider may retain. Review both sets of platform terms before using real accounts and conversations.

When is this preferable to a generic chatbot framework or a managed support desk?

A general chatbot framework gives you a starting point for building channels and workflows, but you would have to implement the Xianyu integration and bargaining flow. A managed support desk is a better candidate if you primarily need agent queues, auditability, or service guarantees, but verify Xianyu support separately. No direct commercial substitute with verified Xianyu integration was identified.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining shaxiu/XianyuAutoAgent? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature shaxiu/XianyuAutoAgent on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare