Skip to main content
Agentic SWMM: Auditable and Reproducible Stormwater Modelling Workflow with Skills and Model Context Protocol

Agentic SWMM: Auditable and Reproducible Stormwater Modelling Workflow with Skills and Model Context Protocol

This is a Preprint and has not been peer reviewed. This is version 3 of this Preprint.

Add a Comment

You must log in to post a comment.


Comments

Comment #291 Zhonghao Zhang @ 2026-05-09 16:53

Thank you very much for your interest in this work. :D

A short video introduction is aslo available here: http://aiswmm.com/

The code associated with this paper has also been fully open-sourced under the MIT License: https://github.com/Zhonghao1995/agentic-swmm-workflow

Any comments, suggestions, or feedback are very welcome. I would be very grateful to learn from different perspectives and continue improving this work.

Zhonghao

Downloads

Download Preprint

Supplementary Files

Authors

Zhonghao Zhang , Caterina Valeo

Abstract

Configuring urban hydrological models, such as the Storm Water Management Model (SWMM), for operational use remains onerous for many modellers. We propose aiswmm, a SWMM-specialized Agentic runtime, together with an Agentic SWMM workflow that embeds Skills and Model Context Protocol (MCP) tools to automate GIS preprocessing, model configuration, execution, and postprocessing. Each Skill encodes a hydrologic standard operating procedure (parameter defaults, validation thresholds, metric-extraction rules), narrowing the large language model's (LLM) role from open-ended generation to constrained Skill selection. To ensure that the entire Agentic SWMM workflow is auditable and reproducible, we proposed a verification-first, provenance contract embedded into Agentic SWMM workflow, that enables byte-level audit chain to LLM-driven hydrological modelling. Each run will create an independent manifest file that documents the SWMM version used, parameter mappings, input file hashes, and quality gate (e.g., continuity diagnostics). We demonstrate the workflow on the Tod Creek watershed (located on the Saanich Peninsula, British Columbia). We validated the proposed Agentic SWMM workflow at three levels: i) a QGIS based watershed-pour-point detection that agrees with the commercial PCSWMM® method to within 0.88% of the watershed perimeter (~7.5 pixels in the digital elevation model); ii) byte-identical SWMM output files (Secure Hash Algorithm 256-bit identical) between the command-line execution and the MCP paths across 60 paired simulations, and iii) peak inflow at the watershed outlet matching to three significant digits between the manual SWMM interface and Agentic SWMM workflows. The aiswmm runtime, Skills, MCP servers, and byte-level audit chain are released as open source and remain compatible with mainstream agentic runtimes (Codex, Claude Code, Hermes, and OpenClaw) to support reproducible SWMM modelling driven by natural language.

DOI

https://doi.org/10.31223/X5F47G

Subjects

Civil and Environmental Engineering, Civil Engineering, Computational Engineering, Engineering, Environmental Engineering, Hydraulic Engineering

Keywords

Hydrological Modelling, Agentic AI, SWMM, MCP

Dates

Published: 2026-03-17 16:04

Last Updated: 2026-05-21 16:41

Older Versions

License

CC BY Attribution 4.0 International

Additional Metadata

Conflict of interest statement:
None

Data Availability:
https://github.com/Zhonghao1995/agentic-swmm-workflow

Metrics

Views: 1022

Downloads: 132