How azure-samples/agentic-app-with-fabric works
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: banking_app.py Banking API · setup_workspace.py Provisioning · agentic_app_db.SQLDatabase SQL Database · components UI Views
Components 22
Browser UI
React application for banking, chat, analytics, and AI experiences.
- App Shell · Main frontend entry and top-level UI composition.
src/App.tsx - UI Views · Dashboard, transactions, chat, analytics, transfer, and AI widgets.
src/components - API Client · Frontend calls into backend analytics and banking APIs.
src/services/analyticsApi.ts
Python Backend
Local application tier, APIs, orchestration, and shared data access.
- Launcher · Starts the banking API and agent analytics services locally.
backend/launcher.py - Banking API · Transactional banking service for users, accounts, and transfers.
backend/banking_app.py - Analytics API · Backend service exposing analytics and reporting data for the UI.
backend/analytics_service.py - DB Connect · Shared connection and utility layer for database access.
backend/shared/db_connect.py - Cosmos Store · Cosmos DB access and chat/widget related models.
backend/cosmos_db.py
AI Layer
Multi-agent orchestration, tool calling, and MCP exposure.
- Agents Core · Coordinator and specialized agents for banking and analysis workflows.
backend/agents.py - Banking Agents · Multi-agent banking coordination and task routing.
backend/multi_agent_banking.py - Tooling · Shared tools and tool registration used by agents.
backend/agent_tools.py - Fabric Tool · Bridge from agents into the Fabric Data Agent capability.
backend/tools/fabric_data_agent_tool.py - MCP Server · 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 · Primary transactional store for banking, chat, agents, traces, and embeddings.
Fabric_artifacts/agentic_app_db.SQLDatabase - Lakehouse · Analytical data foundation for downstream model and reporting layers.
Fabric_artifacts/agentic_lake.Lakehouse - Semantic Model · Analytical model and relationships for OLAP reporting.
Fabric_artifacts/banking_semantic_model.SemanticModel - Insights Report · Visualization layer for analytics and banking insights.
Fabric_artifacts/Agentic_Insights.Report - Eventstream · Streams app usage and content-safety events into observability storage.
Fabric_artifacts/agentic_stream.Eventstream - Eventhouse · Queryable real-time event store for monitoring and diagnostics.
Fabric_artifacts/AgenticEventHouse.Eventhouse - Data 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 · Scripts that provision Azure/Fabric resources and finalize workspace artifacts.
scripts/setup_workspace.py - PDF Ingest · PDF-to-table ingestion and RAG preparation pipeline.
Data_Ingest/Ingest_pdf.py
Connections 26
- 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.