Agentic SWMM
Agentic SWMM Workflow
Pre-1.0 · stable v0.7.3 ·
pip install aiswmm==0.7.3· CHANGELOG 🚧 In active development: a UI that will become the primary interface, replacing CLI-first UX.
Agentic SWMM for reproducible stormwater modeling aiswmm runtime + Skills + MCP + SWMM + verification-first workflow + Obsidian-compatible audit · also compatible with Codex, OpenClaw, and Hermes Agent.
A five-minute, one-command Agentic SWMM workflow that is auditable, memory-informed, and agent-ready.
Try our Live Demo at aiswmm.com
Great news: Our paper has been officially published in AI for Engineering, an MDPI journal, on June 9, 2026. Paper
Project Overview
Agentic SWMM is an open-source, verification-first framework for reproducible and extensible stormwater modelling, starting with EPA SWMM. It connects QGIS-based preprocessing, SWMManywhere-based synthetic model generation, deterministic SWMM execution, QA checks, provenance tracking, calibration support, documentation, and modelling memory, while keeping human modellers in control.
The goal is not to replace SWMM or the modeller, but to build an agentic modelling layer that makes stormwater-modelling workflows easier to reproduce, audit, extend, remember, and trust. Agentic SWMM comes with aiswmm as its built-in runtime. Users can describe a modelling goal in natural language, while model execution remains deterministic, inspectable, and artifact-based. The repository's MCP servers and Skills can also be used with other agent runtimes, including Codex, Claude, OpenClaw, and Hermes.
This is not a simple chat-to-SWMM wrapper. The aiswmm runtime can help coordinate the workflow, but model files, SWMM runs, QA checks, plots, provenance records, audit notes, and modelling memory remain visible as reusable artifacts. Modelling memory can summarize repeated problems and propose Skill refinements, but accepted changes still require human review and benchmark verification.
Authors: Zhonghao Zhang & Caterina Valeo
License: MIT
Related MCP server: consult-mcp
Why this project exists
Stormwater modelling is rarely one command. A typical SWMM project can involve GIS preprocessing, rainfall formatting, parameter assignment, network assembly, INP construction, model execution, QA checks, plots, calibration, uncertainty analysis, and reporting.
Agentic SWMM provides a middle path: natural-language orchestration with deterministic SWMM execution, explicit provenance, project memory, and verification-first modelling.
What makes it different
Quick onboarding: start from one-line macOS/Linux or Windows installers, with Docker and Python package paths documented separately.
Agent-guided, SWMM-grounded: agents can coordinate tasks, while model execution stays deterministic, inspectable, and CLI-runnable.
Modular skill layer: GIS, climate, building, running, plotting, calibration, uncertainty, audit, and orchestration are separated into reusable modules with MCP interfaces where available.
Verification-first provenance: build, run, audit, and comparison stages emit traceable artifacts before outputs are treated as evidence.
Supervised skill evolution: audited runs can surface recurring workflow patterns and propose updates to existing skills or new skills, while staying coupled to the current skill-driven framework.
Meet your agent in about five minutes
macOS and Linux:
curl -fsSL https://aiswmm.com/install.sh | bashWindows PowerShell:
irm https://aiswmm.com/install.ps1 | iexReproducible run (pinned Docker image, v0.7.3) — no local install:
docker run --rm -v "$PWD/runs:/app/runs" ghcr.io/zhonghao1995/agentic-swmm-workflow:v0.7.3 acceptanceAfter installation, launch the runtime with aiswmm.
One-line installers run a remote script — review it first if you want to see what executes. The installer can set up your OpenAI API key, or you can configure one later via your shell; see API key configuration. Never paste API keys into the aiswmm conversation.
Three ways in — one-line installer, Docker, or pip — compared side by side (what you get, prerequisites, reproducibility, when to pick each): choosing an install path.
Workflow
The workflow has three connected layers: execution, modeling memory, and controlled skill evolution. Natural-language requests can trigger reproducible SWMM actions; audited artifacts update human-readable and machine-readable memory; repeated patterns can produce skill-refinement proposals that still require human review and benchmark verification.
What a run can produce
generated or supplied SWMM input files such as
model.inpSWMM report and binary outputs such as
.rptand.outmanifests, command traces, QA summaries, and parsed peak-flow metrics
rainfall-runoff figures, calibration summaries, and fuzzy uncertainty summaries
audit records:
experiment_provenance.json,comparison.json, andexperiment_note.mdObsidian-ready modelling notes and modelling-memory summaries
Validation snapshot
The repository includes runnable benchmarks and research previews with different evidence boundaries. The README keeps only the index; figures, commands, and boundary notes live in Validation evidence.
Path | What it shows | Evidence boundary |
QGIS-to-Agentic SWMM preprocessing using entropy and fuzzy-similarity concepts from Zhang & Valeo's Journal of Hydrology paper | GIS preprocessing concept, not a calibrated SWMM performance claim | |
Public TUFLOW GeoPackage layers converted into SWMM-ready artifacts, QA, and audit | Structured raw GIS path, not arbitrary CAD/GIS recognition | |
External 40-subcatchment Tecnopolo model execution, plotting, and direct | Prepared INP validation path | |
Tecnopolo HORTON parameter perturbation and hydrograph envelope preview | Prior uncertainty smoke, not calibration | |
Raw-like inputs extracted from a public SWMM fixture and rebuilt through the modular path | Adapter handoff check, not greenfield watershed generation | |
A natural-language prompt ( | SWMM execution-layer reproducibility, not agentic workflow reproducibility | |
LLM-driven dispatch + data-scarce urban modeling (SWMManywhere) | A single natural-language sentence referring only to a WGS84 bounding box drives the end-to-end SWMManywhere → SWMM → audit → network-map workflow on two independent regions (Greenwich Peninsula and NYC Midtown, ~1 km² each) — no shapefile, no DEM file, no step-by-step tool instructions. Synthesis is the work of SWMManywhere (Imperial College London, BSD-3-Clause). | Agent-side plumbing for data-scarce baseline modeling; not a calibrated or validated network. Calibration is next-milestone scope. |
An 11-word user prompt drove a complete Tecnopolo run on 2026-05-28 during which the LLM autonomously queried | Memory layer fires correctly and shapes planner decisions; staleness weighting and negative-precedent handling are next-milestone scope. |
Examples: TUFLOW and Tecnopolo.
Audit and research memory
The audit layer consolidates artifacts, QA checks, and metric provenance into an Obsidian-compatible experiment note. This example catches a recorded peak-flow value that does not match the value re-parsed from the SWMM report source section.
The downstream modelling-memory layer can summarize audited run histories into recurring failure patterns, assumptions, missing evidence, QA issues, lessons learned, and controlled proposals for updating existing skills or creating new skills. Because skills drive the workflow, these proposals stay coupled to the current Agentic SWMM framework and still require human review and benchmark verification before acceptance.
More details: Experiment audit framework and Modeling memory and skill evolution.
Codex / Claude / OpenClaw / Hermes ready
Beyond its own aiswmm runtime, the Agentic SWMM workflow can be driven by external agent runtimes — Codex, Claude Code, OpenClaw, or Hermes. For an agent-orchestrated run, preload the agent/memory/ package and point the runtime at the top-level entry skill skills/swmm-end-to-end/SKILL.md, which decides which workflow path to take, which QA gates must pass, and when to stop rather than invent missing inputs.
Install the skills into any skills-aware runtime (Claude Code, Codex, OpenCode, …) with one command:
npx skills add Zhonghao1995/agentic-swmm-workflowThe skills carry the workflow and evidence contracts; pair them with the project install for the executable toolchain (aiswmm CLI, SWMM solver, MCP servers).
More details: Codex runtime path · OpenClaw execution path · Skill installation · MCP runtime integration.
Documentation map
Validation evidence - benchmark scope, commands, audit example, and evidence boundaries
Installation and CLI guide - Docker, local install, Windows options, and CLI examples
LLM providers - OpenAI (default, via
aiswmm login) vs opt-in Anthropic backend, both API-key + standard function-calling, auth, and how to switchExperiment audit framework - provenance, comparison, and Obsidian note contracts
Modeling memory and skill evolution - controlled memory-to-skill refinement loop
Memory runtime - on-disk substrate, four confidence quadrants, and runtime opt-out flags
Memory runtime CLI examples - one worked example per memory verb
Codex runtime path - local development, audit, Obsidian, and evidence-review workflow
OpenClaw execution path - MCP tool-call sequence for agent runtimes
Repository map - folder-level walkthrough
Calibration example - compact calibration support example
Where collaborators can help
Contributions are welcome in additional SWMM case studies, stronger calibration and validation workflows, DEM / land-use / soil / drainage-asset workflows, new MCP tools, QA testing, tutorials, and interoperability with GIS, ML, and hydrologic toolchains.
Contact:
Citation
GitHub citation metadata is provided in CITATION.cff.
APA repository
Zhang, Z., & Valeo, C. (2026). agentic-swmm-workflow [Computer software]. GitHub. https://github.com/Zhonghao1995/agentic-swmm-workflow
APA manuscript / preprint
Zhang, Z., & Valeo, C. (2026). Agentic Modelling Pipeline: Reproducible Rapid Stormwater Modelling Management System with OpenClaw. https://doi.org/10.31223/X5F47G
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zhonghao1995/agentic-swmm-workflow'
If you have feedback or need assistance with the MCP directory API, please join our Discord server