explaingit

numb94/crewai-astock

25PythonAudience · developerComplexity · 4/5ActiveLicenseSetup · moderate

TLDR

A CrewAI multi-agent system for studying China A-share stocks, with seven cooperating agent roles, a Flask plus Vue web panel, and SQLite storage. Not wired to a live broker.

Mindmap

mindmap
  root((crewai-astock))
    Inputs
      A share market data
      News feeds
      User watchlists
      DeepSeek key
    Outputs
      Stock recommendations
      Position monitoring
      Candlestick charts
      WeChat push alerts
    Use Cases
      Study multi agent design
      Backtest agent picks
      Track personal holdings
      Generate research notes
    Tech Stack
      Python
      CrewAI
      Flask
      Vue
      SQLite

Things people build with this

USE CASE 1

Study how CrewAI orchestrates seven cooperating agents on a shared task

USE CASE 2

Run paper-trading style A-share analysis with DeepSeek as the reasoning model

USE CASE 3

Build a custom dashboard on top of the Flask plus Vue web panel

USE CASE 4

Plug a different stock data source in place of AKShare or Zhitu

Tech stack

PythonCrewAIFlaskVueSQLiteDeepSeekAKShare

Getting it running

Difficulty · moderate Time to first run · 30min

Needs Python 3.10 plus a DeepSeek API key, a virtual environment, database init, and an optional ticker import before the web panel is useful.

MIT license, so you can use, modify, and ship it commercially as long as you keep the copyright notice.

In plain English

CrewAI A-Stock is a research and learning project that uses a team of cooperating AI agents to analyze and recommend stocks listed on mainland China's A-share market. The README opens with a strong disclaimer: the project is for personal study and exploration of multi-agent patterns only, the AI outputs are not guaranteed to be accurate, and the code does not include any real trading interface, so it must not be used to move real money. The system is built on a framework called CrewAI, which lets you define a group of AI agents and have them cooperate on a task. This project defines seven roles: a review analyst that looks back at past recommendations, a market reporter that watches news and conditions, a stock picker that maintains a candidate pool, a multi-dimensional analyst covering technicals, capital flows, fundamentals, news, intraday data, and community sentiment, a risk manager with veto power, an investment decision agent that produces final scores and position sizes, and a position monitor that watches existing holdings and suggests sell points. These agents are grouped into three workflows: a recommendation crew, a single-stock evaluation crew, and a holdings monitoring crew. On top of the agents sits a web management panel built with Flask, Vue 3, Element Plus, and ECharts charts. It supports multiple users with thirty-day session isolation, shows real-time candlestick charts with recommendation markers, streams AI output through server-sent events, and tracks holdings, trades, and performance. Optional WeChat push notifications go through a service called PushPlus. A separate long-term memory feature uses BAAI bge-m3 embeddings on the SiliconFlow platform so that the crew can accumulate strategy lessons across runs. For the language model side the project uses DeepSeek for reasoning and optionally Grok for real-time news and social sentiment. Stock data comes from AKShare, a free open data library that needs no key, with an optional paid Zhitu API as a more stable alternative. News fallback uses Tavily. The storage layer is SQLite accessed through SQLAlchemy with fifteen tables. Getting it running needs Python 3.10 or newer. You clone the repo, set up a virtual environment, install requirements, add at least a DeepSeek key to the env file, initialize the database, optionally load basic info for around 5,161 A-share tickers, then start app.py on port 5000. The README also lists features removed from the open-source build, such as live broker integration with Tonghuashun or QMT and automatic buy and sell loops. The license is MIT.

Copy-paste prompts

Prompt 1
Walk me through the seven CrewAI agent roles in crewai-astock and which crew workflow each one belongs to
Prompt 2
Show how to swap DeepSeek for a local Ollama model in crewai-astock without breaking the prompts
Prompt 3
Write a script that initializes the SQLite database and loads the 5161 A-share tickers from AKShare
Prompt 4
Add a new agent role to crewai-astock that scans dividend history and surfaces high yield candidates
Prompt 5
Explain how the SSE stream from app.py pipes AI tokens into the Vue front end
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.