A multi-agent financial research system built with LangGraph Supervisor. Ask a question in natural language and a team of 4 specialist agents fetches real-time data, analyzes it from different angles, and produces a structured Markdown investment report.
Natural language query
↓
Supervisor LLM
(orchestrates the team)
↓
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Fundamental │ │ Technical │ │ Sentiment │
│ Analyst │ │ Analyst │ │ Analyst │
│ P/E, margins, │ │ Price history, │ │ News headlines, │
│ ATH, tokenomics │ │ trend, volatility│ │ market themes │
└─────────────────┘ └──────────────────┘ └──────────────────┘
↓
Report Writer
(synthesizes all findings)
↓
Markdown report with:
- Executive summary
- Comparative data table
- Per-asset analysis
- Risk assessment
- Investment recommendation
finance-deep-agent/
├── tools/
│ ├── stock_tools.py ← yfinance tools (price, fundamentals, history, news)
│ └── crypto_tools.py ← CoinGecko tools (price, fundamentals, history)
├── agents.py ← 4 specialist agents defined with create_react_agent
├── supervisor.py ← Supervisor graph + CLI entry point
├── reports/ ← Generated reports saved here
└── requirements.txt
uv venv uv pip install -r requirements.txt
Create a .env file:
ANTHROPIC_API_KEY=your-key-here # Optional: LangSmith tracing LANGCHAIN_TRACING_V2=true LANGCHAIN_API_KEY=your-langsmith-key LANGCHAIN_PROJECT=finance-supervisor
python supervisor.py
python supervisor.py -q "Analyze AAPL for long-term investment" python supervisor.py -q "Compare MSFT vs NVDA" python supervisor.py -q "Compare BTC vs ETH — which is better for 2026?" python supervisor.py -q "Compare AAPL vs BTC vs ETH"
Reports are saved automatically to reports/.
| Agent | Tools | Role |
|---|---|---|
fundamental_analyst |
get_stock_price, get_stock_fundamentals, get_crypto_price, get_crypto_fundamentals |
Valuation, P/E, margins, ATH, tokenomics |
technical_analyst |
get_stock_history, get_crypto_history |
Price trends, momentum, volatility |
sentiment_analyst |
get_asset_news |
Recent news headlines, market themes |
report_writer |
(none) | Synthesizes all findings into a Markdown report |
The system uses the Supervisor pattern from langgraph-supervisor:
- The Supervisor LLM receives the user query and decides which agent to call first
- Each specialist agent runs independently with only the tools it needs
- After all 3 analysts finish, the Report Writer reads the full conversation and synthesizes the final report
- The supervisor returns the report writer's output as the final result
Unlike a single ReAct agent that does everything, each specialist here has a focused context — fewer tools, clearer role, better output quality.
- Stocks: any valid ticker (AAPL, MSFT, NVDA, TSLA, ...)
- Crypto: BTC, ETH, BNB, SOL, XRP, ADA, DOGE, DOT, AVAX, MATIC (or any CoinGecko id)
- LangGraph — agent graph runtime
- langgraph-supervisor — supervisor orchestration pattern
- LangChain Anthropic — Claude Haiku
- yfinance — Yahoo Finance data (stocks + news)
- httpx — CoinGecko API calls (crypto)