# azure-samples/agentic-app-with-fabric architecture

> Architecture diagram of the GitHub repository azure-samples/agentic-app-with-fabric, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azure-samples/agentic-app-with-fabric
- Repository: https://github.com/azure-samples/agentic-app-with-fabric

## Overview

1. This repo is an end-to-end banking demo built around three workload planes: an OLTP banking app, OLAP analytics/reporting, and an AI agent layer. The Microsoft Fabric workspace is the central data backbone tying those planes together.

2. The user-facing application is a React + Vite + TypeScript frontend under `src/`. It renders the dashboard, transactions, chat, analytics, transfer, and AI-related UI components, and talks to backend APIs rather than directly to Fabric or Azure services.

3. The Python backend under `backend/` is the application and orchestration tier. It contains the banking service, analytics service, agent logic, data models, and shared DB/connection utilities. `backend/launcher.py` starts two local services: the Banking API on port 5001 and Agent Analytics on port 5002.

4. The agent subsystem is the main AI boundary. `backend/agents.py`, `backend/multi_agent_banking.py`, `backend/agent_tools.py`, and `backend/tools/` suggest a multi-agent orchestration pattern with specialized agents and tool calling. The README calls out a coordinator, support, account, Fabric Data Agent, and visualization agent.

5. There is a separate MCP boundary in `backend/mcp_server/`, which likely exposes backend capabilities as tools to the agent layer or external clients. This is where tool invocation is decoupled from the business APIs.

6. The primary transactional store is Microsoft Fabric SQL Database, represented by `Fabric_artifacts/agentic_app_db.SQLDatabase/` and matching SQL scripts in `Data_Ingest/` and `backend/sql_scripts/`. This database holds banking entities such as users, accounts, transactions, chat history, sessions, agent definitions, tool definitions, traces, and embeddings/chunk tables for retrieval.

7. The analytics plane is built on Fabric Lakehouse + Semantic Model + Power BI Report. `Fabric_artifacts/agentic_lake.Lakehouse/` provides the data foundation, `Fabric_artifacts/banking_semantic_model.SemanticModel/` defines the analytical model and relationships, and `Fabric_artifacts/Agentic_Insights.Report/` is the visualization layer for OLAP reporting.

8. Real-time monitoring is handled through Fabric Eventstream and Eventhouse. `Fabric_artifacts/agentic_stream.Eventstream/` ingests app usage and content-safety events, and `Fabric_artifacts/AgenticEventHouse.Eventhouse/` stores/querys them via KQL. This creates a separate observability path from the core banking data path.

9. The AI retrieval/data-agent path is seeded from PDF ingestion. `Data_Ingest/Ingest_pdf.py` and the `RAG_Preparation/` PDF indicate a document-processing pipeline that populates raw chunks and embeddings tables. Those vectors support retrieval for the agents and likely drive the `DocsChunks_Embeddings` and `PDF_RawChunks` tables.

10. Cosmos DB is an additional operational store, modeled by `Fabric_artifacts/agentic_cosmos_db.CosmosDBDatabase/` and configured in backend env files. The README implies it is used for content or app data that is separate from SQL Database, and it is provisioned independently when Fabric Cosmos is not available.

11. Deployment is infrastructure-as-code-ish rather than manual. The `scripts/` folder provisions Azure resources, creates the Fabric workspace, deploys artifacts, sets up SQL views, and finalizes the report/model. The repo is designed to be reproducible via `preflight.py`, `setup_workspace.py`, and `finalize_views_and_report.py`.

12. The local dev environment is standardized with a VS Code Dev Container. `.devcontainer/` installs Python, Node, and ODBC dependencies, which matters because the backend needs database connectivity and the frontend/backend are typically run together during development.

13. A useful diagram should show four main boundaries: browser UI, Python backend services, AI/tooling layer, and Fabric/Azure data services. The highest-value flows are: user actions into the backend, backend writes to SQL/Cosmos, agents querying tools and data-agent services, analytics flowing into the semantic model/report, and telemetry streaming into Eventhouse.

Main entry points: [`backend/banking_app.py`](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/banking_app.py) (Banking API), [`scripts/setup_workspace.py`](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/scripts/setup_workspace.py) (Provisioning), [`Fabric_artifacts/agentic_app_db.SQLDatabase`](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_app_db.SQLDatabase) (SQL Database), [`src/components`](https://github.com/azure-samples/agentic-app-with-fabric/tree/main/src/components) (UI Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Browser UI"]
  node_src_app["App Shell<br/>React/Vite app<br/>[App.tsx]"]
  node_src_components["UI Views<br/>React components"]
  node_src_services["API Client<br/>frontend service<br/>[analyticsApi.ts]"]
end

subgraph group_backend["Python Backend"]
  node_backend_launcher["Launcher<br/>service bootstrap<br/>[launcher.py]"]
  node_banking_app["Banking API<br/>Flask/API service<br/>[banking_app.py]"]
  node_analytics_service["Analytics API<br/>analysis service"]
  node_shared_db["DB Connect<br/>shared data access<br/>[db_connect.py]"]
  node_cosmos_db[("Cosmos Store<br/>operational datastore<br/>[cosmos_db.py]")]
end

subgraph group_agents["AI Layer"]
  node_agents_core["Agents Core<br/>multi-agent orchestration<br/>[agents.py]"]
  node_multi_agent["Banking Agents<br/>agent workflow"]
  node_agent_tools["Tooling<br/>tool layer<br/>[agent_tools.py]"]
  node_fabric_tool["Fabric Tool<br/>data-agent tool"]
  node_mcp_server["MCP Server<br/>tool boundary<br/>[server.py]"]
end

subgraph group_fabric["Fabric & Data"]
  node_sql_db[("SQL Database<br/>Fabric SQL")]
  node_lakehouse[("Lakehouse")]
  node_semantic_model["Semantic Model<br/>Power BI model"]
  node_report["Insights Report<br/>Power BI report"]
  node_eventstream["Eventstream<br/>stream ingest"]
  node_eventhouse[("Eventhouse<br/>KQL store")]
  node_data_agent["Data Agent<br/>Fabric agent"]
end

subgraph group_ops["Deployment & Dev"]
  node_deploy["Provisioning<br/>automation scripts<br/>[setup_workspace.py]"]
  node_ingest["PDF Ingest<br/>data ingestion<br/>[Ingest_pdf.py]"]
end

node_src_app -->|"renders"| node_src_components
node_src_app -->|"calls"| node_src_services
node_src_components -->|"banking"| node_banking_app
node_src_components -->|"analytics"| node_analytics_service
node_backend_launcher -->|"starts"| node_banking_app
node_backend_launcher -->|"starts"| node_analytics_service
node_banking_app -->|"reads/writes"| node_shared_db
node_analytics_service -->|"queries"| node_shared_db
node_banking_app -.->|"optional store"| node_cosmos_db
node_agents_core -->|"coordinates"| node_multi_agent
node_agents_core -->|"uses"| node_agent_tools
node_multi_agent -->|"retrieves"| node_fabric_tool
node_agent_tools -->|"exposes"| node_mcp_server
node_mcp_server -.->|"bridges"| node_banking_app
node_fabric_tool -->|"wraps"| node_data_agent
node_data_agent -->|"queries"| node_sql_db
node_ingest -->|"seeds"| node_sql_db
node_sql_db -->|"curates"| node_lakehouse
node_lakehouse -->|"models"| node_semantic_model
node_semantic_model -->|"drives"| node_report
node_banking_app -->|"emits events"| node_eventstream
node_eventstream -->|"stores"| node_eventhouse
node_deploy -->|"provisions"| node_sql_db
node_deploy -->|"deploys"| node_lakehouse
node_deploy -->|"finalizes"| node_semantic_model
node_deploy -->|"publishes"| node_report

click node_src_app "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/src/App.tsx"
click node_src_components "https://github.com/azure-samples/agentic-app-with-fabric/tree/main/src/components"
click node_src_services "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/src/services/analyticsApi.ts"
click node_backend_launcher "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/launcher.py"
click node_banking_app "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/banking_app.py"
click node_analytics_service "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/analytics_service.py"
click node_shared_db "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/shared/db_connect.py"
click node_cosmos_db "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/cosmos_db.py"
click node_agents_core "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/agents.py"
click node_multi_agent "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/multi_agent_banking.py"
click node_agent_tools "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/agent_tools.py"
click node_fabric_tool "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/tools/fabric_data_agent_tool.py"
click node_mcp_server "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/mcp_server/server.py"
click node_sql_db "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_app_db.SQLDatabase"
click node_lakehouse "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_lake.Lakehouse"
click node_semantic_model "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/banking_semantic_model.SemanticModel"
click node_report "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/Agentic_Insights.Report"
click node_eventstream "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_stream.Eventstream"
click node_eventhouse "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/AgenticEventHouse.Eventhouse"
click node_data_agent "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/Banking_DataAgent.DataAgent"
click node_deploy "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/scripts/setup_workspace.py"
click node_ingest "https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Data_Ingest/Ingest_pdf.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_src_app,node_src_components,node_src_services toneBlue
class node_backend_launcher,node_banking_app,node_analytics_service,node_shared_db,node_cosmos_db toneAmber
class node_agents_core,node_multi_agent,node_agent_tools,node_fabric_tool,node_mcp_server toneMint
class node_sql_db,node_lakehouse,node_semantic_model,node_report,node_eventstream,node_eventhouse,node_data_agent toneRose
class node_deploy,node_ingest toneIndigo
```

## Components

### Browser UI

React application for banking, chat, analytics, and AI experiences.

- [App Shell](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/src/App.tsx): React/Vite app · Main frontend entry and top-level UI composition. · `src/App.tsx`
- [UI Views](https://github.com/azure-samples/agentic-app-with-fabric/tree/main/src/components): React components · Dashboard, transactions, chat, analytics, transfer, and AI widgets. · `src/components`
- [API Client](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/src/services/analyticsApi.ts): frontend service · Frontend calls into backend analytics and banking APIs. · `src/services/analyticsApi.ts`

### Python Backend

Local application tier, APIs, orchestration, and shared data access.

- [Launcher](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/launcher.py): service bootstrap · Starts the banking API and agent analytics services locally. · `backend/launcher.py`
- [Banking API](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/banking_app.py): Flask/API service · Transactional banking service for users, accounts, and transfers. · `backend/banking_app.py`
- [Analytics API](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/analytics_service.py): analysis service · Backend service exposing analytics and reporting data for the UI. · `backend/analytics_service.py`
- [DB Connect](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/shared/db_connect.py): shared data access · Shared connection and utility layer for database access. · `backend/shared/db_connect.py`
- [Cosmos Store](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/cosmos_db.py): operational datastore · Cosmos DB access and chat/widget related models. · `backend/cosmos_db.py`

### AI Layer

Multi-agent orchestration, tool calling, and MCP exposure.

- [Agents Core](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/agents.py): multi-agent orchestration · Coordinator and specialized agents for banking and analysis workflows. · `backend/agents.py`
- [Banking Agents](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/multi_agent_banking.py): agent workflow · Multi-agent banking coordination and task routing. · `backend/multi_agent_banking.py`
- [Tooling](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/agent_tools.py): tool layer · Shared tools and tool registration used by agents. · `backend/agent_tools.py`
- [Fabric Tool](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/tools/fabric_data_agent_tool.py): data-agent tool · Bridge from agents into the Fabric Data Agent capability. · `backend/tools/fabric_data_agent_tool.py`
- [MCP Server](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/backend/mcp_server/server.py): tool boundary · Exposes backend capabilities through a separate MCP interface. · `backend/mcp_server/server.py`

### Fabric & Data

Microsoft Fabric and Azure data services used for storage, analytics, and monitoring.

- [SQL Database](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_app_db.SQLDatabase): Fabric SQL · Primary transactional store for banking, chat, agents, traces, and embeddings. · `Fabric_artifacts/agentic_app_db.SQLDatabase`
- [Lakehouse](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_lake.Lakehouse): Fabric lakehouse · Analytical data foundation for downstream model and reporting layers. · `Fabric_artifacts/agentic_lake.Lakehouse`
- [Semantic Model](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/banking_semantic_model.SemanticModel): Power BI model · Analytical model and relationships for OLAP reporting. · `Fabric_artifacts/banking_semantic_model.SemanticModel`
- [Insights Report](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/Agentic_Insights.Report): Power BI report · Visualization layer for analytics and banking insights. · `Fabric_artifacts/Agentic_Insights.Report`
- [Eventstream](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/agentic_stream.Eventstream): stream ingest · Streams app usage and content-safety events into observability storage. · `Fabric_artifacts/agentic_stream.Eventstream`
- [Eventhouse](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/AgenticEventHouse.Eventhouse): KQL store · Queryable real-time event store for monitoring and diagnostics. · `Fabric_artifacts/AgenticEventHouse.Eventhouse`
- [Data Agent](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Fabric_artifacts/Banking_DataAgent.DataAgent): Fabric agent · Fabric Data Agent configuration used by the AI layer for SQL-backed retrieval. · `Fabric_artifacts/Banking_DataAgent.DataAgent`

### Deployment & Dev

Reproducible setup, provisioning, and local development tooling.

- [Provisioning](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/scripts/setup_workspace.py): automation scripts · Scripts that provision Azure/Fabric resources and finalize workspace artifacts. · `scripts/setup_workspace.py`
- [PDF Ingest](https://github.com/azure-samples/agentic-app-with-fabric/blob/main/Data_Ingest/Ingest_pdf.py): data ingestion · PDF-to-table ingestion and RAG preparation pipeline. · `Data_Ingest/Ingest_pdf.py`

## Connections

- App Shell → UI Views: renders · App shell composes the major banking and AI views.
- App Shell → API Client: calls · Frontend uses API clients rather than direct data-service access.
- UI Views → Banking API: banking · UI actions flow to transactional banking endpoints.
- UI Views → Analytics API: analytics · Analytics and reporting views query backend analytics APIs.
- Launcher → Banking API: starts · Local launcher brings up the banking service.
- Launcher → Analytics API: starts · Local launcher brings up the agent analytics service.
- Banking API → DB Connect: reads/writes · Banking operations persist users, accounts, transactions, and chat state.
- Analytics API → DB Connect: queries · Analytics service reads operational and agent data for reporting.
- Banking API → Cosmos Store: optional store · Some operational or chat data is routed to Cosmos-backed models.
- Agents Core → Banking Agents: coordinates · Core orchestrator delegates to specialized banking agents.
- Agents Core → Tooling: uses · Agents invoke shared tools for database and service actions.
- Banking Agents → Fabric Tool: retrieves · Specialized agents can query Fabric-backed data via the data-agent tool.
- Tooling → MCP Server: exposes · Tools are surfaced through the MCP boundary for decoupled invocation.
- MCP Server → Banking API: bridges · MCP can forward tool-backed operations into backend business APIs.
- Fabric Tool → Data Agent: wraps · Backend tool connects to the Fabric Data Agent configuration.
- Data Agent → SQL Database: queries · Data agent is configured against the transactional SQL database.
- PDF Ingest → SQL Database: seeds · Document ingestion populates raw chunks and embeddings tables.
- SQL Database → Lakehouse: curates · Operational banking data is shaped for analytical consumption.
- Lakehouse → Semantic Model: models · Semantic model sits on top of the lakehouse data foundation.
- Semantic Model → Insights Report: drives · Report visuals are built from the semantic model.
- Banking API → Eventstream: emits events · App usage and safety events are streamed for observability.
- Eventstream → Eventhouse: stores · Real-time telemetry lands in the KQL event store.
- Provisioning → SQL Database: provisions · Automation creates views and database artifacts.
- Provisioning → Lakehouse: deploys · Workspace provisioning includes Fabric lakehouse artifacts.
- Provisioning → Semantic Model: finalizes · Deployment scripts complete views and reporting setup.
- Provisioning → Insights Report: publishes · Report artifacts are finalized as part of workspace setup.
