Unified CLI for reproducible and auditable Agentic SWMM workflows.
Project description
Agentic SWMM Workflow
Pre-1.0 — actively developed. The latest stable point release is v0.7.0 (current default on PyPI; companion-paper reproducibility evidence is pinned at v0.6.4). The CLI / Skill / MCP surface may still evolve between minor versions before the planned 1.0 stable release. For reproducibility, pin an explicit version:
pip install aiswmm==0.7.0ordocker pull ghcr.io/zhonghao1995/agentic-swmm-workflow:v0.7.0(v0.6.4 remains available on the same channels for paper-aligned runs). Pre-releases are available viapip install --pre aiswmm(see CHANGELOG.md for the current version).
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.
Project Overview
Agentic SWMM Workflow is an open-source, verification-first framework for reproducible stormwater modeling with EPA SWMM. It supports automated execution, QA checks, provenance tracking, calibration support, documentation, and modeling memory, while keeping human modelers in control.
The goal is not to replace SWMM or the modeller, but to make SWMM-based modelling easier to reproduce, audit, remember, and trust. Agentic SWMM comes with aiswmm as its built-in runtime. Users can describe a modeling goal in natural language, while SWMM 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 modeling memory remain visible as reusable artifacts. Modeling 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
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
Quick try. The one-line installer below installs the current development build — fine for kicking the tires. For reproducible or production use, the pinned Docker image (
:v0.7.0) is the recommended path (v0.6.4 remains pinned for companion-paper reproducibility) — see runtime install options.
macOS and Linux:
curl -fsSL https://aiswmm.com/install.sh | bash
Windows PowerShell:
irm https://aiswmm.com/install.ps1 | iex
After 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.
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.inp - SWMM report and binary outputs such as
.rptand.out - manifests, 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.md - Obsidian-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 |
|---|---|---|
| Information-loss-guided subcatchment partition | 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 |
| Raw GeoPackage-to-INP benchmark | Public TUFLOW GeoPackage layers converted into SWMM-ready artifacts, QA, and audit | Structured raw GIS path, not arbitrary CAD/GIS recognition |
| Prepared-input SWMM benchmark | External 40-subcatchment Tecnopolo model execution, plotting, and direct swmm5 comparison |
Prepared INP validation path |
| Prior Monte Carlo uncertainty smoke | Tecnopolo HORTON parameter perturbation and hydrograph envelope preview | Prior uncertainty smoke, not calibration |
| Optional INP-derived raw adapter benchmark | Raw-like inputs extracted from a public SWMM fixture and rebuilt through the modular path | Adapter handoff check, not greenfield watershed generation |
| Cross-environment byte-identical reproducibility | A natural-language prompt (Run the Tecnopolo (Rome 1994) demo) drives the aiswmm chain (LLM agent → MCP → swmm-runner skill) to the same byte-identical model.out as bare swmm5, across macOS and Docker |
SWMM execution-layer reproducibility, not agentic workflow reproducibility |
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.
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 vs Claude subscription backends, auth, and how to switch
- Experiment 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiswmm-0.7.1.tar.gz.
File metadata
- Download URL: aiswmm-0.7.1.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e90fa9bb3a5faa77164e9135e06f854de22984a3d921f4a61002851db260839
|
|
| MD5 |
0ea93868f509dc81b237e8b5515d742e
|
|
| BLAKE2b-256 |
a872cb0ef6353a130f9eff9c24fd7604429dea4be5e22d7901b62c6b954e390b
|
Provenance
The following attestation bundles were made for aiswmm-0.7.1.tar.gz:
Publisher:
publish-pypi.yml on Zhonghao1995/agentic-swmm-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiswmm-0.7.1.tar.gz -
Subject digest:
6e90fa9bb3a5faa77164e9135e06f854de22984a3d921f4a61002851db260839 - Sigstore transparency entry: 1652700134
- Sigstore integration time:
-
Permalink:
Zhonghao1995/agentic-swmm-workflow@30237bba2aabffa9c11505b707427b6e7a364d01 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/Zhonghao1995
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@30237bba2aabffa9c11505b707427b6e7a364d01 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiswmm-0.7.1-py3-none-any.whl.
File metadata
- Download URL: aiswmm-0.7.1-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f773a6ca5ab4b67ceae750eaeb39b4f7e61ea56149bb1f71749391a0b3de8f
|
|
| MD5 |
d7ee9411f82a71222c93baffbcb2b1af
|
|
| BLAKE2b-256 |
24b36d9f5e0cf5b34cb3777aa1a679341d1448b095e6135018d563cc4fcaab31
|
Provenance
The following attestation bundles were made for aiswmm-0.7.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on Zhonghao1995/agentic-swmm-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiswmm-0.7.1-py3-none-any.whl -
Subject digest:
10f773a6ca5ab4b67ceae750eaeb39b4f7e61ea56149bb1f71749391a0b3de8f - Sigstore transparency entry: 1652700139
- Sigstore integration time:
-
Permalink:
Zhonghao1995/agentic-swmm-workflow@30237bba2aabffa9c11505b707427b6e7a364d01 -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/Zhonghao1995
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@30237bba2aabffa9c11505b707427b6e7a364d01 -
Trigger Event:
push
-
Statement type: