Beyond Black-Box Prompts: Building an Explainable Multi-Agent Financial Intelligence Platform with FastAPI & React A developer built Vibe-Finance, an open-source multi-agent financial intelligence platform that uses a FastAPI backend, React/Vite/Tailwind frontend, and vector RAG over SEC filings to replace single-prompt LLM stock analysis. The system runs specialized Quant, Fundamental RAG, and Behavioral Risk agents through an adversarial debate engine that penalizes confidence when agents disagree, then synthesizes results with Gemini 1.5 Flash and a deterministic fallback for uptime. The project is published on GitHub. In quantitative finance and retail investing, treating Large Language Models as a single "oracle" prompt is dangerous. When you ask a single LLM whether a stock is a buy, it frequently exhibits confirmation bias, hallucinations with financial figures, and a total lack of calibrated risk management. Real-world institutional investment committees don't rely on a single analyst. They rely on specialized, competing personas : To solve this problem, I built Vibe-Finance https://github.com/Khare69/Vibe-Finance : an end-to-end multi-agent financial intelligence and explainability platform built with a Python/FastAPI backend, vector RAG over corporate filings, and a modern React/Vite/Tailwind client. Here is a breakdown of how the architecture works, how the adversarial debate engine resolves conflict, and the engineering trade-offs made along the way. Instead of feeding everything into one monolithic prompt, Vibe-Finance separates data ingestion, analysis, adversarial cross-examination, and synthesis into dedicated layers: flowchart TD UI Frontend: React 18 + Vite + Tailwind + TradingView Charts -- |REST / JSON| API Backend: FastAPI subgraph MultiAgentEngine Multi-Agent Intelligence Layer QA Quant Agent\nWilder RSI-14, 50-EMA, 200-SMA, MACD FA Fundamental RAG Agent\nSEC 10-K Filings & Polarity Extraction BM Behavioral Risk Manager\nDrawdown Caps & Beta Exposure Limits DEB Adversarial Debate Engine\nCross-Examination & Calibration SYN Synthesis Agent\nHybrid Gemini 1.5 Flash + Deterministic Fallback end API -- MultiAgentEngine QA -- DEB FA -- DEB BM -- DEB DEB -- SYN SYN -- API subgraph Storage Persistence & Ingestion Layer SQLITE SQLite: Profiles, Holdings, Decision Memos CACHE Market Cache: Live Feed + Offline Snapshot Fallback end API --- Storage The Quant Agent operates purely on hard mathematical indicators. It executes: This agent parses regulatory corporate filings SEC 10-Ks, 10-Qs, earnings conference transcripts using vector embeddings. The Risk Manager protects the investor against behavioral pitfalls. It evaluates: Conservative , Moderate , or Aggressive . The most critical component of the platform is the Debate Engine . When the Quant Agent sees a strong breakout signal Bullish but the Fundamental RAG Agent detects margin compression in recent filings Bearish , the system detects agent friction . Rather than averaging their scores, the engine runs a structured adversarial exchange: class AdversarialDebateEngine: """Detects agent friction and calibrates overall decision confidence.""" def evaluate consensus self, quant signal, rag signal, risk profile : friction detected = quant signal.polarity = rag signal.polarity if friction detected: Cross-examine: Penalize overall confidence and challenge bull bias calibrated confidence = min quant signal.confidence, rag signal.confidence 0.85 debate summary = f"Friction Detected: Technical momentum is {quant signal.polarity}, " f"but corporate disclosures indicate {rag signal.polarity} risks." else: calibrated confidence = quant signal.confidence + rag signal.confidence / 2.0 debate summary = "Agents aligned on directional momentum." return { "friction": friction detected, "calibrated confidence": round calibrated confidence, 2 , "debate summary": debate summary } The resulting debate log is passed to a hybrid Gemini 1.5 Flash synthesis engine that returns structured JSON. If the LLM provider experiences network latency or rate-limiting, the system automatically falls back to an algorithmic deterministic engine —ensuring 100% operational uptime. On the client side React 18 + Vite + Tailwind CSS , technical analysis is visualized using TradingView Lightweight Charts lightweight-charts v5.2.1 : Building autonomous agents in finance demands strict testing. The repository includes an end-to-end automated test suite verifying 21 critical scenarios python -u backend/test suite.py : The entire codebase is open-source under the Apache 2.0 License : git clone https://github.com/Khare69/Vibe-Finance.git cd Vibe-Finance docker compose up --build I’d love to hear your thoughts, feedback, and architectural questions in the comments below If you find the project interesting, feel free to drop a ⭐ on the repository