How dharanidharkola/deep-financial-research-agent works
Financial Research Agent is a Streamlit financial-research product. A user submits a research query in the dashboard; the LangGraph workflow routes it by sector, plans and performs web research, gathers financial and annual-report context, analyzes findings, and generates a report. The graph preserves the documented research stages, supported sectors, report/export capabilities, and integrations. Some links rely on the README or SOURCE INDEX references because the corresponding source was not excerpted; those limits are reflected in the evidence paths.
Main entry points: workflow.py LangGraph workflow · llm.py Language model · researcher_agent.py Web researcher · financial_agent.py Financial collector
Components 34
Research dashboard
- Research dashboard
frontend/pages/1_Research.py - Reports browser
frontend/pages/2_Reports.py - Dashboard home
frontend/app.py
Research workflow
- LangGraph workflow
backend/graph/workflow.py - Research state
backend/models/state.py - Sector router
backend/agents/router_agent.py - Research planner
backend/agents/planner_agent.py
Research sources
- Web researcher
backend/agents/researcher_agent.py - Research stages
backend/prompts/research_prompt.py - Stage definitions
backend/prompts/research_stages.py - Web search tool
backend/tools/tavily_tool.py - Financial collector
backend/agents/financial_agent.py - Finance data tool
backend/tools/finance_tool.py - Company comparison
backend/tools/company_compare.py - IT sector analysis
backend/sector_agents/it_agent.py - Pharma sector analysis
backend/sector_agents/pharma_agent.py - Annual report ingestion
backend/rag/ingest.py - Document retrieval
backend/rag/retriever.py - Pinecone vector store
backend/rag/vector_store.py - Report context retrieval
backend/agents/rag_agent.py - Document metadata
backend/rag/metadata.py
Analysis and reporting
- Findings analyzer
backend/agents/analyzer_agent.py - Report generator
backend/agents/report_agent.py - Report storage
backend/utils/report_manager.py - PDF generator
backend/utils/pdf_generator.py - Markdown export
backend/utils/pdf_export.py
Shared services
- Language model
backend/llm.py - Service configuration
backend/config.py
Other components
- Research user
- Tavily search
- Yahoo Finance
- Groq model service
- Annual report PDFs
- Pinecone service
Connections 35
- Research user → Research dashboard: submits query
frontend/pages/1_Research.py - Research dashboard → LangGraph workflow: invokes research
frontend/pages/1_Research.py - LangGraph workflow → Sector router: dispatches
backend/graph/workflow.py - LangGraph workflow → Research planner: then dispatches
backend/graph/workflow.py - LangGraph workflow → Web researcher: then dispatches
backend/graph/workflow.py - LangGraph workflow → Financial collector: then dispatches
backend/graph/workflow.py - LangGraph workflow → Report context retrieval: then dispatches
backend/graph/workflow.py - LangGraph workflow → Findings analyzer: then dispatches
backend/graph/workflow.py - LangGraph workflow → Report generator: then dispatches
backend/graph/workflow.py - LangGraph workflow → Research state: uses state
backend/graph/workflow.py - Web researcher → Web search tool: searches web
backend/agents/researcher_agent.py - Web researcher → Research stages: formats queries
backend/agents/researcher_agent.py - Web researcher → Stage definitions: iterates stages
backend/agents/researcher_agent.py - Web researcher → Language model: generates next query
backend/agents/researcher_agent.py - Web search tool → Tavily search: searches
README.md - Financial collector → Finance data tool: collects data
backend/agents/financial_agent.py - Financial collector → IT sector analysis: uses sector analysis
backend/agents/financial_agent.py - Financial collector → Pharma sector analysis: uses sector analysis
backend/agents/financial_agent.py - Finance data tool → Yahoo Finance: gets finance data
README.md - Annual report ingestion → Annual report PDFs: loads PDFs
backend/rag/ingest.py - Annual report ingestion → Pinecone vector store: uploads chunks
backend/rag/ingest.py - Pinecone vector store → Pinecone service: stores vectors
README.md - Report context retrieval → Document retrieval: retrieves context
backend/agents/rag_agent.py - Document retrieval → Pinecone vector store: searches vectors
backend/rag/retriever.py - Findings analyzer → Language model: analyzes findings
backend/agents/analyzer_agent.py - Research planner → Language model: creates plan
backend/agents/planner_agent.py - Report generator → Language model: generates report
backend/agents/report_agent.py - Report generator → Report storage: saves report
backend/agents/report_agent.py - Report storage → PDF generator: creates PDF
backend/utils/report_manager.py - Reports browser → Report storage: browses reports
- Research dashboard → Markdown export: exports markdown
README.md - Language model → Service configuration: loads credentials
backend/llm.py - Language model → Groq model service: invokes model
backend/llm.py - Web search tool → Service configuration: loads credentials
backend/tools/tavily_tool.py - Pinecone vector store → Service configuration: loads credentials
backend/rag/vector_store.py