💡 Inspiration

Financial intelligence is still painfully manual in most enterprises. CFOs drown in spreadsheets, anomalies go undetected for quarters, and forecast reports take weeks to compile. We asked ourselves: what if an AI could do the work of an entire financial analysis team — in seconds?

That question drove us to build FinanceAI, an enterprise-grade multi-agent intelligence platform that transforms raw financial data into boardroom-ready insights.


🏗️ What We Built

FinanceAI is a multi-agent AI system that ingests financial documents (CSV, Excel, PDF) and runs them through a sequential intelligence pipeline powered by Gemini Pro & Flash:

Agent Role
🗂️ Extraction Agent Parses & cleans raw financial files
📊 Analysis Agent Calculates KPIs, ratios, and business health metrics
🚨 Anomaly Agent Detects fraud signals, expense spikes & suspicious transactions
🔮 Forecasting Agent Predicts revenue and cashflow using Prophet
🧠 Executive Agent Synthesises strategic recommendations for the C-suite
🤝 Consensus Agent Resolves conflicts between agent outputs
🗄️ RAG Memory Stores analysis in ChromaDB for future retrieval

The platform ships with a 6-page Streamlit dashboard featuring an Executive AI CFO Chat, interactive Plotly visualisations, and a one-click PDF/Markdown report generator.


⚙️ How We Built It

The core architecture is an orchestrated multi-agent pipeline (orchestrator.py) that sequences agents, passes outputs downstream, and gracefully handles partial failures so the pipeline never fully crashes.

Each agent is stateless and communicates through structured Python dicts, making the system modular and testable.

Semantic Financial Classification prevents agents from treating non-financial columns (like transaction_id or zip_code) as numeric data — a subtle but critical enterprise accuracy improvement.

The RAG memory layer (ChromaDB) stores every analysis run, enabling cross-session retrieval and historical report comparison.

Key technical choices:

  • Gemini Pro for deep reasoning (executive summaries, strategic Q&A)
  • Gemini Flash for fast inference on classification and anomaly scoring
  • Prophet for time-series forecasting with uncertainty intervals
  • Streamlit for rapid enterprise UI with a custom dark theme
  • Plotly for interactive financial charts

🧗 Challenges We Faced

  • Agent coordination without hallucination: Getting five AI agents to produce consistent outputs was non-trivial. The Consensus Agent was built specifically to detect and resolve contradictions between the Analysis, Anomaly, and Forecast agents.
  • Semantic financial understanding: Early versions flagged customer_age as a revenue anomaly. Building a semantic classifier to distinguish financial from non-financial columns was a key breakthrough.
  • Graceful degradation: A real enterprise pipeline cannot crash because one agent fails. We implemented fallback defaults at every step so partial results always flow through.
  • PDF financial parsing: Extracting structured numeric data from unstructured PDF statements required layered extraction strategies.
  • Gemini rate limits under load: The Executive Chat had to fall back to a rule-based answer engine when API quotas were hit, so users always receive a useful response.

📚 What We Learned

  • Multi-agent AI systems need an orchestration contract — strict input/output schemas — or downstream agents break silently.
  • Semantic context matters as much as the model. Garbage columns in → garbage insights out, regardless of model quality.
  • Streamlit's session state is powerful for stateful multi-page AI apps but requires careful initialisation to avoid race conditions.
  • RAG memory transforms a one-shot tool into a persistent intelligence system that improves with every analysis run.

🚀 What's Next

  • Real-time ERP integrations (SAP, QuickBooks)
  • Multi-company portfolio analysis
  • Streaming analytics for live transaction feeds
  • Advanced fraud detection with graph-based anomaly networks
  • Cloud deployment with role-based access control for enterprise teams

Built With

  • chromadb
  • gemini-flash
  • gemini-pro
  • google-ai-studio
  • langchain
  • openpyxl
  • pandas
  • pdfplumber
  • plotly
  • prophet
  • python
  • python-dotenv
  • streamlit
Share this project:

Updates