# mohannimmalapudi2007-hue/ai-based-financial-agent architecture

> Architecture diagram of the GitHub repository mohannimmalapudi2007-hue/ai-based-financial-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohannimmalapudi2007-hue/ai-based-financial-agent
- Repository: https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent

## Overview

This is a CSV-backed financial affordability agent: a request is matched with a user profile and financial events, analyzed against future balances and payment options, and presented through a Streamlit dashboard. The main analysis is concentrated in FinancialTimeline; sampled helpers cover lookup, currency, date, and safety concerns, but their call relationships to the timeline are not shown. The README documents broader dashboard and evidence capabilities; unsampled implementation details and links are therefore omitted where not evidenced.

Main entry points: [`code/main.py`](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/main.py) (Request runner), [`code/data_loader.py`](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/data_loader.py) (CSV data loader), [`code/ui.py`](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/ui.py) (Streamlit dashboard), [`dataset/requests.csv`](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/requests.csv) (Financial requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_runner["Request runner<br/>[main.py]"]
end

subgraph group_inputs["Financial inputs"]
  node_loader["CSV data loader<br/>[data_loader.py]"]
  node_request_data["Financial requests<br/>[requests.csv]"]
  node_profile_data["Financial profiles"]
  node_event_data["Financial events"]
  node_payment_data["Payment options"]
  node_rate_data["Exchange rates<br/>[exchange_rates.csv]"]
  node_message_data["Messages and images<br/>[messages.csv]"]
  node_profile_lookup["Profile lookup<br/>[profile_lookup.py]"]
  node_event_lookup["Event lookup<br/>[event_lookup.py]"]
end

subgraph group_decision["Decision analysis"]
  node_timeline["Financial analysis"]
  node_balance["Balance calculation"]
  node_minimum["Minimum balance check"]
  node_classifier["Event classification"]
  node_date_handler["Event date handling"]
  node_forecast["Forecast window<br/>[forecast_window.py]"]
  node_converter["Currency conversion"]
end

subgraph group_presentation["User presentation"]
  node_dashboard["Streamlit dashboard<br/>[ui.py]"]
end

node_user(("User"))

node_user -->|"asks and reviews"| node_dashboard
node_dashboard -->|"launches"| node_runner
node_runner -->|"reads requests"| node_request_data
node_runner -->|"loads data"| node_loader
node_loader -->|"reads"| node_profile_data
node_loader -->|"reads"| node_event_data
node_loader -->|"reads"| node_payment_data
node_loader -->|"reads"| node_rate_data
node_loader -->|"reads"| node_message_data
node_runner -->|"looks up profiles"| node_profile_lookup
node_runner -->|"looks up events"| node_event_lookup
node_runner -->|"processes requests"| node_timeline
node_user -.->|"submits request"| node_runner

click node_dashboard "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/ui.py"
click node_runner "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/main.py"
click node_loader "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/data_loader.py"
click node_request_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/requests.csv"
click node_profile_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/financial_profiles.csv"
click node_event_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/financial_events.csv"
click node_payment_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/request_payment_options.csv"
click node_rate_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/exchange_rates.csv"
click node_message_data "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/messages.csv"
click node_profile_lookup "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/profile_lookup.py"
click node_event_lookup "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_lookup.py"
click node_timeline "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/financial_timeline.py"
click node_balance "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/balance_calculator.py"
click node_minimum "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/minimum_balance_checker.py"
click node_classifier "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_classifier.py"
click node_date_handler "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_date_handler.py"
click node_forecast "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/forecast_window.py"
click node_converter "https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/currency_converter.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_user toneBlue
class node_loader,node_request_data,node_profile_data,node_event_data,node_payment_data,node_rate_data,node_message_data,node_profile_lookup,node_event_lookup toneAmber
class node_timeline,node_balance,node_minimum,node_classifier,node_date_handler,node_forecast,node_converter toneMint
class node_dashboard toneRose
```

## Components

### Application entry

- [Request runner](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/main.py): `code/main.py`

### Financial inputs

- [CSV data loader](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/data_loader.py): `code/data_loader.py`
- [Financial requests](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/requests.csv): `dataset/requests.csv`
- [Financial profiles](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/financial_profiles.csv): `dataset/financial_profiles.csv`
- [Financial events](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/financial_events.csv): `dataset/financial_events.csv`
- [Payment options](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/request_payment_options.csv): `dataset/request_payment_options.csv`
- [Exchange rates](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/exchange_rates.csv): `dataset/exchange_rates.csv`
- [Messages and images](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/dataset/messages.csv): `dataset/messages.csv`
- [Profile lookup](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/profile_lookup.py): `code/profile_lookup.py`
- [Event lookup](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_lookup.py): `code/event_lookup.py`

### Decision analysis

- [Financial analysis](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/financial_timeline.py): `code/financial_timeline.py`
- [Balance calculation](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/balance_calculator.py): `code/balance_calculator.py`
- [Minimum balance check](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/minimum_balance_checker.py): `code/minimum_balance_checker.py`
- [Event classification](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_classifier.py): `code/event_classifier.py`
- [Event date handling](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/event_date_handler.py): `code/event_date_handler.py`
- [Forecast window](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/forecast_window.py): `code/forecast_window.py`
- [Currency conversion](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/currency_converter.py): `code/currency_converter.py`

### User presentation

- [Streamlit dashboard](https://github.com/mohannimmalapudi2007-hue/ai-based-financial-agent/blob/main/code/ui.py): `code/ui.py`

### Other components

- **User**

## Connections

- User → Streamlit dashboard: asks and reviews (evidence: `README.md`)
- Streamlit dashboard → Request runner: launches (evidence: `code/ui.py`)
- Request runner → Financial requests: reads requests (evidence: `code/main.py`)
- Request runner → CSV data loader: loads data (evidence: `code/main.py`)
- CSV data loader → Financial profiles: reads (evidence: `code/data_loader.py`)
- CSV data loader → Financial events: reads (evidence: `code/data_loader.py`)
- CSV data loader → Payment options: reads (evidence: `code/data_loader.py`)
- CSV data loader → Exchange rates: reads (evidence: `code/data_loader.py`)
- CSV data loader → Messages and images: reads (evidence: `code/data_loader.py`)
- Request runner → Profile lookup: looks up profiles (evidence: `code/main.py`)
- Request runner → Event lookup: looks up events (evidence: `code/main.py`)
- Request runner → Financial analysis: processes requests (evidence: `code/main.py`)
- User → Request runner: submits request (evidence: `README.md`)
