TradingAgents-CN: a multi-agent A-share research assistant whose app layer is source-available, not open source
A Chinese financial trading framework based on multi-agent LLMs - the Chinese-enhanced version of TradingAgents.
At a glance
- What is it?
- hsliuping/TradingAgents-CN adapts the Tauric Research TradingAgents idea to China's A-share market, with debating analyst agents, natural-language stock screening and paper trading on a FastAPI, Vue 3, MongoDB and Redis stack. Its license splits the code in two, several features are Pro-only, and the shipped config files reuse one sample password across services.
- Who is it for?
- TradingAgents-CN fits Chinese-speaking learners and researchers who want to study how LLM agents can be arranged into a debate-style stock research workflow for A-shares, on their own machine, for personal or educational use. It does not fit anyone who wants to build a commercial product on its web app, redistribute it, or cover markets beyond A-shares.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- hsliuping/TradingAgents-CN32,955 ★ · +1,187
| Repository | 2026-09-13 | 2026-11-14 |
|---|---|---|
| hsliuping/TradingAgents-CN | 31.8k | 33k |
1,187 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Only the agent library is Apache-2.0; the web app is source-available
GitHub reports the license as NOASSERTION, and the reason is a deliberate hybrid. The Apache-2.0 part covers tradingagents/ (the trading agent library), cli/, docs/ and tests/, which you can use, modify and redistribute. The proprietary, source-available part covers app/ (the backend application), frontend/ (the frontend application) and core/ (the core feature layer). For those directories the source is visible and personal use, evaluation and educational use are allowed, but redistribution and commercial use are prohibited; commercial licensing goes through the author. Submitting a contribution means agreeing to a contributor license agreement described in CONTRIBUTING.md.
The consequence is concrete. The parts most people run, the FastAPI backend and the Vue frontend, are the parts you cannot ship inside a product or host for paying customers. If you only want the agent orchestration for your own code, the Apache-2.0 tradingagents/ package is the piece you can build on freely. A fork of the full application stays bound by the source-available terms.
Scheduled and batch analysis, report export and the Agent workshop are Pro-only
The Community Edition includes single-stock research, general research, stock screening, the learning center with its free courses, paper trading and the Skill center. Single-stock research runs a debate between agents, with five depth levels and multiple scenario views. Roles include market, sector, fundamentals and news analysts and optimistic and cautious researchers. Screening combines natural language with conditions across more than 6000 stocks.
The Pro edition, under a commercial license, adds features the Community Edition does not have: an Agent workshop for creating, publishing and managing custom agents, a trading system for building, optimizing and debugging strategy templates, scheduled analysis and batch analysis, professional report export in Word and PDF formats, and an advanced course track of eight stages. If your workflow depends on running analyses on a timer or across a whole watchlist in one job, those are exactly the features the Community Edition leaves out. Pro access is described as available through the project homepage or by contacting the author.
MongoDB and Redis are prerequisites you install and secure yourself
The project does not bundle a database. Before anything else you need MongoDB 7.0 or newer (8.0 recommended) and Redis 6 or newer (7 recommended), alongside Python 3.11 and Node.js 18 or newer. Per-platform routes are listed: the MongoDB installer as a service on Windows with Redis running inside WSL or a compatible implementation such as Memurai, Homebrew services on macOS, and apt with systemctl for Redis on Ubuntu and Debian. If Docker is already installed, the two databases can run in containers:
docker run -d --name ta-mongo -p 27017:27017 \
-e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=<你的密码> mongo:8.0
docker run -d --name ta-redis -p 6379:6379 \
redis:7-alpine redis-server --requirepass <你的密码>MongoDB must have authentication enabled with authSource=admin and an admin account you create. Whatever usernames, passwords, hosts and ports you choose must match the .env file, with localhost:27017 and localhost:6379 as the local defaults. A mismatch here is the first thing to check when the backend refuses to start, because the MongoDB and Redis settings are marked as required for startup.
Startup runs a Python backend on port 8000 and a separate frontend on 3000
With the databases running, the start sequence is a virtual environment, a copied .env file, the backend under uvicorn and the frontend under npm:
# 1. 克隆
git clone <本仓库地址>
cd TradingAgents-CN
# 2. 后端环境(Python 3.11)
python -m venv env
env\Scripts\activate # Windows
source env/bin/activate # Linux / macOS
pip install -r requirements.txt
# 3. 配置(必填 MongoDB / Redis / JWT_SECRET,详见 .env.example 注释)
copy .env.example .env # Windows
cp .env.example .env # Linux / macOS
# 4. 启动已安装好的 MongoDB / Redis(账号密码与 .env 保持一致)
# 5. 启动后端(默认 8000 端口,与前端默认代理一致)
uvicorn app.main:app
# 6. 启动前端
cd frontend
npm install
npm run dev # 默认 http://localhost:3000The backend defaults to port 8000, which matches the frontend's default proxy, and the frontend serves on http://localhost:3000. On first start the backend initializes itself without any import scripts: it loads system configuration such as the model catalog, prompt templates, agent configuration and workflows, and if the user table is empty it creates an admin account whose password is ADMIN_DEFAULT_PASSWORD from .env. After logging in you still have to add an LLM API key, with OpenAI, DeepSeek and Qwen named as options, and the market data tokens you need.
One inconsistency is worth knowing. The quick start uses pip install -r requirements.txt, but requirements.txt itself opens with a note that it is deprecated in favor of pyproject.toml, recommending pip install -e . or uv pip install -e . instead. The two lists differ: requirements.txt includes streamlit and google-genai, for example. If an import fails after following the quick start, try the pyproject route.
The sample configs reuse one password across MongoDB, Redis and Compose
The shipped configuration files are written for a quick local start, not for exposure to a network. In .env.example, MONGODB_USERNAME is admin and both MONGODB_PASSWORD and REDIS_PASSWORD are set to tradingagents123. JWT_SECRET and CSRF_SECRET are placeholder strings that say change-in-production, and the comment asks for a random JWT secret of at least 32 characters, generated with Python's secrets.token_urlsafe. Access tokens expire after 60 minutes and refresh tokens after 30 days.
docker-compose.yml goes further and hardcodes the same credentials into the backend's connection strings: TRADINGAGENTS_MONGODB_URL points at mongodb://admin:tradingagents123@mongodb:27017 and TRADINGAGENTS_REDIS_URL uses the same password. It also publishes the backend on port 8000 and allows CORS from localhost ports 3000, 8080 and 5173.
If you copy these files and start the stack on a machine reachable from other hosts, the database password and JWT signing secret are the publicly known sample values. Change every secret in .env, edit the Compose environment block to match, and set ADMIN_DEFAULT_PASSWORD before the first start, since the admin account is created from it.
Version labels disagree between the README and the build files
The README tells the version story in four steps. v1.0 was a multi-agent analysis tool with single-stock and batch analysis. v2.0 unified the analysis engine with a visual workflow and added position analysis and reviews. v2.1 aligned reports, prompt templates and UI text with a research-assistant positioning and added new models. v3.0 turned it into an AI assistant with natural-language screening, agents that plan their own analysis and Skill extensions, on a FastAPI, Vue 3, MongoDB and Redis architecture.
The build files tell a different story. pyproject.toml names the package tradingagents at version 1.0.0-preview with a placeholder description, and docker-compose.yml labels itself v1.0.0-preview and tags its images tradingagents-backend:v1.0.0-preview and tradingagents-frontend:v1.0.0-preview. The repository has no GitHub releases, and the last push was on 2026-09-22. In practice, there is no tagged version to pin; you track a commit on the main branch, and you should not read the image tag as a guide to which feature set you are running.
A-shares only, research output only, and data that needs your own tokens
The disclaimer limits the scope tightly. The system supports research on the A-share market only. Its output is AI-generated research reference, not investment advice, and it does not provide target prices, stop-loss or take-profit levels, or buy and sell timing. If you were hoping for a signal generator or a trading bot, this is not one.
Market and financial data come from public interfaces including Tushare, AKShare and BaoStock, and you register for tokens yourself. The dependency list also includes yfinance, finnhub-python and eodhd. Network setup matters if you sit behind a proxy: .env.example suggests routing foreign services such as Google AI through HTTP_PROXY while sending domestic data sources such as eastmoney.com and api.tushare.pro direct via NO_PROXY, and warns that Windows does not accept the * wildcard there, so each domain has to be spelled out in full.
The project credits Tauric Research's TradingAgents as the original multi-agent trading framework. Contributions are accepted by pull request only, and the README states that project income does not yet cover basic costs, so contributors are volunteers for now.
Editorial conclusion
TradingAgents-CN fits Chinese-speaking learners and researchers who want to study how LLM agents can be arranged into a debate-style stock research workflow for A-shares, on their own machine, for personal or educational use. It does not fit anyone who wants to build a commercial product on its web app, redistribute it, or cover markets beyond A-shares. Before installing, read the LICENSE split, budget for your own MongoDB, Redis, LLM keys and data tokens, and replace every sample password and secret.
Frequently asked questions
What is TradingAgents: Multi-Agents LLM Financial Trading Framework, and how does TradingAgents-CN relate to it?
TradingAgents by Tauric Research is the original multi-agent trading framework that TradingAgents-CN credits. TradingAgents-CN is a Chinese-enhanced version that focuses on A-share research with debating LLM analyst agents.
Is TradingAgents-CN open source?
Only partly. tradingagents/, cli/, docs/ and tests/ are Apache-2.0, while app/, frontend/ and core/ are source-available for personal, evaluation and educational use, with redistribution and commercial use prohibited.
Does TradingAgents-CN need MongoDB and Redis?
Yes. TradingAgents-CN requires MongoDB 7.0 or newer and Redis 6 or newer, which you install yourself, plus Python 3.11 and Node.js 18 or newer.
Does TradingAgents-CN give buy or sell signals?
No. TradingAgents-CN produces AI-generated research reference for A-shares only and does not provide target prices, stop-loss or take-profit levels, or trade timing.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/hsliuping-tradingagents-cn)Star history chart for your README
[](https://hysenlabs.com/projects/hsliuping-tradingagents-cn)Was this useful?