Portfolio

Data Engineering & Agentic AI

A lakehouse pipeline paired with a Claude agent that investigates royalty fraud across millions of streaming events, and a Neo4j graph that finds the bot farms behind it. The agent can propose withholding a payout, but it can never withhold one: every hold needs human approval, and the guardrails are enforced in code, not just requested in a prompt. It's deployed as three microservices on Azure Container Apps, and a Microsoft Copilot Studio agent connects to it through MCP without being able to bypass a single rule.
music man banner

Music Man – Agentic Royalty-Fraud Detection Lakehouse

PySpark · Delta Lake · Databricks · Neo4j · Claude Agent · LangGraph · Agno · Azure · Copilot Studio

See It In Action

Databricks
databricks graph boxes

From Laptop to Lakehouse Platform

The same bronze → silver → gold pipeline and fraud model run as one serverless Databricks job, deployed with an Asset Bundle. Tables land in Unity Catalog, the training run logs to the workspace’s MLflow, and the model is registered in Unity Catalog. Bronze to gold over 2.1 million play events takes under three minutes.

Porting, Tested
databricks lineage graph

Two Differences, Two Tests

Moving to Databricks surfaced two real differences from local Spark: timestamps arrived without a time zone, which broke the session-gap math, and pandas frames carried Spark query metrics that couldn’t be saved. Both are fixed in one small storage layer that switches between local Delta folders and Unity Catalog, and both have tests, so the local run and the Databricks run stay the same code.

Microsoft Copilot Studio
music man edit tool

A Copilot That Can’t Break the Rules

A Copilot Studio agent connects to Music Man’s MCP server with an API key and discovers its investigation tools. The rules stay on the server: no proposal without a policy check, no hold for an artist or day that doesn’t exist, and no approval tool at all. Every proposal waits in the review queue for a human.

Cloud-Native on Azure
screenshot 2026 10 21 190128

Three Services, One Rulebook

The MCP server, the webhook, and the review app run as separate containers on Azure Container Apps, sharing one Azure PostgreSQL database. The whole setup is defined in Bicep: managed-identity image pulls (no registry passwords), secrets kept out of the code, scale-to-zero, and Microsoft Entra sign-in in front of the approval app.

Fraud Detection
metrics shot

The Graph Found the Real Bug

The model first appeared to score 67% precision, with “false positives” that looked like popular artists. A Neo4j graph proved otherwise: every one was the second day of a real bot attack that ran past midnight, and the data generator had labelled only the first day. With every attack day labelled, the model scores 100% precision and 100% recall. The model was right; the labels were wrong.

Graph Analytics
bots 1

A Bot Farm, Found by a Graph

50 accounts sharing 15 devices: a bot farm that per-artist statistics can’t see. Neo4j and Graph Data Science (connected components) find rings like this across 2.1M streaming events.

Coordinated Operator
bots 2

One Ring, One Target

150 bot accounts, linked through 40 shared devices, all streaming the same artist on the same days. The agent’s find_fraud_ring tool shows this ring streamed 12 artists in total: one coordinated operator, not 12 separate incidents.

Agentic Investigation
agent excerpt

Real Agent Reasoning, Not Scripted Output

Mid-investigation, the agent questioned its own evidence: “That uniformity could indicate a single coordinated operation across artists, or it could be an artifact of how the detector or the data is constructed.” It wasn’t told to check, and it was right: it had found a flaw in my data generator.

Measured, Not Assumed
eval results

20 Graded Runs, Real Numbers

Five test scenarios, including a prompt injection hidden in an artist’s name and a popular artist built to look like fraud. Across 20 runs: 100% task completion, zero false holds, zero ungrounded rationales. Routing planning to a smaller model cut cost per run by 25%.

Same Agent, Three Engines
three engines

Hand-Written Loop vs. LangGraph vs. Agno

I built the same agent three ways: my own tool loop, LangGraph, and Agno, all on one shared guardrail layer. On the same live tests, LangGraph matched my loop: 8 of 8 passes each, zero false holds, $0.072 vs. $0.074 per run. The Agno engine runs on the same eval harness and is tested offline against the real framework; its live numbers come next.

Framework Testing
framework testing

The Limit That Didn’t Stop

Before trusting Agno, I tested how it behaves. Its tool-call limit answers extra calls with an error but keeps asking the model, so an agent that keeps requesting tools never stops. In an offline test it was still looping after 40 model calls. I added a hard turn budget, the same one my other engines use, plus a test that proves it holds.

Core Capabilities

Lakehouse-Scale Fraud Detection

Millions of Events, Real Features

A bronze-to-gold PySpark and Delta Lake pipeline turns 2.1M streaming events into four bot-farm signals: burst velocity, device concentration, duration regularity, and geo-impossible travel.

Agentic Investigation, Not Just Scoring

Plans, Investigates, Reasons

A Claude agent plans its investigation, cross-checks raw signals instead of trusting a single anomaly score, and writes a rationale a human can actually evaluate before deciding.

Human-Approved Action

Nothing Executes Automatically

The agent can only queue a hold. A human approves or rejects it in the review app, approved holds can be released later with a written reason, and every decision is logged.

Production Hardening

Built to Fail Safely

Approvals that can’t apply twice, proposals that are safe to retry, a rollback path, dry-run mode, and an iteration budget, with the cost of every run recorded. The approval queue runs on SQLite locally or PostgreSQL in the cloud, with the same guarantees on both, and the test suite passes on both.

One Rulebook, Four Surfaces

MCP, LangGraph, Agno & Webhooks

Every guardrail lives in one shared layer, used by an MCP server, a LangGraph agent with checkpointed human review, an Agno agent, and a signed, idempotent webhook. No client can skip the rules, including Microsoft Copilot Studio, which connects through the MCP server.

Fraud Rings in Neo4j

 Graph Analytics, Not Just Aggregates

Accounts and devices become a graph; Graph Data Science finds the rings where many accounts share a few devices. The agent queries it with Cypher through the same guardrail layer as every other tool.

Technology Stack

Music Man integrates lakehouse data engineering, machine learning, and agentic AI into one pipeline — it runs locally, deploys to Azure Container Apps, and it runs end to end as a serverless Databricks job.

Data Engineering

  • PySpark
  • Delta Lake
  • Pandas
  • PyArrow
  • Databricks (serverless jobs, Asset Bundles)
  • Unity Catalog (tables, volumes, model registry)

Machine Learning

  • scikit-learn (Gradient Boosting)
  • MLflow

Agentic AI

  • Claude (Anthropic SDK)
  • Tool runner + structured outputs
  • Prompt caching
  • Model routing: Haiku → Opus
  • Pydantic
  • LangGraph (interrupt + checkpointing)
  • Agno (structured planner + turn budget)
  • MCP server

MLOps & Architecture

  • Medallion architecture
  • Kaggle-seeded real data
  • Streamlit review UI
  • Docker + uv
  • Docker Compose (3 services + Postgres)
  • MCP over HTTP (API-key auth)
  • pytest (64 tests)
  • FastAPI webhook (HMAC, idempotent)

Evaluation & Testing

  • LLM-as-judge (Sonnet 5)
  • Golden transcripts
  • Red-team scenarios
  • Three-engine & routing comparisons

Graph

  • Neo4j 5.26
  • Graph Data Science (connected components)
  • Cypher
  • Docker Compose

Cloud & Microsoft

  • Azure Container Apps (scale to zero)
  • Azure Database for PostgreSQL
  • Azure Container Registry (managed identity)
  • Bicep (infrastructure as code)
  • Microsoft Entra ID sign-in
  • Microsoft Copilot Studio (via MCP)

Copyright © 2026 geotheleo.com · Impressum · Privacy Policy