Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions 03-Azure/01-04-AI/07_Fraud_Intelligence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fraud moves faster than manual review. Analysts piecing together transactions, c

An **agentic fraud intelligence system** continuously investigates operations and turns raw activity into evidence-backed decisions. It retrieves historical transaction evidence from **Azure Cosmos DB through an MCP server**, reasons over global, internal, and country-specific AML policies with **Foundry IQ agentic retrieval**, evaluates the rules that apply to both the origin and destination bank account countries, and produces audit-ready investigation reports and operational alerts.

Unlike earlier rule-based systems limited to rudimentary patterns, agentic systems reason through the *why* behind a flag. The complete workflow runs as a **hosted agent in Microsoft Foundry**, uses the **Microsoft Agent Framework** for orchestration, routes models and MCP servers through the new **AI Gateway tier (preview)**, and emits end-to-end telemetry to **Application Insights and Azure Managed Grafana**.
Unlike earlier rule-based systems limited to rudimentary patterns, agentic systems reason through the *why* behind a flag. The complete workflow runs as a **hosted agent in Microsoft Foundry**, uses the **Microsoft Agent Framework** for orchestration, routes MCP servers through the new **AI Gateway tier (preview)**, and emits end-to-end telemetry to **Application Insights and Azure Managed Grafana**.

While Fraud Intelligence is highly relevant for FSI — where fraud, money laundering, and insider trading draw constant regulatory scrutiny — the hack extends cleanly to any regulated industry. With a diverse audience, the goal is to broaden attendees' thinking: they leave with a **modern, reusable, Python-based component set** they can apply to their own domains.

Expand All @@ -22,7 +22,7 @@ A transaction enters the system. The fraud intelligence workflow must:
2. **Regulatory Assessment Agent** — use **Foundry IQ agentic retrieval** to apply global AML guidance, internal policies, and the regional regulations relevant to the origin and destination bank account countries.
3. **AML Report Agent** — transform the enriched evidence and regulatory assessment into a professional, audit-ready AML investigation report.
4. **Alert Manager Agent** — run in parallel with the AML Report Agent and use the Fraud Alert Manager MCP to create an operational alert when the regulatory status requires one.
5. **Fraud Intelligence Orchestration** — coordinate the agents with the **Microsoft Agent Framework**, deploy the workflow as a hosted agent in Microsoft Foundry, govern model and MCP traffic through **AI Gateway (preview)**, and emit traces and business metrics through OTLP.
5. **Fraud Intelligence Orchestration** — coordinate the agents with the **Microsoft Agent Framework**, deploy the workflow as a hosted agent in Microsoft Foundry, govern MCP traffic through **AI Gateway (preview)**, and emit traces and business metrics through OTLP.

The image below illustrates the conceptual scenario and agent roles:

Expand All @@ -47,7 +47,7 @@ flowchart LR

## Architecture

The hackathon builds a **Python-based, multi-agent Fraud Intelligence system**. Individual Microsoft Foundry agents are composed into a hosted workflow with the Microsoft Agent Framework. Foundry IQ supplies agentic retrieval over AML knowledge, while MCP servers provide access to financial evidence and alert-management actions. The AI Gateway tier (preview) provides a common control plane for model and MCP traffic.
The hackathon builds a **Python-based, multi-agent Fraud Intelligence system**. Individual Microsoft Foundry agents are composed into a hosted workflow with the Microsoft Agent Framework. Foundry IQ supplies agentic retrieval over AML knowledge, while MCP servers provide access to financial evidence and alert-management actions. The AI Gateway tier (preview) provides a common control plane for MCP traffic.

```mermaid
flowchart TB
Expand All @@ -65,7 +65,6 @@ flowchart TB
end

subgraph Gateway["AI Gateway tier (preview)"]
MODELS["Model gateway<br/>Routing + policies"]
MCPPROXY["Proxied MCP<br/>Financial Evidence MCP"]
MCPAPI["MCP generated from API<br/>Fraud Alert Manager"]
end
Expand All @@ -74,7 +73,6 @@ flowchart TB
FINMCP --> MCPPROXY
ALERTAPI["Fraud Alert Manager API"] --> MCPAPI
IQ --> AGENTS
ORCH --> MODELS
AGENTS --> MCPPROXY
AGENTS --> MCPAPI

Expand All @@ -100,7 +98,7 @@ By participating in this hackathon, you will learn how to:
- Build and integrate an **MCP server backed by Azure Cosmos DB** with a Microsoft Foundry agent
- Configure **Foundry IQ** with global, internal, and regional AML sources and use agentic retrieval for country-aware regulatory assessment
- Compose remote agents with the **Microsoft Agent Framework** and deploy the orchestration as a **hosted agent in Microsoft Foundry**
- Configure the **AI Gateway tier (preview)** for model and MCP traffic, including proxying an existing MCP and creating an MCP from an existing API
- Configure the **AI Gateway tier (preview)** for MCP traffic, including proxying an existing MCP and creating an MCP from an existing API
- Add end-to-end **OTLP tracing** and business metrics with **Application Insights**, then visualize operational and business outcomes in **Azure Managed Grafana**

---
Expand Down Expand Up @@ -166,7 +164,7 @@ Each challenge follows a consistent structure:
| **2** | [Build the Evidence Enrichment Agent](./challenges/challenge-02.md) | Build a **Financial Evidence MCP** over Azure Cosmos DB, integrate it with the **Evidence Enrichment Agent**, and validate evidence-backed transaction enrichment | 30 min |
| **3** | [Build the Regulatory Assessment Agent](./challenges/challenge-03.md) | Configure **Foundry IQ** with global, internal, and regional AML sources, then use agentic retrieval to assess rules for both bank account countries | 45 min |
| **4** | [Build and Orchestrate the Investigation](./challenges/challenge-04.md) | Build the **AML Report Agent**, compose the first three agents with the **Microsoft Agent Framework**, and deploy the orchestration as a Foundry hosted agent | 45 min |
| **5** | [Govern Models and MCP Servers](./challenges/challenge-05.md) | Introduce the **AI Gateway tier (preview)**, configure model access, proxy the Financial Evidence MCP, create a new MCP from the Fraud Alert Manager API, and add the parallel **Alert Manager Agent** | 45 min |
| **5** | [Govern MCP Servers](./challenges/challenge-05.md) | Introduce the **AI Gateway tier (preview)**, proxy the Financial Evidence MCP, create a new MCP from the Fraud Alert Manager API, and add the parallel **Alert Manager Agent** | 45 min |
| **6** | [Observe Fraud Intelligence](./challenges/challenge-06.md) | Add end-to-end **OTLP tracing**, publish technical and business metrics to **Application Insights**, and build a **Grafana** dashboard for business decision makers | 30 min |

> **Tip:** While it is possible to rush through the challenges, we encourage you to pause and reflect. Consider how each pattern relates to your own context: what business processes in your environment could benefit from coordinated AI agents? How might agents help orchestrate decisions across teams and systems?
Expand Down
22 changes: 11 additions & 11 deletions 03-Azure/01-04-AI/07_Fraud_Intelligence/challenges/challenge-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Open the [Azure portal](https://portal.azure.com) and sign in with the credentia

When prompted to choose an account, select **Use another account** and enter the credentials provided. Do not use your personal or work account.

![Sign in to the Azure portal with another account](/challenges/images/azureportal.png)
![Sign in to the Azure portal with another account](./images/azureportal.png)

In the Azure portal, select **Resource groups** from the navigation menu.

![Resource groups in the Azure portal navigation menu](/challenges/images/resource-groups.png)
![Resource groups in the Azure portal navigation menu](./images/resource-groups.png)

Open the resource group assigned to you and confirm that its resources have been deployed successfully.

![Resources deployed in the assigned resource group](/challenges/images/resource-group-resources.png)
![Resources deployed in the assigned resource group](./images/resource-group-resources.png)

Verify that you can access the resources used in the later challenges, including the Microsoft Foundry project, model deployments, Azure Cosmos DB account, and Application Insights resource.

Expand All @@ -38,41 +38,41 @@ Open [GitHub](https://github.com) and sign in with the credentials provided in y

When prompted to choose an account, select **Use another account**. Do not use your personal or work account.

![Sign in to GitHub with another account](/challenges/images/github-login.png)
![Sign in to GitHub with another account](./images/github-login.png)

Select **Sign in with your identity provider**, then use the assigned lab account to authenticate.

Open the GitHub organization assigned to your lab account.

![GitHub organization selector](/challenges/images/github-organization.png)
![GitHub organization selector](./images/github-organization.png)

Select the assigned organization, then open the `microhack` repository. You need to fork the repository before you can create a Codespace. To fork the repository, click the **Fork** button in the top-right corner of the repository page and follow the prompts:

![Create fork](/challenges/images/create-fork-1.png)
![Create fork](./images/create-fork-1.png)

Use a unique name for the repository name to avoid conflicts with other forks. For example, you can append your lab username to the repository name (e.g., `microhack-labuser-0001`):

![Fork repository with unique name](/challenges/images/create-fork-2.png)
![Fork repository with unique name](./images/create-fork-2.png)

Finally, you should see your forked repository with the unique name you provided and all files and folders from the original repository:

![Files and folders in the GitHub repository](/challenges/images/github-repository.png)
![Files and folders in the GitHub repository](./images/github-repository.png)

### 3. Create the development environment

From the repository page, select **Code**, then open the **Codespaces** tab. Select the `...` menu and choose **New with options**.

![Create a GitHub Codespace with options](/challenges/images/github-codespaces.png)
![Create a GitHub Codespace with options](./images/github-codespaces.png)

For **Dev container configuration**, select **Azure / AI / Fraud Intelligence**, then select **Create codespace**:

![Select Azure / AI / Fraud Intelligence dev container configuration](/challenges/images/select-dev-container.png)
![Select Azure / AI / Fraud Intelligence dev container configuration](./images/select-dev-container.png)

GitHub opens the Codespace in a new browser tab. Wait for the container setup to finish, then confirm that the repository files are visible in the Explorer and that the integrated terminal opens without errors.

> Important: When the Codespace finishes setting up, you are asked to open the full repository, select **Never**.

![Never open full repository prompt in GitHub Codespace](/challenges/images/never-open-full-repository.png)
![Never open full repository prompt in GitHub Codespace](./images/never-open-full-repository.png)

You should have a terminal ready to use, otherwise open a terminal in the Codespace (Terminal > New Terminal). Then run the following command to verify that Azure CLI is installed:

Expand Down
20 changes: 10 additions & 10 deletions 03-Azure/01-04-AI/07_Fraud_Intelligence/challenges/challenge-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ echo "financialEvidenceMcpEndpoint=https://$functionAppName.azurewebsites.net/ru

In the Azure portal, open the Function App and select **Functions** > **App keys** > **System keys**.

![MCP extension system key](/challenges/images/fin-evidence-mcp-key.png)
![MCP extension system key](./images/fin-evidence-mcp-key.png)

Copy the value of the `mcp_extension` key and add it to `hackenv`:

Expand All @@ -123,7 +123,7 @@ The agent will use the Financial Evidence MCP to retrieve evidence from Cosmos D

In the Azure portal, open your **Microsoft Foundry** resource and select **Go to Foundry Portal**. Sign in using your Hackbox credentials.

![Microsoft Foundry login](/challenges/images/foundry-login.png)
![Microsoft Foundry login](./images/foundry-login.png)

#### Explore the Foundry project

Expand All @@ -133,21 +133,21 @@ Next, connect the Application Insights resource deployed in your environment to

Open **Manage** and select **Project details** from the left menu. Select **Connected resources**, then **Add connection**.

![Connected resources in Microsoft Foundry](/challenges/images/foundry-connected-resources.png)
![Connected resources in Microsoft Foundry](./images/foundry-connected-resources.png)

Select **Application Insights**, then select **Continue**. Choose the Application Insights resource deployed for your lab, leave **API key** as the authentication method, and select **Connect**.

#### Create the agent

Under **Build**, open **Agents**, select **New agent**, then select **Build an agent**.

![Create a new agent in Microsoft Foundry](/challenges/images/foundry-new-agent.png)
![Create a new agent in Microsoft Foundry](./images/foundry-new-agent.png)

Name the agent `EvidenceEnrichmentAgent`.

The new agent opens with a blank configuration:

![Blank agent in Microsoft Foundry](/challenges/images/foundry-blank-agent.png)
![Blank agent in Microsoft Foundry](./images/foundry-blank-agent.png)

The chat model is selected automatically because it is the only deployed model that can power this agent. The embedding deployment is not a chat model.

Expand All @@ -161,7 +161,7 @@ Select **Add** > **Add tools**, open the **Custom** tab, select **Model Context

The MCP configuration form opens:

![Configure MCP tool in Microsoft Foundry](/challenges/images/foundry-configure-mcp-tool.png)
![Configure MCP tool in Microsoft Foundry](./images/foundry-configure-mcp-tool.png)

Configure these values:

Expand All @@ -175,11 +175,11 @@ Select **Connect**. Foundry returns to the agent page and displays the new MCP t

Open the MCP tool's `...` menu and select **Configure**:

![Configure MCP tool menu in Microsoft Foundry](/challenges/images/foundry-configure-mcp-tool-menu.png)
![Configure MCP tool menu in Microsoft Foundry](./images/foundry-configure-mcp-tool-menu.png)

Then enable **Always auto-approve all tools**.

![Configure auto approve for all tools in Microsoft Foundry](/challenges/images/foundry-auto-approve-tools.png)
![Configure auto approve for all tools in Microsoft Foundry](./images/foundry-auto-approve-tools.png)

This setting allows the agent to use the MCP tools without requesting approval for every call.

Expand All @@ -189,7 +189,7 @@ Select **Save**. Foundry creates a new version of the agent.

Open the **Playground** to test the agent.

![Test the agent in Microsoft Foundry Playground](/challenges/images/foundry-test-agent.png)
![Test the agent in Microsoft Foundry Playground](./images/foundry-test-agent.png)

Submit this transaction:

Expand All @@ -211,7 +211,7 @@ The response should be a JSON object that contains the original transaction enri

For this example, the agent should find three pieces of evidence. To inspect the trace, scroll to the bottom and select **Traces**. It shows the agent calling the MCP tools according to its instructions and using the returned evidence to enrich the transaction.

![Traces showing evidence data returned by the MCP tool](/challenges/images/foundry-traces-evidence.png)
![Traces showing evidence data returned by the MCP tool](./images/foundry-traces-evidence.png)

Select any **Execute tool** span to inspect the data returned by the MCP.

Expand Down
Loading