A reasoning agent that diagnoses data-pipeline failures (schema drift, missing partitions, and data-quality regressions) by grounding on runbooks, lineage, and past incidents via Foundry IQ, then returning a cited root cause and fix with a confidence score and an audit log of its reasoning.
- Hackathon: Agents League @ Microsoft AI Skills Fest 2026
- Track: 🧠 Reasoning Agents (built on Microsoft Foundry)
- Required IQ layer: Foundry IQ for permission-aware, cited retrieval over the knowledge corpus.
When a data pipeline breaks at 02:00, on-call engineers waste the most time on the diagnosis, not the fix: tracing a cryptic error through lineage, schema history, and half-remembered past incidents. This agent does that triage in seconds, with citations on every claim, so a human can approve the fix with confidence.
- Triage: ingest the incident signal (a dbt/Airflow log or a DQ alert) and classify the failure type.
- Ground (Foundry IQ): retrieve the relevant lineage, schema changelog entries, the matching runbook, and similar past postmortems. Every retrieved fact is cited.
- Hypothesize: produce a ranked list of candidate root causes with explicit, step-by-step reasoning.
- Verify: a verifier sub-agent (LLM-as-judge pattern) tests each hypothesis against the retrieved evidence and drops any claim not supported by a citation.
- Recommend: output the confirmed root cause + a concrete, cited fix.
- Safety: the agent proposes, never executes; it emits a confidence score and a full audit log of the reasoning trace.
Point Foundry IQ at the knowledge/ folder:
knowledge/
architecture-and-lineage.md # pipeline DAG, tables, owners, schedules, SLAs
schema-changelog.md # timestamped upstream schema changes (breaking flagged)
runbooks/
schema-drift.md
missing-late-partition.md
data-quality-null-spike.md
source-freshness-sla.md
postmortems/
2026-05-21-revenue-dashboard-empty.md
2026-05-28-orders-null-spike.md
The incidents/ folder holds three ready-to-diagnose inputs (the agent's test
cases); demo/ holds the demo walkthrough.
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # fill in Foundry project + IQ values for live runsFrom the repo root (uses PYTHONPATH=src so python -m agent resolves):
PYTHONPATH=src python -m agent diagnose incidents/incident-01-dbt-failure.logWith .env configured, the command runs triage, Foundry IQ retrieval, reasoning,
verification, and recommendation against your knowledge base. Without Foundry env
vars it falls back to local mode (keyword retrieval over knowledge/ plus
heuristic steps) and prints a notice on stderr.
Force local mode:
PYTHONPATH=src python -m agent diagnose incidents/incident-01-dbt-failure.log --localEach run prints a cited root cause, a propose-only fix (action_type: proposal), and
writes a full audit JSON under runs/.
Run all three fixtures:
PYTHONPATH=src python -m agent diagnose incidents/incident-01-dbt-failure.log
PYTHONPATH=src python -m agent diagnose incidents/incident-02-airflow-traceback.txt
PYTHONPATH=src python -m agent diagnose incidents/incident-03-dq-alert.jsonpip install -r requirements-dev.txt
pytest| Incident | Input | Expected root cause |
|---|---|---|
| 1 (demo) | incidents/incident-01-dbt-failure.log |
Upstream rename orders.amount → order_amount at 02:14 broke stg_orders |
| 2 | incidents/incident-02-airflow-traceback.txt |
Upstream daily export for date=2026-06-11 landed late → missing partition |
| 3 | incidents/incident-03-dq-alert.json |
Source deploy began emitting NULL order_amount (data regression) |
Root cause (confidence 0.93): The dbt model
stg_ordersfailed withcolumn "amount" does not exist. The upstream Source team renamedraw.orders.amount→order_amountat 2026-06-10 02:14 UTC [schema-changelog.md], whilestg_ordersstill selectsamount[architecture-and-lineage.md]. This matches the schema-drift pattern [runbooks/schema-drift.md] and precedent SEV-2 on 2026-05-21 [postmortems/2026-05-21-revenue-dashboard-empty.md].Recommended fix: update
stg_orderstoselect order_amount as amount, thendbt build --select stg_orders+and refresh "Revenue Daily". Action type: proposal only, not executed.
- Microsoft Foundry: agent runtime and orchestration of the reasoning loop.
- Foundry IQ: retrieval over
knowledge/with citations. - (Optional stretch) Fabric IQ: reason over the warehouse schema semantics directly, on top of the document grounding.
- Reasoning & multi-step thinking (20%): explicit triage → ground → hypothesize → verify → recommend chain.
- Reliability & safety (20%): propose-only, confidence scoring, audit log, and a verifier that suppresses unsupported claims.
- Accuracy & relevance (20%): every conclusion is tied to a cited source.
- Creativity & originality (15%): pipeline incident diagnosis is a concrete use case for a cited reasoning loop.
- UX & presentation (15%): cited output and a short demo.
- Community vote (10%): share progress in the Agents League Discord.
MIT (sample/synthetic data; no confidential information).