Pipeline Leak-Detection Agent (2nd Place, AWS × Anthropic Energy Hackathon)

A pipeline leak-detection agent built in one day at the AWS × Anthropic Energy Hackathon in Houston and deployed on Amazon Bedrock AgentCore. It classified all 20 labelled events correctly and placed leaks within 5 miles on average on a 200-mile line. 2nd place.

🌐 View on GitHub

Pipeline Leak-Detection Agent

Overview

On September 16, 2026 I took part in the AWS × Anthropic "Claude Code + Bedrock AgentCore" hackathon at an energy symposium in Houston, representing Minfy as part of a three-person team. Teams picked one of four energy use cases. Everything had to be built with Claude Code and deployed on Amazon Bedrock AgentCore. We took 2nd place.

We picked Use Case 3: Pipeline Leak Detection & Integrity Agent (midstream). The setup was a 200-mile, 24-inch gas transmission line with 8 SCADA stations. The hard part is telling real leaks apart from normal operational transients like compressor starts, valve changes and temperature-driven line-pack shifts. A false alarm can mean a shutdown costing $100k+, and a missed leak risks PHMSA penalties. The data included 90 days of 5-minute SCADA readings (207,360 rows), 5 labelled leaks, 15 labelled false positives, and supporting files: segment metadata, weather, valve status, inspections and regulations. Every claim the agent made had to trace back to that data.

How it works

The team built a single Strands Agents agent on Claude Sonnet 4.5 that follows a fixed workflow: detect and triage, then response, then compliance. It cites the file and row behind every claim and says so plainly when the data doesn't support a conclusion. All of its tools compute their answers from the CSVs. There are no hard-coded verdicts and no matching on event IDs.

Alarm → query_scada (is there a sustained mass-balance deficit?)
      → check_operational_context (compressor start? valve change? temperature swing?)
      → locate_leak (pressure-gradient ratio → segment, mile marker, valves to close)
      → response + compliance steps, with citations

My teammates built the agent's response and compliance tools and the Streamlit operator console. My part was the detection side, the team coordination setup, and the AgentCore deployment.

What I built

Splitting the work and keeping three Claude Code sessions in sync

Three detection tools

Validation harness

I wrote validate_all_events.py to run the detection logic over all 20 labelled events and score it against the labels (results below).

Integration and deployment

Results

Lessons

Stack: Python, pandas · Strands Agents SDK · Amazon Bedrock (Claude Sonnet 4.5) · Amazon Bedrock AgentCore Runtime · boto3 · Claude Code · git/GitHub