An AI-powered investment research application that generates comprehensive financial reports by synthesizing market data and news sentiment using a multi-agent workflow.
Capital Compass is an advanced tool designed to automate and enhance the tedious process of investment research.
By entering a stock ticker, users can generate a detailed, professional-grade financial report in seconds.
The application leverages a sophisticated multi-agent system built with LangGraph to perform parallel data fetching, specialized analysis, critical review, and final report synthesisβproviding a balanced and data-driven investment thesis.
- AI-Powered Analysis β Multiple specialized LLMs for financial analysis, sentiment analysis, and final reporting ensure nuanced, high-quality output.
- Comprehensive Data Synthesis β Combines quantitative financial metrics from Alpha Vantage with qualitative news sentiment for a holistic view.
- Robust Agentic Workflow β Implements multi-step reasoning: specialist agents analyze, a "critic" agent challenges, and a final "advisor" synthesizes into a balanced report.
- Decisive Recommendations β Designed with advanced prompting techniques to overcome neutrality bias and provide clear, actionable insights.
- Interactive UI β A clean, intuitive interface built with Streamlit.
The core of Capital Compass is a stateful graph built with LangGraph. This orchestrates a sophisticated workflow between specialized AI agents to ensure a robust and nuanced analysis.
The process begins by simultaneously gathering three distinct types of information:
- π Financial Overview: Fetches quantitative financial data from Alpha Vantage.
- π° News & Market Sentiment: Fetches qualitative news and sentiment from Alpha Vantage.
- π Forward-Looking Insights: Performs a targeted web search for analyst ratings and price targets.
The raw data is then processed in parallel by three specialist agents:
- π¨βπΌ Financial Analyst Agent β Interprets financial metrics.
- π§ Sentiment Analyst Agent β Evaluates news and market perception.
- π Web Research Agent β Summarizes findings from the web search.
All three analyses are passed to the Risk & Opportunity Analyst.
- π― Role: Distill everything into:
- The most compelling reason to invest.
- The most significant risk.
Finally, the Senior Advisor Agent receives:
- The specialist analyses
- The balanced review
It then weighs the core opportunity against the significant risk to produce a structured, decisive investment report.
%%{init: {
"theme": "dark",
"themeVariables": {
"primaryColor": "#0b1220",
"primaryTextColor": "#E5E7EB",
"primaryBorderColor": "#93C5FD",
"lineColor": "#93C5FD",
"tertiaryColor": "#111827",
"fontSize": "14px",
"fontFamily": "Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto"
}
}}%%
graph TD
A[Start:<br/>User Enters Ticker] --> B[Fetch:<br/>Financial Overview]
A --> C[Fetch:<br/>News & Sentiment]
A --> I[Fetch:<br/>Web Search]
B --> D{Analyze:<br/>Financials}
C --> E{Analyze:<br/>Sentiment}
I --> J{Summarize:<br/>Web Research}
D --> F[Balanced Review:<br/>Risk & Opportunity]
E --> F
J --> F
F --> G[Final Synthesis:<br/>Generate Report]
G --> H[End:<br/>Display Report]
%% Dark-friendly styles
classDef fetch fill:#0F172A,stroke:#818CF8,color:#E5E7EB,stroke-width:2px
classDef websearch fill:#1E1B4B,stroke:#A5B4FC,color:#E0E7FF,stroke-width:2px
classDef analyze fill:#111827,stroke:#60A5FA,color:#E5E7EB,stroke-width:2px
classDef critic fill:#1F0A0A,stroke:#FCA5A5,color:#FEE2E2,stroke-width:2px
classDef final fill:#052E2B,stroke:#34D399,color:#D1FAE5,stroke-width:2px
classDef default fill:#0B1220,stroke:#93C5FD,color:#E5E7EB,stroke-width:1.5px
class B,C fetch
class I websearch
class J analyze
class D,E analyze
class F critic
class G final
- Frontend: Streamlit
- AI Orchestration: LangChain / LangGraph
- LLM Provider: Groq (multi-model support)
- Data Source: Alpha Vantage API
- Core Language: Python
Follow these steps to get a local copy running:
- Python 3.11+
- Alpha Vantage API Key
- Groq API Key
Clone the repository:
git clone https://github.com/ChidambaraRaju/capital-compass
cd capital-compassCreate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtSet up environment variables:
Create a .env file in the project root with:
ALPHAVANTAGE_API_KEY="YOUR_ALPHA_VANTAGE_KEY"
GROQ_API_KEY="YOUR_GROQ_API_KEY"
TAVILY_API_KEY = "YOUR_TAVILY_API_KEY"Run the Streamlit app from the root directory:
streamlit run main.py.
βββ assets/
β βββ logo.png
βββ capital_compass/
β βββ agents/
β β βββ analysis_agents.py
β β βββ data_fetcher.py
β βββ tools/
β β βββ alpha_vantage_client.py
βββ tavily_search_tool.py
β βββ exceptions.py
β βββ graph.py
β βββ state.py
βββ .env
βββ main.py
βββ requirements.txt
Distributed under the MIT License. See LICENSE for more information.
Made with β€οΈ and Python

