🚧 Proof of Concept - A stateful multi-agent AI system for personalized financial advice using LangGraph, LangChain, and MCP tools.
A multi-agent AI system that combines specialized financial agents to deliver personalized financial advice. Each agent focuses on a specific domain and collaborates through a cyclical LangGraph orchestration layer, allowing for iterative research and quality review.
| Agent | Role | Status | Capabilities |
|---|---|---|---|
| 💼 Investment Agent | Specialist | ✅ Active | Portfolio recommendations, market analysis |
| 🔍 Review Agent | Quality Control | ✅ Active | Validates outputs, provides feedback, ensures consistency |
| 🎯 Supervisor Agent | Orchestrator | 🔄 In Development | Routes queries, manages workflow, coordinates agents |
| 🤖 Generalist Agent | General Assistant | 📋 Planned | Handles general queries unrelated to finance, conversational support |
| 📊 Tax Specialist Agent | Specialist | 🔄 In Development | Tax optimization, deduction strategies |
| Specialist | 📋 Planned | Risk evaluation, mitigation strategies | |
| 💰 Budget Planner Agent | Specialist | 📋 Planned | Expense tracking, budget optimization |
Technology: LangGraph • LangChain • Model Context Protocol (MCP) • Python 3.11+
Agent Flow (Powered by LangGraph StateGraph):
- 🎯 User Query is passed into the initial state.
- 💼 Investment Agent (Researcher) performs analysis using Search tools and generates a report.
- 🔍 Review Agent validates the output.
- Conditional Router:
- If Reviewer replies with
PASS➡️ Return final response to User. - If Reviewer replies with
FAIL➡️ Loop back to the Researcher with feedback for refinement (up to 3 iterations).
- If Reviewer replies with
The system will leverage multiple MCP servers to extend functionality:
-
Web Search Server
- Real-time market data and financial news retrieval
- General web search for non-financial queries (Generalist Agent)
- Current: Using LangChain Google Search Wrapper
- Planned: Migration to dedicated MCP Search server
-
File Data Server (planned)
- Excel/CSV file processing for user-provided portfolio data
- Historical transaction analysis
-
Database Server (planned)
- Persistent storage for user preferences and transaction history
- Portfolio tracking across sessions
- Current: Streamlit-based chat UI with real-time agent interaction ✅
- Next Phase: Migration to React/Next.js for production-ready web application (planned)
The system currently uses a cyclic graph architecture to ensure high-quality outputs.
Flow:
- User submits financial query via Streamlit chat interface.
- The
StateGraphinitializes the state dictionary. - Research Node fetches real-time data and drafts a plan.
- Review Node audits the plan.
- If the plan fails the audit, it is routed back to the Research Node with constructive feedback.
- Final verified response returned to user in chat UI.
Enhanced Multi-Agent System:
- 🎯 Supervisor/Orchestrator - Routes queries, manages workflow
- 🤖 Generalist Agent - General conversational queries
- 💼 Specialist Agents - Investment, Tax, Risk, Budget
- 🔍 Review Agent - Quality control & feedback
- uv - Python package and project manager
- Python 3.11+
.envfile containing yourGEMINI_API_KEY,GOOGLE_API_KEY, andGOOGLE_CSE_ID
# Install uv
curl -LsSf [https://astral.sh/uv/install.sh](https://astral.sh/uv/install.sh) | sh
# Install dependencies
uv sync
# Run the Streamlit app
uv run streamlit run streamlit.py