easy_investment_Agent_crewai: Four CrewAI Agents Over AKShare for A-Share Research
基于AKShare和CrewAI的A股智能分析平台,通过多Agent协作提供专业的A股投资分析。 🚀 项目特色 📊 全面的A股数据分析:实时行情、财务数据、资金流向、市场情绪 🤖 多Agent协作:4个专业化AI角色协同工作 🇨🇳 A股市场特色:针对中国股市特点优化分析 📈 专业分析工具:基于AKShare的专业数据源 🎯 智能投资建议:综合分析提供投资决策参考
At a glance
- What is it?
- A Python project that wires four CrewAI roles to AKShare data for mainland China equity analysis. It is a research scaffold, not a trading system, and its defaults point at a Hong Kong listing rather than an A-share.
- Who is it for?
- Adopt it if you already run CrewAI and want a worked example of A-share data plumbing through AKShare, and if you are willing to edit config/agents.yaml, config/tasks.yaml and the inputs dict in main.py before the first run. Do not adopt it as a signal generator or as anything that touches order flow.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 132 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 September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The gap this fills: A-share context that generic LLM agents ignore
Most agent demos are written around US equities. They assume continuous trading, no daily price bands, and English-language filings. The A-share market does not work that way, and the README for this project says so directly: it lists policy impact analysis, price-limit (涨跌停) effects, retail investor sentiment, and capital rotation as A-share specific features the agents are meant to reason about. The intended user is someone who wants an LLM pipeline that already speaks in terms of 主力资金 and 北向资金 rather than institutional ownership percentages. That framing is the project's actual contribution. The four roles are not novel on their own; what is specific is that their prompts and tool descriptions are written for a market with daily limits and state-directed policy signals. If you are analysing US or European equities, none of this applies to you and the tooling will get in the way.
Four agents, four tool groups, and one sequential handoff
The architecture is a flat crew of four named roles. A market analyst covers technical, policy and capital-flow angles. A financial statement specialist handles ratios, trend analysis and peer comparison. A sentiment researcher works on fund flows, news tone and technical sentiment. An investment adviser consumes the other three and produces strategy and risk control. Underneath sit four tool groups: A-share data tools for quotes, history and financial indicators; financial analysis tools for deeper ratio work and peer comparison; sentiment tools for fund flow and news; and a calculator tool the README describes as safe math evaluation. The calculator is the interesting detail. It exists because LLM arithmetic is unreliable, so the crew is expected to route numeric work through a tool rather than let the model compute. Whether the agents actually call it consistently is a prompt-engineering question the repository does not answer. The handoff appears to be sequential: the adviser is described as doing comprehensive analysis, which only makes sense if it runs after the other three.
Getting it running: Poetry, uv, and the .env step
The README requires Python 3.12 or newer and recommends Poetry. The clone command in the documentation is generic, and the directory it changes into is stock_analysis_a_stock, which does not match the repository name. Expect to adjust that. Dependencies install either with poetry install --no-root or with uv sync, which the README says creates the virtual environment and installs everything. Then cp .env.example .env and edit it. The README does not enumerate the keys in .env.example, so you will have to read the file to find out whether it expects an API key, a model name, or both. Running the analysis is poetry run python src/a_stock_analysis/main.py, or poetry run a_stock_analysis if the script entry point was installed. Note the --no-root flag on the Poetry install: it skips installing the project itself as a package, which is consistent with the script being invoked by path.
Configuration lives in YAML, and the default target is not an A-share
Two files carry most of the behaviour. config/agents.yaml defines each agent's role, goal and backstory. config/tasks.yaml defines what each analysis task must produce and in what format. Neither is described in detail beyond that, so tuning the crew means reading both files. Switching models happens in src/a_stock_analysis/crew.py, where the README shows two options: a local Ollama instance with model llama3.1, and OpenAI's ChatOpenAI with model gpt-4. The README presents Ollama as the default. That is worth checking in the source, because the two paths have different failure modes: a local llama3.1 will be slower and weaker at Chinese financial text, while gpt-4 sends your prompts and any embedded financial data to a third party. The bigger surprise is the default target. The README states the system analyses 腾讯控股 (00700.HK) by default, a Hong Kong listing, even though the project is positioned around A-shares. To analyse an A-share you edit the inputs dict in main.py: company_name, stock_code and market, where market is SH, SZ or HK. Supported formats are 600519.SH for Shanghai, 000001.SZ for Shenzhen, and 00700.HK for Hong Kong.
Where it breaks: data-source coupling and the missing evaluation story
The whole data layer is AKShare. That is a single point of failure with no fallback described in the README. AKShare scrapes and wraps public Chinese financial endpoints, and those endpoints change, rate-limit, or return differently shaped payloads without warning. If an upstream field is renamed, a tool returns empty or malformed data, and the agent downstream has no way to distinguish a genuine zero from a fetch failure. Nothing in the README describes validation, retries, or caching. There is also no evaluation harness. The project lists what the agents should analyse, but not how you would check whether an output is correct, and the risk disclaimer concedes the point: the system is stated to be for study and research only and not to constitute investment advice. Treat any output as a draft that a human must check against primary filings. Finally, the licence situation is contradictory. The README's licence section says MIT, but the repository metadata carries no licence identifier. Until a LICENSE file is visible, the actual grant is unclear, and that matters more than usual for a project whose outputs people might paste into a workflow.
The alternative: a plain script over AKShare, or an agent framework you already run
The honest comparison is not another multi-agent stock project. It is a single Python script that calls AKShare directly. If your question is narrow, say pulling 600519.SH daily bars and computing a moving average, an LLM crew adds latency, token cost, and a new class of error (the model misreading a number it was handed) without adding analytical power. AKShare is the same data source either way; the crew only changes how the numbers are interpreted. The other alternative is CrewAI itself without this repository's opinions. If you already have a crew, the reusable parts here are the A-share tool wrappers and the four role prompts, and you can lift those into your own config rather than adopting the whole project shape. The difference in approach is that this repository hardcodes a fixed four-role division of labour and a fixed task set in YAML, whereas a general framework leaves that to you. Fixed is faster to start and harder to bend.
Maintenance cost and what the licence actually grants
Maintenance burden here is dominated by AKShare, not by CrewAI. Every upstream schema change is your problem, and the repository provides no test suite or fixture data that would catch a break before you notice it in an analysis run. The last push recorded for the default branch is 2026-05-07, with no releases retrieved, so there is no versioned artifact to pin against; you are tracking main. Model drift is the second cost. The README's example pins gpt-4, a model name that will age, and the Ollama path pins llama3.1, which you will want to swap for a model with better Chinese financial comprehension. On licensing: the README states MIT, which if accurate is permissive and imposes only attribution and notice requirements. But repository metadata lists no licence, so the claim is unverified. Check for a LICENSE file at the repository root before you redistribute anything. This is a description of what the material says, not legal advice.
Editorial conclusion
Adopt it if you already run CrewAI and want a worked example of A-share data plumbing through AKShare, and if you are willing to edit config/agents.yaml, config/tasks.yaml and the inputs dict in main.py before the first run. Do not adopt it as a signal generator or as anything that touches order flow. Before committing, verify which model the crew actually instantiates in src/a_stock_analysis/crew.py, confirm the licence file is present despite the README's MIT claim, and check that the AKShare endpoints behind 600519.SH still return the fields the financial tools expect.
Community notes