How neel-turbo/multi-agent-langraph-rag-finance-app works
Finance Agents is an educational finance assistant combining a React chat and portfolio UI with a LangGraph supervisor, specialist tools, live market data, and PDF-grounded answers. The main workflow is user question → planning → specialist research → review/follow-up → synthesized response; separate UI requests serve market snapshots and Zerodha holdings. The README documents the six-agent and conversation-memory capabilities, but their full wiring is not visible in the excerpts, so only documented relationships are shown. Ingestion and provider links reflect sampled source and README evidence.
Main entry points: supervisorGraph.ts Six specialists · server.ts Market API · ingest.ts PDF ingestion · ragTool.ts RAG search tool
Components 33
User experience
- App and screens
src/App.tsx - Chat interface
src/components/ChatScreen.tsx - Portfolio view
src/components/PortfolioScreen.tsx - Market displays
src/components/MarketMarquee.tsx - Chat connection
src/hooks/langgraph.ts - Market snapshot hook
src/hooks/useMarketSnapshot.ts - Portfolio data hooks
src/hooks/usePortfolio.ts
Agent orchestration
- Supervisor graph
src/server/graph/supervisorGraph.ts - Plan tasks
src/server/graph/supervisorGraph.ts - Six specialists
src/server/graph/supervisorGraph.ts - Review findings
src/server/graph/supervisorGraph.ts - Synthesize answer
src/server/graph/supervisorGraph.ts - Model selection
src/server/graph/models.ts
Knowledge and research
- Market tools
src/server/tools/marketTools.ts - Finance calculators
src/server/tools/calcTools.ts - News and web search
src/server/tools/searchTools.ts - RAG search tool
src/server/tools/ragTool.ts - PDF ingestion
src/server/rag/ingest.ts - Local embeddings
src/server/rag/embedder.ts - Document chunking
src/server/rag/chunk.ts - Chroma knowledge index
Market and portfolio data
- Market API
src/server/api/server.ts - Snapshot service
src/server/market/service.ts - Market watchlists
src/server/market/watchlists.ts - Quote providers
src/server/market/providers/types.ts - Kite portfolio adapter
src/server/portfolio/kite.ts
External services
- PDF files
- LLM providers
- Tavily search
- Market data services
- Zerodha Kite
- LangGraph server
Other components
- User
Connections 41
- User → App and screens: uses
- App and screens → Chat interface: shows chat
- App and screens → Portfolio view: shows portfolio
- Chat interface → Chat connection: submits chat
- Chat connection → LangGraph server: streams requests
- LangGraph server → Supervisor graph: runs graph
- Supervisor graph → Plan tasks: plans
- Plan tasks → Model selection: invokes planner
- Plan tasks → Six specialists: dispatches tasks
- Six specialists → Review findings: returns findings
- Review findings → Six specialists: dispatches follow-ups
- Review findings → Synthesize answer: approves findings
- Synthesize answer → Model selection: invokes model
- Model selection → LLM providers: calls model
- Six specialists → Market tools: uses tools
- Six specialists → Finance calculators: uses tools
- Six specialists → RAG search tool: uses tool
- Six specialists → News and web search: uses tools
- RAG search tool → Local embeddings: embeds query
- RAG search tool → Chroma knowledge index: searches passages
- RAG search tool → News and web search: falls back
- News and web search → Tavily search: searches web
- PDF ingestion → PDF files: parses PDFs
- PDF ingestion → Document chunking: chunks text
- PDF ingestion → Local embeddings: embeds passages
- PDF ingestion → Chroma knowledge index: writes chunks
- Six specialists → Kite portfolio adapter: loads holdings
- Market tools → Snapshot service: gets snapshots
- Snapshot service → Market watchlists: reads symbols
- Snapshot service → Quote providers: requests quotes
- Quote providers → Market data services: fetches prices
- Chat interface → Market snapshot hook: shows market data
- Market displays → Market snapshot hook: reads snapshot
- Market snapshot hook → Market API: requests snapshot
- Portfolio view → Portfolio data hooks: loads holdings
- Portfolio data hooks → Market API: requests data
- Market API → Snapshot service: gets snapshot
- Market API → Kite portfolio adapter: gets holdings
- Market API → Quote providers: gets price history
- Kite portfolio adapter → Zerodha Kite: fetches holdings
- Quote providers → Market data services: gets history