demo.mp4
TrueWealth AI is an end-to-end Multi-Agent Financial Advisor AI System that delivers reliable, real-time investment insights by combining LangGraph-powered orchestration, advanced LLM reasoning (LLaMA-3 via Groq), and RAG with ChromaDB + HuggingFace embeddings. It features Planner, Retriever, Generator, News, Web Search, and Memory agents with intelligent tool routing, retry logic, and multi-source knowledge fusion, ensuring professional-grade accuracy. The system supports financial PDF ingestion, live market data, and fallback web search, guaranteeing comprehensive coverage across diverse queries.
Engineered with a modular, scalable architecture, it includes FastAPI APIs for testing, a Flask-based responsive UI (HTML, CSS, JS) for client interaction, and full Dockerization for portability. Deployed on Render with a CI/CD pipeline, it adheres to enterprise software practices.
Achievements: Benchmarked on 100+ financial queries, the system achieved 99% query coverage with <3s P95 latency reducing manual research effort by ~40% while ensuring enterprise-level reliability, scalability, and real-world deployment readiness.
Try the real-time TrueWealth AI: TrueWealth AI – Click Here
TrueWealth AI/
│
├── .github/
│ └── workflows/
│ └── main.yml
│
├── agents/
│ ├── __init__.py
│ ├── duckduckgo.py
│ ├── executor.py
│ ├── generator.py
│ ├── llm.py
│ ├── memory.py
│ ├── planner.py
│ ├── rag.py
│ └── yfinance.py
│
├── core/
│ ├── __init__.py
│ ├── config.py
│ ├── state.py
│ └── workflow.py
│
├── data/
│ └── The Intelligent Investor - BENJAMIN GRAHAM.pdf
│
├──finance_db/
│ └── chroma.sqlite3
│
├── notebook/
│ └── experiment.ipynb
│
├── static/
│ ├── css/
│ │ └── style.css
│ ├── images/
│ │ └── logo.png
│ └── js/
│ └── script.js
│
├── templates/
│ └── index.html
│
├── tests/
│ └── test_app.py
│
├── tools/
│ ├── __init__.py
│ ├── document_loader.py
│ ├── llm_client.py
│ ├── search_tools.py
│ └── vector_store.py
│
├── .gitignore
├── api.py
├── app.py
├── app.png
├── demo.mp4
├── Dockerfile
├── LICENSE
├── main.py
├── README.md
├── render.yaml
├── requirements.txt
└── setup.py
| Step | Feature | Tech Stack / Tool Used |
|---|---|---|
| 1 | LLM-based Financial Query Understanding | Groq + LLaMA-3 |
| 2 | Professional Tone Personalization | Prompt Engineering + Advisor Persona Templates |
| 3 | RAG-based Financial Answering | LangChain + ChromaDB + Sentence Transformers (all-MiniLM-L6-v2) |
| 4 | Financial Document Retriever Agent | RetrieverAgent + Vector Store Search |
| 5 | Answer Generator Agent | GeneratorAgent (LLM-based factual + professional financial style) |
| 6 | Financial News Retrieval Agent | YahooFinanceNewsTool |
| 7 | Web Search Agent (Fallback) | DuckDuckGo Search Tool |
| 8 | Planner Agent | LangGraph Planner Node |
| 9 | Intelligent Tool Routing & Fallback | Retry Logic + Conditional Branching + Multi-step Tool Selection |
| 10 | Short-Term Conversational Memory | LangGraph Memory Integration (Buffer-based) |
| 11 | PDF Knowledge Ingestion | PyPDFLoader + RecursiveCharacterTextSplitter |
| 12 | Vector Embedding & Storage | HuggingFaceEmbeddings + ChromaDB |
| 13 | State-based Multi-Agent Orchestration | LangGraph StateGraph + Conditional Edges + Dynamic State Updates |
| 14 | Multi-source Knowledge Fusion | LLM + RAG + Yahoo Finance + DuckDuckGo Combined Answer Synthesis |
| 15 | API Testing & Integration | FastAPI (API endpoints for agent orchestration testing) |
| 16 | Modular Code Architecture | Separation of Concerns + Service/Agent Modules |
| 17 | Responsive Web UI | Flask + HTML5, CSS3, JavaScript |
| 18 | Cloud Deployment | Render (Production hosting) |
| 19 | CI/CD Pipeline | GitHub Actions / CI/CD Workflows |
| 20 | Containerization for Portability | Docker (App + Dependencies + Environment) |
| Metric | Value |
|---|---|
| Mean Latency | 2.00s |
| P95 Latency | 3.05s |
| Query Coverage | 99% |
flowchart TD
A[User Query] --> B[Planner]
B --> C[Recall Memory]
C --> D[LLM Direct Answer Attempt]
D -->|Success| E[Generate Response]
D -->|Failure| F[Executor: Retry Logic]
F --> G{Retry Count < 3?}
G -->|Yes| H[RAG: Search PDF Knowledge]
G -->|No| I[Yahoo Finance Search]
H -->|Found Docs| E
H -->|No Docs| I
I -->|Found News| E
I -->|No News| J[DuckDuckGo Web Search]
J --> E
E --> K[Store in Memory]
K --> L[Return Final Answer]
%% External Tools
H --> M[(ChromaDB)]
I --> N[[Yahoo Finance]]
J --> O[[DuckDuckGo]]
%% LLM Core
D --> P[[Groq-LLaMA3]]
E --> P
Process a financial question and return an AI-generated response with source information.
Request:
POST /chat HTTP/1.1
Content-Type: application/json
Host: localhost:8000
{
"message": "What are the top performing stocks this week?",
"session_id": "optional_existing_id"
}
Parameters:
message(required) → The financial question to processsession_id(optional) → Existing session ID for context continuity (default:"default")
Response:
{
"response": "Based on Yahoo Finance data, the top performing stocks this week are...",
"session_id": "20250813123045",
"source": "YahooFinance"
}Status Codes:
200→ Successful response400→ Invalid request (missingmessage)500→ Internal server error
- Service Containerization: The entire TrueWealth AI system is broken down into microservices, each housed within its own Docker container.
- Docker Compose: Used to coordinate and manage multi-container services for local development and testing.
-
Build Docker Image:
docker build -t truewealth-ai . -
Run Application in Docker:
docker-compose up --build
Continuous Integration and Continuous Deployment (CI/CD) is implemented using GitHub Actions to automate testing, building, and deploying the project.
- Automated Testing: Every code push triggers automated unit and integration tests.
- Automated Deployment: Successful builds are automatically deployed to production or staging environments.
- Multilingual Support: Future iterations will include multilingual capabilities to cater to a global client base.
- Advanced Financial Analytics: Integration with more sophisticated financial forecasting models and real-time market analysis.
- Long-Term Memory: Extended memory for better long-term personalized financial advice.
- Developer: Md Emon Hasan
- GitHub: Md-Emon-Hasan
- LinkedIn: Md Emon Hasan
- Email: [email protected]
- WhatsApp: +8801834363533