How jayantsinghkhanna/ai-finance-analyst works
Autonomous Finance Analyst turns a natural-language investment query into a dynamically selected set of market, fundamental, technical, news, and risk analyses, then produces a recommendation, written report, and PDF. The supervisor owns the reflection-and-skill loop; LangGraph routes the request through reporting and PDF generation. Shared FinanceState carries inputs and results. The README documents news APIs and the broader analysis capabilities; source excerpts and index references support the implementation links shown. Unsampled subsystem details and unverified external-service calls are not inferred.
Main entry points: skill_executor.py Skill Executor · workflow.py Graph Workflow · yfinance_tool.py yFinance Access · router_agent.py Intent Router
Components 29
Query and Routing
- Query CLI
main.py - Intent Router
agents/router_agent.py - Router Prompt
prompts/router_prompt.py - Router Schema
schemas/router_schema.py
Workflow and State
- Graph Workflow
graph/workflow.py - Finance Supervisor
agents/finance_supervisor_agent.py - Reflection Agent
agents/reflection_agent.py - Reflection Prompt
prompts/reflection_prompt.py - Reflection Schema
schemas/reflection_schema.py - Skill Executor
graph/skill_executor.py - FinanceState
state/finance_state.py - Report Agent
agents/report_agent.py - Report Prompt
prompts/report_prompt.py - PDF Generator
skills/pdf_report_skill.py
Analysis Capabilities
- Stock Price
skills/stock_price_skill.py - Market Metrics
skills/market_metrics_skill.py - Financial Health
skills/financial_health_skill.py - Technical Analysis
skills/technical_analysis_skill.py - News Fetch
skills/news_fetch_skill.py - News Sentiment
skills/news_sentiment_skill.py - Risk Analysis
skills/risk_analysis_skill.py - Investment Summary
skills/investment_summary_skill.py
Models and Data
- yFinance Access
tools/yfinance_tool.py - Technical Tool
tools/technical_tool.py - News Tool
tools/news_tool.py - Gemini LLM
llm.py
Other components
- User
- Investment Report
- News APIs
Connections 36
- User → Query CLI: enters query
README.md - Query CLI → Graph Workflow: invokes graph
main.py - Graph Workflow → Intent Router: routes first
graph/workflow.py - Intent Router → Router Prompt: formats prompt
agents/router_agent.py - Intent Router → Router Schema: validates output
agents/router_agent.py - Intent Router → Gemini LLM: requests parsing
agents/router_agent.py - Graph Workflow → Finance Supervisor: routes next
graph/workflow.py - Finance Supervisor → Reflection Agent: reflects
agents/finance_supervisor_agent.py - Reflection Agent → Reflection Prompt: uses prompt
agents/reflection_agent.py - Reflection Agent → Reflection Schema: validates decision
agents/reflection_agent.py - Reflection Agent → Gemini LLM: requests reasoning
agents/reflection_agent.py - Finance Supervisor → Skill Executor: executes selection
agents/finance_supervisor_agent.py - Finance Supervisor → FinanceState: updates results
README.md - Graph Workflow → FinanceState: uses graph state
graph/workflow.py - Graph Workflow → Report Agent: routes report
graph/workflow.py - Report Agent → Gemini LLM: generates report
agents/report_agent.py - Report Agent → Report Prompt: uses prompt
README.md - Graph Workflow → PDF Generator: routes PDF
graph/workflow.py - PDF Generator → Investment Report: writes PDF
skills/pdf_report_skill.py - Skill Executor → Stock Price: dispatches
graph/skill_executor.py - Skill Executor → Market Metrics: dispatches
graph/skill_executor.py - Skill Executor → Financial Health: dispatches
graph/skill_executor.py - Skill Executor → Technical Analysis: dispatches
graph/skill_executor.py - Skill Executor → News Fetch: dispatches
graph/skill_executor.py - Skill Executor → News Sentiment: dispatches
graph/skill_executor.py - Skill Executor → Risk Analysis: dispatches
graph/skill_executor.py - Skill Executor → Investment Summary: dispatches
graph/skill_executor.py - Stock Price → yFinance Access: reads prices
skills/stock_price_skill.py - Market Metrics → yFinance Access: reads metrics
skills/market_metrics_skill.py - Financial Health → yFinance Access: reads fundamentals
skills/financial_health_skill.py - Technical Analysis → yFinance Access: reads history
skills/technical_analysis_skill.py - Technical Analysis → Technical Tool: uses calculations
skills/technical_analysis_skill.py - News Fetch → News Tool: fetches articles
skills/news_fetch_skill.py - News Tool → News APIs: retrieves news
README.md - News Sentiment → Gemini LLM: classifies sentiment
skills/news_sentiment_skill.py - Risk Analysis → yFinance Access: reads risk data
skills/risk_analysis_skill.py