# tarunbevara10/banking-ai-agent architecture

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

- Interactive diagram: https://gitdiagram.com/tarunbevara10/banking-ai-agent
- Repository: https://github.com/tarunbevara10/banking-ai-agent

## Overview

This is a conversational AI banking assistant: users configure identity and data/action permissions, then ask financial questions by text or voice; backend agent sessions stream responses and transaction data can be visualized in the dashboard. The backend has a root agent and specialist spending, investment, advisory, and scheduling agents, alongside transaction and proactive-insight capabilities. The README describes A2A collaboration and live text/audio, but excerpts do not show all dispatch or service wiring, so uncertain links are omitted.

Main entry points: [`frontend/pages/HomePage.tsx`](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/pages/HomePage.tsx) (Chat dashboard), [`backend/no-name-agent/agent.py`](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/agent.py) (Root agent), [`backend/no-name-agent/main.py`](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/main.py) (Backend API), [`frontend/App.tsx`](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/App.tsx) (App routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User experience"]
  node_app["App routes<br/>[App.tsx]"]
  node_onboarding["Onboarding<br/>[OnboardingPage.tsx]"]
  node_permissions[("Permissions state")]
  node_home["Chat dashboard<br/>[HomePage.tsx]"]
  node_speech["Speech input<br/>[SpeechToText.tsx]"]
end

subgraph group_runtime["Conversation runtime"]
  node_api["Backend API<br/>[main.py]"]
  node_session["Agent session<br/>[main.py]"]
  node_websocket["WebSocket client<br/>[app.js]"]
  node_audio["Audio worklets<br/>[audio-recorder.js]"]
end

subgraph group_agents["Financial agents"]
  node_root{{"Root agent<br/>[agent.py]"}}
  node_daily{{"Daily spending"}}
  node_spending_specialists{{"Spending specialists<br/>[agent.py]"}}
  node_big_spending{{"Large spending"}}
  node_investment{{"Investment research<br/>[agent.py]"}}
  node_financial{{"Financial data agent<br/>[agent.py]"}}
  node_calendar{{"Advisor calendar<br/>[calendar_agent.py]"}}
  node_transaction{{"Transaction history<br/>[agent.py]"}}
  node_proactive{{"Proactive insights<br/>[agent.py]"}}
end

subgraph group_analytics["Financial views"]
  node_chart["Transaction charts"]
  node_insights["Insights UI<br/>[InsightsBar.tsx]"]
end

node_user(("Banking user"))
node_remote_finance(("Remote A2A service"))

node_user -->|"sets access"| node_onboarding
node_app -->|"routes to"| node_onboarding
node_app -->|"routes to"| node_home
node_app -->|"provides state"| node_permissions
node_onboarding -->|"saves settings"| node_permissions
node_home -->|"reads context"| node_permissions
node_user -->|"asks questions"| node_home
node_home -->|"renders"| node_speech
node_home -->|"renders"| node_chart
node_home -->|"fetches history"| node_api
node_api -->|"starts session"| node_transaction
node_api -->|"starts"| node_session
node_session -->|"runs agent"| node_root
node_websocket -->|"starts worklet"| node_audio
node_websocket -.->|"streams messages"| node_api
node_root -->|"delegates to"| node_daily
node_root -->|"delegates to"| node_investment
node_root -->|"delegates to"| node_financial
node_root -->|"delegates to"| node_big_spending
node_root -->|"delegates to"| node_calendar
node_daily -->|"uses specialists"| node_spending_specialists
node_financial -->|"queries remotely"| node_remote_finance
node_api -->|"selects agent"| node_investment
node_api -->|"selects agent"| node_daily
node_user -.->|"requests insights"| node_proactive
node_home -.->|"displays insights"| node_insights

click node_app "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/App.tsx"
click node_onboarding "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/pages/OnboardingPage.tsx"
click node_permissions "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/contexts/PermissionsContext.tsx"
click node_home "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/pages/HomePage.tsx"
click node_speech "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/SpeechToText.tsx"
click node_chart "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/TransactionHistoryChart.tsx"
click node_insights "https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/InsightsBar.tsx"
click node_api "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/main.py"
click node_session "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/main.py"
click node_websocket "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/static/js/app.js"
click node_audio "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/static/js/audio-recorder.js"
click node_root "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/agent.py"
click node_daily "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/daily_spendings_agent.py"
click node_spending_specialists "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/daily_spendings_agent/agent.py"
click node_big_spending "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/big_spendings_agent.py"
click node_investment "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/investments_agent/agent.py"
click node_financial "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/financial_agent/agent.py"
click node_calendar "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/calendar_agent.py"
click node_transaction "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/transaction_history_agent/agent.py"
click node_proactive "https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/proactive_insights_agent/agent.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_app,node_onboarding,node_permissions,node_home,node_speech,node_user toneBlue
class node_api,node_session,node_websocket,node_audio toneAmber
class node_root,node_daily,node_spending_specialists,node_big_spending,node_investment,node_financial,node_calendar,node_transaction,node_proactive toneMint
class node_chart,node_insights toneRose
class node_remote_finance toneIndigo
```

## Components

### User experience

- [App routes](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/App.tsx): `frontend/App.tsx`
- [Onboarding](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/pages/OnboardingPage.tsx): `frontend/pages/OnboardingPage.tsx`
- [Permissions state](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/contexts/PermissionsContext.tsx): `frontend/contexts/PermissionsContext.tsx`
- [Chat dashboard](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/pages/HomePage.tsx): `frontend/pages/HomePage.tsx`
- [Speech input](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/SpeechToText.tsx): `frontend/components/SpeechToText.tsx`

### Conversation runtime

- [Backend API](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/main.py): `backend/no-name-agent/main.py`
- [Agent session](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/main.py): `backend/no-name-agent/main.py`
- [WebSocket client](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/static/js/app.js): `backend/static/js/app.js`
- [Audio worklets](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/static/js/audio-recorder.js): `backend/static/js/audio-recorder.js`

### Financial agents

- [Root agent](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/agent.py): `backend/no-name-agent/agent.py`
- [Daily spending](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/daily_spendings_agent.py): `backend/no-name-agent/daily_spendings_agent.py`
- [Spending specialists](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/daily_spendings_agent/agent.py): `backend/no-name-agent/daily_spendings_agent/agent.py`
- [Large spending](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/big_spendings_agent.py): `backend/no-name-agent/big_spendings_agent.py`
- [Investment research](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/investments_agent/agent.py): `backend/no-name-agent/investments_agent/agent.py`
- [Financial data agent](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/financial_agent/agent.py): `backend/no-name-agent/financial_agent/agent.py`
- [Advisor calendar](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/calendar_agent.py): `backend/no-name-agent/calendar_agent.py`
- [Transaction history](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/transaction_history_agent/agent.py): `backend/no-name-agent/transaction_history_agent/agent.py`
- [Proactive insights](https://github.com/tarunbevara10/banking-ai-agent/blob/main/backend/no-name-agent/proactive_insights_agent/agent.py): `backend/no-name-agent/proactive_insights_agent/agent.py`

### Financial views

- [Transaction charts](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/TransactionHistoryChart.tsx): `frontend/components/TransactionHistoryChart.tsx`
- [Insights UI](https://github.com/tarunbevara10/banking-ai-agent/blob/main/frontend/components/InsightsBar.tsx): `frontend/components/InsightsBar.tsx`

### Other components

- **Banking user**
- **Remote A2A service**

## Connections

- Banking user → Onboarding: sets access (evidence: `frontend/pages/OnboardingPage.tsx`)
- App routes → Onboarding: routes to (evidence: `frontend/App.tsx`)
- App routes → Chat dashboard: routes to (evidence: `frontend/App.tsx`)
- App routes → Permissions state: provides state (evidence: `frontend/App.tsx`)
- Onboarding → Permissions state: saves settings (evidence: `frontend/pages/OnboardingPage.tsx`)
- Chat dashboard → Permissions state: reads context (evidence: `frontend/pages/HomePage.tsx`)
- Banking user → Chat dashboard: asks questions (evidence: `README.md`)
- Chat dashboard → Speech input: renders (evidence: `frontend/pages/HomePage.tsx`)
- Chat dashboard → Transaction charts: renders (evidence: `frontend/pages/HomePage.tsx`)
- Chat dashboard → Backend API: fetches history (evidence: `frontend/pages/HomePage.tsx`)
- Backend API → Transaction history: starts session (evidence: `backend/no-name-agent/main.py`)
- Backend API → Agent session: starts (evidence: `backend/no-name-agent/main.py`)
- Agent session → Root agent: runs agent (evidence: `backend/no-name-agent/main.py`)
- WebSocket client → Audio worklets: starts worklet (evidence: `backend/static/js/app.js`)
- WebSocket client → Backend API: streams messages (evidence: `README.md`)
- Root agent → Daily spending: delegates to (evidence: `backend/no-name-agent/agent.py`)
- Root agent → Investment research: delegates to (evidence: `backend/no-name-agent/agent.py`)
- Root agent → Financial data agent: delegates to (evidence: `backend/no-name-agent/agent.py`)
- Root agent → Large spending: delegates to (evidence: `backend/no-name-agent/agent.py`)
- Root agent → Advisor calendar: delegates to (evidence: `backend/no-name-agent/agent.py`)
- Daily spending → Spending specialists: uses specialists (evidence: `backend/no-name-agent/daily_spendings_agent/agent.py`)
- Financial data agent → Remote A2A service: queries remotely (evidence: `backend/no-name-agent/financial_agent/agent.py`)
- Backend API → Investment research: selects agent (evidence: `backend/no-name-agent/main.py`)
- Backend API → Daily spending: selects agent (evidence: `backend/no-name-agent/main.py`)
- Banking user → Proactive insights: requests insights (evidence: `README.md`)
- Chat dashboard → Insights UI: displays insights (evidence: `README.md`)
