A multi-agent stock research system built with LangGraph and served with FastAPI. It generates a structured analyst-style report using persistent RAG (ChromaDB) and analytics storage (SQLite).
- Takes a single input: a stock ticker (for example,
AAPL). - Collects data using multiple agents (news, transcripts, financials, sentiment, and macro).
- Normalizes and ranks signals, checks for contradictions, then writes a thesis and final report.
- Adds an audit block and a legal disclaimer to the output.
- Python 3.11+
- A
.envfile (see./.env.example)
Optional for full LLM-powered output:
OPENAI_API_KEYOPENAI_MODEL(optional)TAVILY_API_KEYif you enable live news/social/financial modes
- Install dependencies:
pip install -e .- Configure environment variables:
cp .env.example .envIf you do not set OPENAI_API_KEY, the app will run with mock signals and template text.
- Seed RAG documents (so retrieval has content to use):
python -m app.bootstrap- Start the API server:
uvicorn app.api.main:app --reload- Open the UI:
http://localhost:8000/
python examples/run_example.pyOPENAI_API_KEY: enables the full LLM experienceOPENAI_MODEL: defaults togpt-4o-miniNEWS_DATA_MODE: set tolivefor real-time news (optional)FINANCIAL_DATA_MODE: set tolivefor real-time financials (optional)SOCIAL_DATA_MODE: set tolivefor real-time social sentiment (optional)TAVILY_API_KEY: required for*_DATA_MODE=live
app/: application code (agents, LangGraph workflow, API, storage, UI assets)tests/: automated testsexamples/: runnable scriptsdata/: local persistent artifacts (ChromaDB + SQLite). Ignored by git.
Common commands (see Makefile):
make dev: run the APImake test: run testsmake lint: run ruff checksmake format: run ruff formatting