<- back to cases
Python/MIT

LangGraph Financial Swarm

投研报告动辄几十页、引用链路散落十几个文件,谁来读、谁来核、结论怎么追溯?五个 AI 专家分头扒数据、交叉验证、最后合成可追溯的结论:宏观分析师讲周期、行业研究员拆赛道、公司专家读财报、风险官挑漏洞、PM 把结论落到投资决策。每一段结论都标注原始出处和推理路径,监管和合规可以直接审计。整套系统用 LangGraph 编排 + 本地 LLM,企业内网就能跑,数据不出域。适合券商研究所、买方投研、家族办公室,把分析师从 60% 的重复劳动里解放出来,专注真正的判断。

stars
0
commits
1
size
117 KB
specialists
5 agents
LangGraph Financial Swarm — generated poster
OG POSTERcase file
case study
problem

Investment research needs traceable specialist reasoning, but a single model answer often mixes assumptions, sources, and risk judgments into an opaque narrative.

approach

I modeled the workflow as a LangGraph state machine with specialist nodes, shared state, checkpointing, and a final arbiter step.

outcome

The project demonstrates how financial analysis can become replayable, branchable, and easier to audit when agent roles are explicit.

my role
  • 01Modeled the specialist-agent workflow and shared state transitions.
  • 02Built the local-first Python orchestration flow.
  • 03Focused the architecture on replayability, isolation, and analyst trust.
why it matters

Financial research is a conversation between specialists, not a single prompt — a LangGraph state machine orchestrates five agents (macro, equity, fundamental, sentiment, risk) that debate and refine a thesis before producing a final report.

architecture

Stateful LangGraph workflow with shared memory. Each specialist reads the running thesis, contributes a section, and writes back. A final arbiter agent reviews coherence and produces the deliverable. All steps are checkpointed for replay.

notes
  • 01Stateful LangGraph — every node is checkpointed; you can resume, replay, or branch the workflow at any step.
  • 02Specialist isolation — each agent has a focused system prompt and a constrained tool set, which keeps hallucinations bounded.
  • 03Local LLM workflows — runs against Ollama/vLLM with no API keys; designed for analysts who can't ship data to the cloud.
stack
Python 3.11+
Runtime
LangGraph
State machine orchestration
Ollama / vLLM
Local LLM serving
Pydantic 2
State schema + validation
headline
specialists
5 agents
repo
117 KB