TradingAgents-AShare: a 14-agent A-share research pipeline you host yourself
A 股多智能体智能投研系统 — 基于 TradingAgents 架构,15 名 AI Agent 模拟机构协作与实时辩论对抗,全流程可视化,支持 OpenClaw / Claude Code 集成,Docker 一键部署。
At a glance
- What is it?
- TradingAgents-AShare wraps the TradingAgents multi-agent debate pattern in a FastAPI service, a Vue frontend and a SQLite-backed scheduler, aimed at Chinese A-share symbols. The architecture is legible and the deployment is short, but the licence is split and the README is thinner than its feature list.
- Who is it for?
- Adopt it if you want a self-hosted A-share research pipeline and you are comfortable reading Python to learn how the agents are wired, because the README describes features but not the internals. Do not adopt it for anything commercial without reading LICENSE first: the new api/ and frontend/ modules are PolyForm Noncommercial 1.0.0, not Apache 2.0.
- 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 last received commits 19 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 6, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem is orchestration, not prediction
A single LLM asked to analyse 600519.SH produces one confident paragraph. The interesting failure is that you cannot see which claim it leaned on. TradingAgents-AShare attacks that by splitting the work across named roles and recording the disagreement between them. The README describes a pipeline that starts with six analyst agents working in parallel: fundamentals, sentiment, news, technicals, macro, and main-force capital flow. Their outputs feed two researcher agents, one long and one short, who argue over claims rather than prose, after which a research director issues a ruling. A trader converts that ruling into an executable plan, three risk agents (aggressive, neutral, conservative) debate it, and a portfolio manager makes the final call. The README says the full flow contains 14 agents and that the diagram shows only the core nodes. The audience is a Chinese-market retail or semi-professional investor who already has an LLM API key and is willing to run a container. It is not a screener, not a backtester, and it does not place orders.
Where the data actually comes from is the gap
The README is precise about agent roles and vague about inputs. It says the analyst team performs extraction and initial assessment on market data, and the feature list mentions real-time prices, the day's range, and position P&L on the tracking board. What it never states is which vendor or endpoint supplies A-share quotes, fundamentals, news, or capital-flow data, whether that source needs its own key, or what happens when it returns nothing. For a system whose entire value rests on the quality of its inputs, that is the largest documentation hole. A reader can infer that the data layer exists because the frontend shows live prices, but cannot verify its coverage, its latency, or its behaviour on a suspended stock. If you are evaluating this project, that is the first question to answer from the source tree, not the last.
Docker Compose is the intended path, and it is short
The README recommends Docker and gives two routes. The Compose route clones the repository, exports a secret, and brings the stack up: run `export TA_APP_SECRET_KEY=$(openssl rand -base64 32)` then `docker compose up -d`. The image starts the API service and the scheduled-task dispatcher in the same container, so scheduled analysis works without Redis. If you want the API, the scheduler and Redis in separate containers, the repository ships `docker-compose.split.yml` and points at `guide/deployment.md`. The plain `docker run` route pulls `ghcr.io/kylinmountain/tradingagents-ashare:latest`, mounts `$(pwd)/data` at `/app/data`, and passes `DATABASE_URL="sqlite:///./data/tradingagents.db"` plus the secret. The README is explicit that without the volume mount, historical reports, user configuration and tokens are lost when the container is deleted. Two configuration details matter more than they look. First, `TA_APP_SECRET_KEY` encrypts stored LLM API keys and signs login JWTs; the README says an unset value falls back to a built-in default suitable only for local development, and that once set it must not change. Second, LLM providers are configured in the browser settings page, not through environment variables, and the README notes that saving triggers a model warmup and that the settings page can send a literal "你好" to inspect the raw model response.
Source install and the REST surface
The source path needs Python 3.10+, uv, Node.js 18+ and npm. Backend setup is `uv sync`; frontend is `cd frontend && npm install && npm run build`. Copy `.env.example` to `.env`, then start with `uv run python -m uvicorn api.main:app --port 8000`. For frontend work, writing `VITE_API_URL=http://localhost:8000` into `frontend/.env` and running `npm run dev` serves on port 5173 against the backend on 8000. The HTTP surface is job-based rather than synchronous: `POST /v1/analyze` returns a `job_id`, `GET /v1/jobs/{job_id}` reports status, and `GET /v1/jobs/{job_id}/result` returns the payload. Around that sit `GET /v1/reports`, `POST /v1/reports/latest-by-symbols`, portfolio import endpoints under `/v1/portfolio/imports`, `GET /v1/dashboard/tracking-board`, batch scheduler operations at `PATCH /v1/scheduled/batch` and its delete and trigger siblings, and `POST /v1/config/warmup`. Authentication is a bearer token generated in the settings page, passed as `Authorization: Bearer <TOKEN>`. The README's own example posts a natural-language string as the symbol field: `{"symbol": "分析一下600519.SH短期趋势", "trade_date": "2026-03-28"}`. That is worth noting. The field is named `symbol` but accepts an instruction, and the README does not document what the parser does with an ambiguous sentence or a symbol it does not recognise.
The licence is split, and that decides most adoption questions
The repository's licence is reported as NOASSERTION, and the README explains why. The project is a derivative of TauricResearch/TradingAgents, which is Apache 2.0. The new modules, `api/` and `frontend/`, and what the README calls deep modifications to the core logic, are released under PolyForm Noncommercial 1.0.0. That is a non-commercial licence. Anyone planning to run this inside a fund, a brokerage, or a paid signal service is in territory the README explicitly reserves, and the README points to the root LICENSE file for the boundary between the two. I am not giving legal advice, and the README does not spell out which files fall on which side beyond the two directories. Treat the split as the single most consequential fact about this project after the data-source question. It also interacts with the affiliate links in the README, which promote a third-party API relay service; the project is monetising distribution while licensing the code non-commercially, which is a legitimate but unusual arrangement.
Limitations the README admits, and one it does not
The stated limitations are honest. The system is for study and demonstration and is not investment advice, and the README says any output reflects an algorithmic debate rather than real P&L. Scheduled analysis reuses position context and disables itself after repeated failures, which means a silently broken data source can quietly stop your schedule rather than alert you. The default secret key is unsafe outside local development. The unstated limitation is verification. Nothing in the material describes a ground-truth comparison, a backtest, or a measured accuracy figure for the debate output. The decision card shows direction, confidence, a target price and a stop price, but the README never says how confidence is computed or whether the target price comes from the model or from a deterministic rule. If you need a system whose outputs you can audit numerically, this is the wrong tool. It is also the wrong tool if your universe is not A-shares: the six analyst dimensions and the capital-flow agent are framed around the Chinese market, and nothing in the README suggests they generalise.
How it differs from calling an LLM directly, and from the upstream project
The obvious alternative is a single prompt to Claude or GPT with a few price screenshots, and the difference is structural rather than qualitative. A single call gives you one voice and no record of what it rejected. This project gives you a persisted report per symbol and date, retrievable through `GET /v1/reports`, plus a debate drawer that streams each agent's argument token by token, grouped by round, with the ruling rendered as a separate card. Whether that extra structure produces better calls is unproven here, but it does produce an artefact you can re-read. The second alternative is upstream TauricResearch/TradingAgents itself. The README credits it as the source of the core architecture and part of the base logic. The difference is the wrapper: this fork adds the FastAPI service, the Vue frontend, the SQLite schema, the scheduler, position import, the tracking board, and the OpenClaw skill `tradingagents-analysis`. If you want the agent graph without a web application, the upstream repository is Apache 2.0 throughout and avoids the non-commercial question entirely. If you want a running product rather than a library, this is the shorter path, at the cost of the licence split.
Maintenance cost and what to check on upgrade
The release cadence visible in the material is uneven: v0.8.0-rc10 in April 2026, v0.8.0 in May, v0.8.1 in July, and the last push in September 2026. That is a project still moving, which means the Docker image tag `latest` is not a stable pin. For a self-hosted deployment, pin a version tag rather than tracking `latest`, and keep the `data` volume on a path you back up, because the SQLite file holds reports, users, and encrypted API keys. The README references `guide/deployment.md` for upgrade and migration topology from older images, so read that before pulling. Model cost is the other recurring expense and it is not a fixed number: 14 agents, each producing streamed output, run per analysis, and the README's own affiliate copy quotes a relay multiplier of `0.06` without stating what it multiplies. Budget by measuring your own token usage per run, since the material gives no figure. On the licence side, the non-commercial restriction on `api/` and `frontend/` does not expire and does not depend on how you deploy, so a commercial user cannot escape it by self-hosting.
Editorial conclusion
Adopt it if you want a self-hosted A-share research pipeline and you are comfortable reading Python to learn how the agents are wired, because the README describes features but not the internals. Do not adopt it for anything commercial without reading LICENSE first: the new api/ and frontend/ modules are PolyForm Noncommercial 1.0.0, not Apache 2.0. Verify three things before trusting an output: which model provider you pointed it at, whether TA_APP_SECRET_KEY was set before first boot (it cannot be changed later), and whether the data volume is actually mounted, since an unmounted /app/data loses reports and tokens when the container is removed.
Frequently asked questions
What is the TradingAgents multi-agent LLM financial trading framework?
It is an upstream multi-agent framework that simulates the department collaboration of a real trading institution, splitting a complex task into specialist agent roles. This repository is a secondary development of it for the A-share market, adding six parallel analyst dimensions, a bull and bear claim-driven debate arbitrated by a research director, a trader, three risk positions and a portfolio manager, for fourteen agents in total.
What is a trading agent?
In this system it is one role in a pipeline rather than an independent system: an analyst extracts and assesses data on one dimension, a bull or bear researcher argues a named claim against the other side, a director arbitrates, a trader turns the plan into something executable, three risk positions review it, and a portfolio manager decides. Six analysts, two researchers, a director, a trader, three risk agents and a portfolio manager make fourteen.
How is TradingAgents-AShare deployed?
With Docker Compose or a plain container run. The compose path clones the repository, exports an application secret and brings the stack up; the image runs the API service and the scheduler in one container with a mounted data directory and no Redis. Splitting the API, scheduler and Redis into three containers uses a second compose file. A source install needs Python 3.10 or newer, uv, Node.js 18 or newer and npm.
What does the application secret in TradingAgents-AShare protect?
It encrypts each user's model API key and signs the login tokens issued to them. If it is not set a built-in default is used, which is described as suitable only for local development, and the documentation states that in production it must be set and cannot be changed. The compose file refuses to start without it.
Can you make money with AI trading using TradingAgents-AShare?
The project makes no such claim. Its disclaimers state that it is for study, research, demonstration and exchange, that it is not investment advice in any form, that securities markets carry risk, and that the data sources it depends on may be delayed or biased so exchange announcements are authoritative. What it produces is a structured report with a direction, a confidence figure, a target price and a stop-loss price.
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/kylinmountain-tradingagents-ashare)