aiswmm 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiswmm-0.5.2/LICENSE +21 -0
- aiswmm-0.5.2/PKG-INFO +207 -0
- aiswmm-0.5.2/README.md +179 -0
- aiswmm-0.5.2/agentic-ai/memory/README.md +51 -0
- aiswmm-0.5.2/agentic-ai/memory/evidence_memory.md +64 -0
- aiswmm-0.5.2/agentic-ai/memory/identification_memory.md +57 -0
- aiswmm-0.5.2/agentic-ai/memory/modeling_workflow_memory.md +217 -0
- aiswmm-0.5.2/agentic-ai/memory/operational_memory.md +96 -0
- aiswmm-0.5.2/agentic-ai/memory/soul.md +44 -0
- aiswmm-0.5.2/agentic-ai/memory/user_bridge_memory.md +72 -0
- aiswmm-0.5.2/agentic_swmm/__init__.py +3 -0
- aiswmm-0.5.2/agentic_swmm/cli.py +41 -0
- aiswmm-0.5.2/agentic_swmm/commands/__init__.py +1 -0
- aiswmm-0.5.2/agentic_swmm/commands/audit.py +82 -0
- aiswmm-0.5.2/agentic_swmm/commands/demo.py +36 -0
- aiswmm-0.5.2/agentic_swmm/commands/doctor.py +68 -0
- aiswmm-0.5.2/agentic_swmm/commands/memory.py +28 -0
- aiswmm-0.5.2/agentic_swmm/commands/plot.py +167 -0
- aiswmm-0.5.2/agentic_swmm/commands/run.py +190 -0
- aiswmm-0.5.2/agentic_swmm/utils/__init__.py +1 -0
- aiswmm-0.5.2/agentic_swmm/utils/paths.py +45 -0
- aiswmm-0.5.2/agentic_swmm/utils/subprocess_runner.py +86 -0
- aiswmm-0.5.2/aiswmm.egg-info/PKG-INFO +207 -0
- aiswmm-0.5.2/aiswmm.egg-info/SOURCES.txt +153 -0
- aiswmm-0.5.2/aiswmm.egg-info/dependency_links.txt +1 -0
- aiswmm-0.5.2/aiswmm.egg-info/entry_points.txt +3 -0
- aiswmm-0.5.2/aiswmm.egg-info/requires.txt +3 -0
- aiswmm-0.5.2/aiswmm.egg-info/top_level.txt +1 -0
- aiswmm-0.5.2/examples/calibration/README.md +100 -0
- aiswmm-0.5.2/examples/calibration/base_params.json +7 -0
- aiswmm-0.5.2/examples/calibration/observed_flow.csv +25 -0
- aiswmm-0.5.2/examples/calibration/parameter_sets.json +32 -0
- aiswmm-0.5.2/examples/calibration/patch_map.json +27 -0
- aiswmm-0.5.2/examples/calibration/scan_spec.json +7 -0
- aiswmm-0.5.2/examples/calibration/search_space.json +32 -0
- aiswmm-0.5.2/examples/tecnopolo/EXT_EVP_199401_ROME_NASA_mm_day.dat +31 -0
- aiswmm-0.5.2/examples/tecnopolo/EXT_RAIN_199401_MACAO_CUM_NEW_5MIN.DAT +8927 -0
- aiswmm-0.5.2/examples/tecnopolo/EXT_TEM_199401_ROME_NASA_mm_day.dat +31 -0
- aiswmm-0.5.2/examples/tecnopolo/README.md +101 -0
- aiswmm-0.5.2/examples/tecnopolo/tecnopolo_r1_199401.inp +375 -0
- aiswmm-0.5.2/examples/todcreek/model_chicago5min.inp +158 -0
- aiswmm-0.5.2/examples/tuflow-swmm-module03/README.md +138 -0
- aiswmm-0.5.2/integrations/README.md +43 -0
- aiswmm-0.5.2/integrations/mcp/README.md +154 -0
- aiswmm-0.5.2/integrations/skills/README.md +80 -0
- aiswmm-0.5.2/pyproject.toml +46 -0
- aiswmm-0.5.2/scripts/acceptance/run_acceptance.py +577 -0
- aiswmm-0.5.2/scripts/benchmarks/run_generate_swmm_inp_raw_path.py +732 -0
- aiswmm-0.5.2/scripts/benchmarks/run_tecnopolo_199401.py +278 -0
- aiswmm-0.5.2/scripts/benchmarks/run_tuflow_swmm_module03_raw_path.py +504 -0
- aiswmm-0.5.2/scripts/bootstrap.ps1 +85 -0
- aiswmm-0.5.2/scripts/bootstrap.sh +59 -0
- aiswmm-0.5.2/scripts/docker-bootstrap.sh +47 -0
- aiswmm-0.5.2/scripts/docker_entrypoint.sh +47 -0
- aiswmm-0.5.2/scripts/generate_mcp_configs.mjs +81 -0
- aiswmm-0.5.2/scripts/install.ps1 +311 -0
- aiswmm-0.5.2/scripts/install.sh +340 -0
- aiswmm-0.5.2/scripts/install_codex_skills.mjs +93 -0
- aiswmm-0.5.2/scripts/real_cases/run_todcreek_minimal.py +364 -0
- aiswmm-0.5.2/scripts/requirements.txt +7 -0
- aiswmm-0.5.2/scripts/run_mcp_server.mjs +62 -0
- aiswmm-0.5.2/scripts/smoke_mcp_servers.mjs +91 -0
- aiswmm-0.5.2/setup.cfg +4 -0
- aiswmm-0.5.2/setup.py +65 -0
- aiswmm-0.5.2/skills/swmm-builder/SKILL.md +112 -0
- aiswmm-0.5.2/skills/swmm-builder/examples/options_config.json +25 -0
- aiswmm-0.5.2/skills/swmm-builder/examples/subcatchments_input.csv +5 -0
- aiswmm-0.5.2/skills/swmm-builder/scripts/build_swmm_inp.py +1334 -0
- aiswmm-0.5.2/skills/swmm-builder/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-builder/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-builder/scripts/mcp/server.js +95 -0
- aiswmm-0.5.2/skills/swmm-calibration/SKILL.md +179 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/inp_patch.py +70 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/iterative_calibration.py +236 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/mcp/server.js +302 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/metrics.py +89 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/obs_reader.py +117 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/parameter_scout.py +159 -0
- aiswmm-0.5.2/skills/swmm-calibration/scripts/swmm_calibrate.py +1034 -0
- aiswmm-0.5.2/skills/swmm-climate/SKILL.md +105 -0
- aiswmm-0.5.2/skills/swmm-climate/examples/rainfall_batch_rg1.csv +6 -0
- aiswmm-0.5.2/skills/swmm-climate/examples/rainfall_batch_rg2.csv +6 -0
- aiswmm-0.5.2/skills/swmm-climate/examples/rainfall_event.csv +10 -0
- aiswmm-0.5.2/skills/swmm-climate/examples/rainfall_invalid_duplicate.csv +4 -0
- aiswmm-0.5.2/skills/swmm-climate/examples/rainfall_multi_station.csv +11 -0
- aiswmm-0.5.2/skills/swmm-climate/scripts/build_raingage_section.py +170 -0
- aiswmm-0.5.2/skills/swmm-climate/scripts/format_rainfall.py +602 -0
- aiswmm-0.5.2/skills/swmm-climate/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-climate/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-climate/scripts/mcp/server.js +156 -0
- aiswmm-0.5.2/skills/swmm-end-to-end/SKILL.md +217 -0
- aiswmm-0.5.2/skills/swmm-experiment-audit/SKILL.md +172 -0
- aiswmm-0.5.2/skills/swmm-experiment-audit/scripts/audit_run.py +1142 -0
- aiswmm-0.5.2/skills/swmm-experiment-audit/scripts/init_obsidian_vault.py +319 -0
- aiswmm-0.5.2/skills/swmm-gis/SKILL.md +62 -0
- aiswmm-0.5.2/skills/swmm-gis/examples/subcatchments_dem_assisted.geojson +37 -0
- aiswmm-0.5.2/skills/swmm-gis/examples/subcatchments_dem_stats_demo.json +21 -0
- aiswmm-0.5.2/skills/swmm-gis/examples/subcatchments_demo.geojson +49 -0
- aiswmm-0.5.2/skills/swmm-gis/scripts/find_pour_point.py +143 -0
- aiswmm-0.5.2/skills/swmm-gis/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-gis/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-gis/scripts/mcp/server.js +178 -0
- aiswmm-0.5.2/skills/swmm-gis/scripts/preprocess_subcatchments.py +868 -0
- aiswmm-0.5.2/skills/swmm-modeling-memory/SKILL.md +90 -0
- aiswmm-0.5.2/skills/swmm-modeling-memory/examples/README.md +20 -0
- aiswmm-0.5.2/skills/swmm-modeling-memory/scripts/summarize_memory.py +744 -0
- aiswmm-0.5.2/skills/swmm-network/SKILL.md +40 -0
- aiswmm-0.5.2/skills/swmm-network/examples/basic-network.json +79 -0
- aiswmm-0.5.2/skills/swmm-network/examples/import-conduits.geojson +35 -0
- aiswmm-0.5.2/skills/swmm-network/examples/import-junctions.geojson +23 -0
- aiswmm-0.5.2/skills/swmm-network/examples/import-mapping.json +65 -0
- aiswmm-0.5.2/skills/swmm-network/examples/import-outfalls.geojson +14 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/mcp/server.js +107 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/network_import.py +195 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/network_qa.py +127 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/network_to_inp.py +113 -0
- aiswmm-0.5.2/skills/swmm-network/scripts/schema/network_model.schema.json +108 -0
- aiswmm-0.5.2/skills/swmm-params/SKILL.md +90 -0
- aiswmm-0.5.2/skills/swmm-params/examples/landuse_input.csv +5 -0
- aiswmm-0.5.2/skills/swmm-params/examples/soil_input.csv +5 -0
- aiswmm-0.5.2/skills/swmm-params/references/landuse_class_to_subcatch_params.csv +7 -0
- aiswmm-0.5.2/skills/swmm-params/references/soil_texture_to_greenampt.csv +6 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/landuse_to_swmm_params.py +186 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/mcp/server.js +118 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/merge_swmm_params.py +137 -0
- aiswmm-0.5.2/skills/swmm-params/scripts/soil_to_greenampt.py +167 -0
- aiswmm-0.5.2/skills/swmm-plot/SKILL.md +116 -0
- aiswmm-0.5.2/skills/swmm-plot/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-plot/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-plot/scripts/mcp/server.js +134 -0
- aiswmm-0.5.2/skills/swmm-plot/scripts/plot_rain_runoff_si.py +234 -0
- aiswmm-0.5.2/skills/swmm-runner/SKILL.md +24 -0
- aiswmm-0.5.2/skills/swmm-runner/scripts/mcp/package-lock.json +1142 -0
- aiswmm-0.5.2/skills/swmm-runner/scripts/mcp/package.json +13 -0
- aiswmm-0.5.2/skills/swmm-runner/scripts/mcp/server.js +152 -0
- aiswmm-0.5.2/skills/swmm-runner/scripts/swmm_runner.py +241 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/SKILL.md +140 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/examples/fuzzy_space.json +30 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/examples/uncertainty_config.json +16 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/scripts/fuzzy_membership.py +326 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/scripts/sampling.py +177 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/scripts/uncertainty_propagate.py +322 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/tests/test_fuzzy_membership.py +71 -0
- aiswmm-0.5.2/skills/swmm-uncertainty/tests/test_sampling.py +49 -0
- aiswmm-0.5.2/tests/test_agentic_swmm_cli.py +101 -0
- aiswmm-0.5.2/tests/test_experiment_audit.py +101 -0
- aiswmm-0.5.2/tests/test_init_obsidian_vault.py +65 -0
- aiswmm-0.5.2/tests/test_swmm_modeling_memory.py +73 -0
- aiswmm-0.5.2/tests/test_swmm_runner_peak_parser.py +90 -0
aiswmm-0.5.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zhonghao Zhang & Caterina Valeo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
aiswmm-0.5.2/PKG-INFO
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aiswmm
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Unified CLI for reproducible and auditable Agentic SWMM workflows.
|
|
5
|
+
Author: Zhonghao Zhang, Caterina Valeo
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Zhonghao1995/agentic-swmm-workflow
|
|
8
|
+
Project-URL: Repository, https://github.com/Zhonghao1995/agentic-swmm-workflow
|
|
9
|
+
Project-URL: Documentation, https://github.com/Zhonghao1995/agentic-swmm-workflow#readme
|
|
10
|
+
Project-URL: Issues, https://github.com/Zhonghao1995/agentic-swmm-workflow/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/Zhonghao1995/agentic-swmm-workflow/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: swmm,stormwater,hydrology,agentic-ai,reproducible-workflows
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Hydrology
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: matplotlib
|
|
25
|
+
Requires-Dist: numpy
|
|
26
|
+
Requires-Dist: swmmtoolbox
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# Agentic SWMM Workflow
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<img src="docs/figs/agentic_swmm_logo.png" alt="Agentic SWMM logo with agentic robot, stormwater system, and SWMM wordmark" width="900" />
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<a href="https://github.com/Zhonghao1995/agentic-swmm-workflow/actions/workflows/ci.yml">
|
|
37
|
+
<img src="https://github.com/Zhonghao1995/agentic-swmm-workflow/actions/workflows/ci.yml/badge.svg" alt="CI status" />
|
|
38
|
+
</a>
|
|
39
|
+
<a href="https://github.com/Zhonghao1995/agentic-swmm-workflow/releases/latest">
|
|
40
|
+
<img src="https://img.shields.io/github/v/release/Zhonghao1995/agentic-swmm-workflow?label=release&color=1F6FEB" alt="latest release" />
|
|
41
|
+
</a>
|
|
42
|
+
<a href="https://pypi.org/project/aiswmm/">
|
|
43
|
+
<img src="https://img.shields.io/pypi/v/aiswmm?label=PyPI&color=3775A9" alt="PyPI version" />
|
|
44
|
+
</a>
|
|
45
|
+
<a href="https://codecov.io/gh/Zhonghao1995/agentic-swmm-workflow">
|
|
46
|
+
<img src="https://codecov.io/gh/Zhonghao1995/agentic-swmm-workflow/graph/badge.svg" alt="Codecov coverage" />
|
|
47
|
+
</a>
|
|
48
|
+
<a href="#one-command-options">
|
|
49
|
+
<img src="https://img.shields.io/badge/install-options-0B74DE" alt="install options" />
|
|
50
|
+
</a>
|
|
51
|
+
<a href="#try-it-with-docker">
|
|
52
|
+
<img src="https://img.shields.io/badge/docker-reproducible-2496ED" alt="Docker reproducible environment" />
|
|
53
|
+
</a>
|
|
54
|
+
<a href="https://github.com/USEPA/Stormwater-Management-Model">
|
|
55
|
+
<img src="https://img.shields.io/badge/SWMM-5.2-blue" alt="EPA SWMM 5.2" />
|
|
56
|
+
</a>
|
|
57
|
+
<a href="#codex--openclaw--hermes-ready">
|
|
58
|
+
<img src="https://img.shields.io/badge/Codex%20%2F%20OpenClaw%20%2F%20Hermes-ready-1F6FEB" alt="Codex, OpenClaw, or Hermes ready" />
|
|
59
|
+
</a>
|
|
60
|
+
<a href="LICENSE">
|
|
61
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="MIT license" />
|
|
62
|
+
</a>
|
|
63
|
+
</p>
|
|
64
|
+
|
|
65
|
+
**Agentic SWMM for reproducible stormwater modeling**<br>
|
|
66
|
+
*[Codex](https://openai.com/codex/), [OpenClaw](https://github.com/openclaw/openclaw), or [Hermes Agent](https://github.com/NousResearch/hermes-agent) + Skills + MCP + SWMM + verification-first workflow + Obsidian-compatible audit*
|
|
67
|
+
|
|
68
|
+
**A five-minute EPA SWMM workflow that is auditable, memory-informed, and agent-ready.**
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
The project is designed to work with agent runtimes such as Codex, OpenClaw, or Hermes. Users can describe a modeling goal in natural language, while SWMM execution remains deterministic, inspectable, and artifact-based.
|
|
73
|
+
|
|
74
|
+
This is not a simple chat-to-SWMM wrapper. The agent 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.
|
|
75
|
+
|
|
76
|
+
Authors: **Zhonghao Zhang** & **Caterina Valeo**
|
|
77
|
+
License: **MIT**
|
|
78
|
+
|
|
79
|
+
Video: [*Agentic SWMM workflow: introduction and workflow explanation*](https://aiswmm.com/)
|
|
80
|
+
|
|
81
|
+
Paper: [*Agentic Modelling Pipeline: Reproducible Rapid Stormwater Modelling Management System with OpenClaw*](https://doi.org/10.31223/X5F47G)
|
|
82
|
+
|
|
83
|
+
## Why this project exists
|
|
84
|
+
|
|
85
|
+
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.
|
|
86
|
+
|
|
87
|
+
Agentic SWMM provides a middle path: natural-language orchestration with deterministic SWMM execution, explicit provenance, project memory, and verification-first modelling.
|
|
88
|
+
|
|
89
|
+
**The goal is not to replace SWMM or the modeller, but to make SWMM-based modelling easier to rerun, inspect, remember, and trust.**
|
|
90
|
+
|
|
91
|
+
## What makes it different
|
|
92
|
+
|
|
93
|
+
- **Quick onboarding:** start from an explicit Docker run, or use local bootstrap scripts after reviewing them.
|
|
94
|
+
- **Agent-guided, SWMM-grounded:** agents can coordinate tasks, while model execution stays deterministic, inspectable, and CLI-runnable.
|
|
95
|
+
- **Modular skill layer:** GIS, climate, building, running, plotting, calibration, uncertainty, audit, and orchestration are separated into reusable modules with MCP interfaces where available.
|
|
96
|
+
- **Verification-first provenance:** build, run, audit, and comparison stages emit traceable artifacts before outputs are treated as evidence.
|
|
97
|
+
- **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.
|
|
98
|
+
|
|
99
|
+
## Try it in one command
|
|
100
|
+
|
|
101
|
+
Recommended Docker path:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
mkdir -p agentic-swmm-runs && docker run --rm -v "$PWD/agentic-swmm-runs:/app/runs" ghcr.io/zhonghao1995/agentic-swmm-workflow:v0.5.0 acceptance
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Docker writes artifacts to `agentic-swmm-runs`. Local installation is also available for macOS, Linux, and Windows, but review the install script before running it. Details: [Installation and CLI guide](docs/installation.md).
|
|
108
|
+
|
|
109
|
+
Python package:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install aiswmm
|
|
113
|
+
aiswmm --help
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Workflow
|
|
117
|
+
|
|
118
|
+
<p align="center">
|
|
119
|
+
<a href="docs/figs/modeling_memory_skill_evolution.png">
|
|
120
|
+
<img src="docs/figs/modeling_memory_skill_evolution.png" alt="Agentic SWMM modeling memory and controlled skill evolution loop" style="background:#ffffff; padding:12px; border-radius:8px;" width="900" />
|
|
121
|
+
</a>
|
|
122
|
+
</p>
|
|
123
|
+
|
|
124
|
+
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.
|
|
125
|
+
|
|
126
|
+
## What a run can produce
|
|
127
|
+
|
|
128
|
+
- generated or supplied SWMM input files such as `model.inp`
|
|
129
|
+
- SWMM report and binary outputs such as `.rpt` and `.out`
|
|
130
|
+
- manifests, command traces, QA summaries, and parsed peak-flow metrics
|
|
131
|
+
- rainfall-runoff figures, calibration summaries, and fuzzy uncertainty summaries
|
|
132
|
+
- audit records: `experiment_provenance.json`, `comparison.json`, and `experiment_note.md`
|
|
133
|
+
- Obsidian-ready modelling notes and modelling-memory summaries
|
|
134
|
+
|
|
135
|
+
## Validation snapshot
|
|
136
|
+
|
|
137
|
+
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](docs/validation-evidence.md).
|
|
138
|
+
|
|
139
|
+
| Path | What it shows | Evidence boundary |
|
|
140
|
+
| --- | --- | --- |
|
|
141
|
+
| [Information-loss-guided subcatchment partition](docs/validation-evidence.md#information-loss-guided-subcatchment-partition) | QGIS-to-Agentic SWMM preprocessing using entropy and fuzzy-similarity concepts from Zhang & Valeo's [Journal of Hydrology paper](https://doi.org/10.1016/j.jhydrol.2025.134447) | GIS preprocessing concept, not a calibrated SWMM performance claim |
|
|
142
|
+
| [Raw GeoPackage-to-INP benchmark](docs/validation-evidence.md#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 |
|
|
143
|
+
| [Prepared-input SWMM benchmark](docs/validation-evidence.md#prepared-input-swmm-benchmark) | External 40-subcatchment Tecnopolo model execution, plotting, and direct `swmm5` comparison | Prepared INP validation path |
|
|
144
|
+
| [Prior Monte Carlo uncertainty smoke](docs/validation-evidence.md#prior-monte-carlo-uncertainty-smoke) | Tecnopolo HORTON parameter perturbation and hydrograph envelope preview | Prior uncertainty smoke, not calibration |
|
|
145
|
+
| [Optional INP-derived raw adapter benchmark](docs/validation-evidence.md#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 |
|
|
146
|
+
|
|
147
|
+
Examples: [TUFLOW](examples/tuflow-swmm-module03/README.md) and [Tecnopolo](examples/tecnopolo/README.md).
|
|
148
|
+
|
|
149
|
+
## Audit and research memory
|
|
150
|
+
|
|
151
|
+
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.
|
|
152
|
+
|
|
153
|
+
<p align="center">
|
|
154
|
+
<img src="docs/figs/audit_comparison_example_readme.png" alt="Experiment audit comparison showing a peak-flow provenance mismatch" width="900" />
|
|
155
|
+
</p>
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
|
|
159
|
+
More details: [Experiment audit framework](docs/experiment-audit-framework.md) and [Modeling memory and skill evolution](docs/modeling-memory-and-skill-evolution.md).
|
|
160
|
+
|
|
161
|
+
## Codex / OpenClaw / Hermes ready
|
|
162
|
+
|
|
163
|
+
Codex can serve as the primary local development runtime for this repository: it can inspect the checkout, run scripts, edit skills, generate audit records, update the local Obsidian vault, and review evidence before claims are accepted.
|
|
164
|
+
|
|
165
|
+
OpenClaw and Hermes remain compatible orchestration targets, especially for MCP-centered agent runs outside the Codex development environment.
|
|
166
|
+
|
|
167
|
+
For agent-orchestrated runs, preload the Agentic AI memory package and then use the top-level end-to-end skill:
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
agentic-ai/memory/
|
|
171
|
+
skills/swmm-end-to-end/SKILL.md
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The top-level skill defines when to use the full modular path, when to use the prepared-input path, which QA gates must pass, and when to stop instead of inventing missing inputs.
|
|
175
|
+
|
|
176
|
+
For common prepared-input execution, audit, plotting, and memory summarization, the skill should prefer the unified `agentic-swmm` CLI. MCP tools remain available for the modular stages and for agent runtimes that need fine-grained tool calls.
|
|
177
|
+
|
|
178
|
+
More details: [Codex runtime path](docs/codex-runtime.md), [OpenClaw execution path](docs/openclaw-execution-path.md), [Skill installation](integrations/skills/README.md), and [MCP runtime integration](integrations/mcp/README.md).
|
|
179
|
+
|
|
180
|
+
## Documentation map
|
|
181
|
+
|
|
182
|
+
- [Validation evidence](docs/validation-evidence.md) - benchmark scope, commands, audit example, and evidence boundaries
|
|
183
|
+
- [Installation and CLI guide](docs/installation.md) - Docker, local install, Windows options, and CLI examples
|
|
184
|
+
- [Experiment audit framework](docs/experiment-audit-framework.md) - provenance, comparison, and Obsidian note contracts
|
|
185
|
+
- [Modeling memory and skill evolution](docs/modeling-memory-and-skill-evolution.md) - controlled memory-to-skill refinement loop
|
|
186
|
+
- [Codex runtime path](docs/codex-runtime.md) - local development, audit, Obsidian, and evidence-review workflow
|
|
187
|
+
- [OpenClaw execution path](docs/openclaw-execution-path.md) - MCP tool-call sequence for agent runtimes
|
|
188
|
+
- [Repository map](docs/repo-map.md) - folder-level walkthrough
|
|
189
|
+
- [Calibration example](examples/calibration/README.md) - compact calibration support example
|
|
190
|
+
|
|
191
|
+
## Where collaborators can help
|
|
192
|
+
|
|
193
|
+
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.
|
|
194
|
+
|
|
195
|
+
Contact:
|
|
196
|
+
- zhonghaoz@uvic.ca
|
|
197
|
+
- valeo@uvic.ca
|
|
198
|
+
|
|
199
|
+
## Citation
|
|
200
|
+
|
|
201
|
+
GitHub citation metadata is provided in `CITATION.cff`.
|
|
202
|
+
|
|
203
|
+
### APA repository
|
|
204
|
+
Zhang, Z., & Valeo, C. (2026). *agentic-swmm-workflow* [Computer software]. GitHub. https://github.com/Zhonghao1995/agentic-swmm-workflow
|
|
205
|
+
|
|
206
|
+
### APA manuscript / preprint
|
|
207
|
+
Zhang, Z., & Valeo, C. (2026). *Agentic Modelling Pipeline: Reproducible Rapid Stormwater Modelling Management System with OpenClaw*. https://doi.org/10.31223/X5F47G
|
aiswmm-0.5.2/README.md
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Agentic SWMM Workflow
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/figs/agentic_swmm_logo.png" alt="Agentic SWMM logo with agentic robot, stormwater system, and SWMM wordmark" width="900" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://github.com/Zhonghao1995/agentic-swmm-workflow/actions/workflows/ci.yml">
|
|
9
|
+
<img src="https://github.com/Zhonghao1995/agentic-swmm-workflow/actions/workflows/ci.yml/badge.svg" alt="CI status" />
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://github.com/Zhonghao1995/agentic-swmm-workflow/releases/latest">
|
|
12
|
+
<img src="https://img.shields.io/github/v/release/Zhonghao1995/agentic-swmm-workflow?label=release&color=1F6FEB" alt="latest release" />
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://pypi.org/project/aiswmm/">
|
|
15
|
+
<img src="https://img.shields.io/pypi/v/aiswmm?label=PyPI&color=3775A9" alt="PyPI version" />
|
|
16
|
+
</a>
|
|
17
|
+
<a href="https://codecov.io/gh/Zhonghao1995/agentic-swmm-workflow">
|
|
18
|
+
<img src="https://codecov.io/gh/Zhonghao1995/agentic-swmm-workflow/graph/badge.svg" alt="Codecov coverage" />
|
|
19
|
+
</a>
|
|
20
|
+
<a href="#one-command-options">
|
|
21
|
+
<img src="https://img.shields.io/badge/install-options-0B74DE" alt="install options" />
|
|
22
|
+
</a>
|
|
23
|
+
<a href="#try-it-with-docker">
|
|
24
|
+
<img src="https://img.shields.io/badge/docker-reproducible-2496ED" alt="Docker reproducible environment" />
|
|
25
|
+
</a>
|
|
26
|
+
<a href="https://github.com/USEPA/Stormwater-Management-Model">
|
|
27
|
+
<img src="https://img.shields.io/badge/SWMM-5.2-blue" alt="EPA SWMM 5.2" />
|
|
28
|
+
</a>
|
|
29
|
+
<a href="#codex--openclaw--hermes-ready">
|
|
30
|
+
<img src="https://img.shields.io/badge/Codex%20%2F%20OpenClaw%20%2F%20Hermes-ready-1F6FEB" alt="Codex, OpenClaw, or Hermes ready" />
|
|
31
|
+
</a>
|
|
32
|
+
<a href="LICENSE">
|
|
33
|
+
<img src="https://img.shields.io/badge/license-MIT-green" alt="MIT license" />
|
|
34
|
+
</a>
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
**Agentic SWMM for reproducible stormwater modeling**<br>
|
|
38
|
+
*[Codex](https://openai.com/codex/), [OpenClaw](https://github.com/openclaw/openclaw), or [Hermes Agent](https://github.com/NousResearch/hermes-agent) + Skills + MCP + SWMM + verification-first workflow + Obsidian-compatible audit*
|
|
39
|
+
|
|
40
|
+
**A five-minute EPA SWMM workflow that is auditable, memory-informed, and agent-ready.**
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
The project is designed to work with agent runtimes such as Codex, OpenClaw, or Hermes. Users can describe a modeling goal in natural language, while SWMM execution remains deterministic, inspectable, and artifact-based.
|
|
45
|
+
|
|
46
|
+
This is not a simple chat-to-SWMM wrapper. The agent 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.
|
|
47
|
+
|
|
48
|
+
Authors: **Zhonghao Zhang** & **Caterina Valeo**
|
|
49
|
+
License: **MIT**
|
|
50
|
+
|
|
51
|
+
Video: [*Agentic SWMM workflow: introduction and workflow explanation*](https://aiswmm.com/)
|
|
52
|
+
|
|
53
|
+
Paper: [*Agentic Modelling Pipeline: Reproducible Rapid Stormwater Modelling Management System with OpenClaw*](https://doi.org/10.31223/X5F47G)
|
|
54
|
+
|
|
55
|
+
## Why this project exists
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
Agentic SWMM provides a middle path: natural-language orchestration with deterministic SWMM execution, explicit provenance, project memory, and verification-first modelling.
|
|
60
|
+
|
|
61
|
+
**The goal is not to replace SWMM or the modeller, but to make SWMM-based modelling easier to rerun, inspect, remember, and trust.**
|
|
62
|
+
|
|
63
|
+
## What makes it different
|
|
64
|
+
|
|
65
|
+
- **Quick onboarding:** start from an explicit Docker run, or use local bootstrap scripts after reviewing them.
|
|
66
|
+
- **Agent-guided, SWMM-grounded:** agents can coordinate tasks, while model execution stays deterministic, inspectable, and CLI-runnable.
|
|
67
|
+
- **Modular skill layer:** GIS, climate, building, running, plotting, calibration, uncertainty, audit, and orchestration are separated into reusable modules with MCP interfaces where available.
|
|
68
|
+
- **Verification-first provenance:** build, run, audit, and comparison stages emit traceable artifacts before outputs are treated as evidence.
|
|
69
|
+
- **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.
|
|
70
|
+
|
|
71
|
+
## Try it in one command
|
|
72
|
+
|
|
73
|
+
Recommended Docker path:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
mkdir -p agentic-swmm-runs && docker run --rm -v "$PWD/agentic-swmm-runs:/app/runs" ghcr.io/zhonghao1995/agentic-swmm-workflow:v0.5.0 acceptance
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Docker writes artifacts to `agentic-swmm-runs`. Local installation is also available for macOS, Linux, and Windows, but review the install script before running it. Details: [Installation and CLI guide](docs/installation.md).
|
|
80
|
+
|
|
81
|
+
Python package:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install aiswmm
|
|
85
|
+
aiswmm --help
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Workflow
|
|
89
|
+
|
|
90
|
+
<p align="center">
|
|
91
|
+
<a href="docs/figs/modeling_memory_skill_evolution.png">
|
|
92
|
+
<img src="docs/figs/modeling_memory_skill_evolution.png" alt="Agentic SWMM modeling memory and controlled skill evolution loop" style="background:#ffffff; padding:12px; border-radius:8px;" width="900" />
|
|
93
|
+
</a>
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
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.
|
|
97
|
+
|
|
98
|
+
## What a run can produce
|
|
99
|
+
|
|
100
|
+
- generated or supplied SWMM input files such as `model.inp`
|
|
101
|
+
- SWMM report and binary outputs such as `.rpt` and `.out`
|
|
102
|
+
- manifests, command traces, QA summaries, and parsed peak-flow metrics
|
|
103
|
+
- rainfall-runoff figures, calibration summaries, and fuzzy uncertainty summaries
|
|
104
|
+
- audit records: `experiment_provenance.json`, `comparison.json`, and `experiment_note.md`
|
|
105
|
+
- Obsidian-ready modelling notes and modelling-memory summaries
|
|
106
|
+
|
|
107
|
+
## Validation snapshot
|
|
108
|
+
|
|
109
|
+
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](docs/validation-evidence.md).
|
|
110
|
+
|
|
111
|
+
| Path | What it shows | Evidence boundary |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| [Information-loss-guided subcatchment partition](docs/validation-evidence.md#information-loss-guided-subcatchment-partition) | QGIS-to-Agentic SWMM preprocessing using entropy and fuzzy-similarity concepts from Zhang & Valeo's [Journal of Hydrology paper](https://doi.org/10.1016/j.jhydrol.2025.134447) | GIS preprocessing concept, not a calibrated SWMM performance claim |
|
|
114
|
+
| [Raw GeoPackage-to-INP benchmark](docs/validation-evidence.md#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 |
|
|
115
|
+
| [Prepared-input SWMM benchmark](docs/validation-evidence.md#prepared-input-swmm-benchmark) | External 40-subcatchment Tecnopolo model execution, plotting, and direct `swmm5` comparison | Prepared INP validation path |
|
|
116
|
+
| [Prior Monte Carlo uncertainty smoke](docs/validation-evidence.md#prior-monte-carlo-uncertainty-smoke) | Tecnopolo HORTON parameter perturbation and hydrograph envelope preview | Prior uncertainty smoke, not calibration |
|
|
117
|
+
| [Optional INP-derived raw adapter benchmark](docs/validation-evidence.md#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 |
|
|
118
|
+
|
|
119
|
+
Examples: [TUFLOW](examples/tuflow-swmm-module03/README.md) and [Tecnopolo](examples/tecnopolo/README.md).
|
|
120
|
+
|
|
121
|
+
## Audit and research memory
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
<p align="center">
|
|
126
|
+
<img src="docs/figs/audit_comparison_example_readme.png" alt="Experiment audit comparison showing a peak-flow provenance mismatch" width="900" />
|
|
127
|
+
</p>
|
|
128
|
+
|
|
129
|
+
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.
|
|
130
|
+
|
|
131
|
+
More details: [Experiment audit framework](docs/experiment-audit-framework.md) and [Modeling memory and skill evolution](docs/modeling-memory-and-skill-evolution.md).
|
|
132
|
+
|
|
133
|
+
## Codex / OpenClaw / Hermes ready
|
|
134
|
+
|
|
135
|
+
Codex can serve as the primary local development runtime for this repository: it can inspect the checkout, run scripts, edit skills, generate audit records, update the local Obsidian vault, and review evidence before claims are accepted.
|
|
136
|
+
|
|
137
|
+
OpenClaw and Hermes remain compatible orchestration targets, especially for MCP-centered agent runs outside the Codex development environment.
|
|
138
|
+
|
|
139
|
+
For agent-orchestrated runs, preload the Agentic AI memory package and then use the top-level end-to-end skill:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
agentic-ai/memory/
|
|
143
|
+
skills/swmm-end-to-end/SKILL.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The top-level skill defines when to use the full modular path, when to use the prepared-input path, which QA gates must pass, and when to stop instead of inventing missing inputs.
|
|
147
|
+
|
|
148
|
+
For common prepared-input execution, audit, plotting, and memory summarization, the skill should prefer the unified `agentic-swmm` CLI. MCP tools remain available for the modular stages and for agent runtimes that need fine-grained tool calls.
|
|
149
|
+
|
|
150
|
+
More details: [Codex runtime path](docs/codex-runtime.md), [OpenClaw execution path](docs/openclaw-execution-path.md), [Skill installation](integrations/skills/README.md), and [MCP runtime integration](integrations/mcp/README.md).
|
|
151
|
+
|
|
152
|
+
## Documentation map
|
|
153
|
+
|
|
154
|
+
- [Validation evidence](docs/validation-evidence.md) - benchmark scope, commands, audit example, and evidence boundaries
|
|
155
|
+
- [Installation and CLI guide](docs/installation.md) - Docker, local install, Windows options, and CLI examples
|
|
156
|
+
- [Experiment audit framework](docs/experiment-audit-framework.md) - provenance, comparison, and Obsidian note contracts
|
|
157
|
+
- [Modeling memory and skill evolution](docs/modeling-memory-and-skill-evolution.md) - controlled memory-to-skill refinement loop
|
|
158
|
+
- [Codex runtime path](docs/codex-runtime.md) - local development, audit, Obsidian, and evidence-review workflow
|
|
159
|
+
- [OpenClaw execution path](docs/openclaw-execution-path.md) - MCP tool-call sequence for agent runtimes
|
|
160
|
+
- [Repository map](docs/repo-map.md) - folder-level walkthrough
|
|
161
|
+
- [Calibration example](examples/calibration/README.md) - compact calibration support example
|
|
162
|
+
|
|
163
|
+
## Where collaborators can help
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
Contact:
|
|
168
|
+
- zhonghaoz@uvic.ca
|
|
169
|
+
- valeo@uvic.ca
|
|
170
|
+
|
|
171
|
+
## Citation
|
|
172
|
+
|
|
173
|
+
GitHub citation metadata is provided in `CITATION.cff`.
|
|
174
|
+
|
|
175
|
+
### APA repository
|
|
176
|
+
Zhang, Z., & Valeo, C. (2026). *agentic-swmm-workflow* [Computer software]. GitHub. https://github.com/Zhonghao1995/agentic-swmm-workflow
|
|
177
|
+
|
|
178
|
+
### APA manuscript / preprint
|
|
179
|
+
Zhang, Z., & Valeo, C. (2026). *Agentic Modelling Pipeline: Reproducible Rapid Stormwater Modelling Management System with OpenClaw*. https://doi.org/10.31223/X5F47G
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Agentic SWMM Public Agent Memory Layer
|
|
2
|
+
|
|
3
|
+
This folder contains lightweight Markdown memory files for OpenClaw, Hermes, or another compatible agent runtime that needs to use Agentic SWMM from the public GitHub repository with minimal setup.
|
|
4
|
+
|
|
5
|
+
These files are not executable code and are not a replacement for `skills/swmm-end-to-end/SKILL.md`. They are a public project context pack that should be loaded before the top-level SWMM orchestration skill so the agent starts with the right identity, mission, evidence rules, and user-facing behavior.
|
|
6
|
+
|
|
7
|
+
## Recommended load order
|
|
8
|
+
|
|
9
|
+
1. `identification_memory.md`
|
|
10
|
+
2. `soul.md`
|
|
11
|
+
3. `operational_memory.md`
|
|
12
|
+
4. `modeling_workflow_memory.md`
|
|
13
|
+
5. `evidence_memory.md`
|
|
14
|
+
6. `user_bridge_memory.md`
|
|
15
|
+
7. `skills/swmm-end-to-end/SKILL.md`
|
|
16
|
+
8. `docs/openclaw-execution-path.md`
|
|
17
|
+
|
|
18
|
+
Optional after multiple audited runs exist:
|
|
19
|
+
|
|
20
|
+
9. `skills/swmm-modeling-memory/SKILL.md`
|
|
21
|
+
10. `memory/modeling-memory/`
|
|
22
|
+
|
|
23
|
+
## Intended interface position
|
|
24
|
+
|
|
25
|
+
OpenClaw, Hermes, or another compatible runtime should place this memory layer between the general agent runtime and the Agentic SWMM skill layer:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
public agent runtime
|
|
29
|
+
-> agentic-ai/memory/*.md
|
|
30
|
+
-> skills/swmm-end-to-end/SKILL.md
|
|
31
|
+
-> module skills and MCP tools
|
|
32
|
+
-> deterministic Python/SWMM execution
|
|
33
|
+
-> audit artifacts
|
|
34
|
+
-> optional modeling-memory summaries
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The memory layer should shape decisions and communication for repository users. It should not perform calculations, rewrite model files directly, depend on the maintainer's private workspace, or bypass MCP/script tools.
|
|
38
|
+
|
|
39
|
+
`memory/modeling-memory/` is generated project memory, not startup instruction memory. Load or inspect it when the user asks for lessons learned, repeated failure patterns, missing evidence, QA issues, or controlled skill-refinement proposals.
|
|
40
|
+
|
|
41
|
+
## Minimum memory contract
|
|
42
|
+
|
|
43
|
+
An agent that loads these files should:
|
|
44
|
+
|
|
45
|
+
- know that Agentic SWMM is a reproducible stormwater modelling workflow, not a chat-to-INP toy,
|
|
46
|
+
- choose the top-level `swmm-end-to-end` skill for full workflow orchestration,
|
|
47
|
+
- guide the user through modelling in the order `goal -> inputs -> mode -> build -> run -> QA -> audit -> readiness report`,
|
|
48
|
+
- stop on missing critical inputs rather than fabricate hydrologic or network data,
|
|
49
|
+
- preserve run artifacts under explicit run directories,
|
|
50
|
+
- run the audit layer after success, failure, or early stop,
|
|
51
|
+
- communicate evidence boundaries clearly to the user.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Evidence Memory
|
|
2
|
+
|
|
3
|
+
## Evidence-first rule
|
|
4
|
+
|
|
5
|
+
Every Agentic SWMM run should make a clear distinction between:
|
|
6
|
+
|
|
7
|
+
- what was directly executed,
|
|
8
|
+
- what was parsed from SWMM outputs,
|
|
9
|
+
- what was inferred,
|
|
10
|
+
- what is missing,
|
|
11
|
+
- what is outside the current evidence boundary.
|
|
12
|
+
|
|
13
|
+
## Audit rule
|
|
14
|
+
|
|
15
|
+
Always run or recommend the audit layer after a workflow attempt:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python3 skills/swmm-experiment-audit/scripts/audit_run.py --run-dir runs/<case>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
For baseline or scenario comparison:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python3 skills/swmm-experiment-audit/scripts/audit_run.py \
|
|
25
|
+
--run-dir runs/<case> \
|
|
26
|
+
--compare-to runs/<baseline-case>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The audit should preserve partial evidence when a workflow fails or stops early.
|
|
30
|
+
|
|
31
|
+
## QA gates
|
|
32
|
+
|
|
33
|
+
A SWMM run should not be treated as usable until these minimum checks are available:
|
|
34
|
+
|
|
35
|
+
- SWMM return code is zero,
|
|
36
|
+
- `.rpt` exists,
|
|
37
|
+
- `.out` exists,
|
|
38
|
+
- continuity parses,
|
|
39
|
+
- peak flow parses from the correct SWMM report section,
|
|
40
|
+
- the run manifest identifies commands and artifacts.
|
|
41
|
+
|
|
42
|
+
For calibration, also require:
|
|
43
|
+
|
|
44
|
+
- observed flow parses,
|
|
45
|
+
- simulated and observed periods overlap enough for the chosen metric,
|
|
46
|
+
- chosen parameter changes are recorded.
|
|
47
|
+
|
|
48
|
+
## Claim boundaries
|
|
49
|
+
|
|
50
|
+
Use precise language:
|
|
51
|
+
|
|
52
|
+
- "Executed" means the command ran.
|
|
53
|
+
- "Parsed" means the workflow extracted a metric from an artifact.
|
|
54
|
+
- "Checked" means QA outputs were generated and reviewed.
|
|
55
|
+
- "Audited" means provenance and comparison files were written.
|
|
56
|
+
- "Validated" requires independent evidence beyond a successful run.
|
|
57
|
+
|
|
58
|
+
## Controlled skill evolution
|
|
59
|
+
|
|
60
|
+
Skill update proposals are not evidence of correctness. A skill refinement should only be accepted after human review and benchmark verification.
|
|
61
|
+
|
|
62
|
+
## Known boundary
|
|
63
|
+
|
|
64
|
+
The repository supports prepared-input and structured raw GIS-to-INP validation paths. It should not claim complete greenfield watershed and pipe-network generation from arbitrary DEM, soil, land use, and drainage data unless that evidence has been produced for the case.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Identification Memory
|
|
2
|
+
|
|
3
|
+
## Agentic identity
|
|
4
|
+
|
|
5
|
+
You are operating as an OpenClaw, Hermes, or compatible agent runtime using the public Agentic SWMM Workflow repository.
|
|
6
|
+
|
|
7
|
+
Your role is to help a user build, run, verify, audit, plot, calibrate, or extend EPA SWMM workflows through deterministic tools. You coordinate decisions and tool calls; you do not replace the SWMM solver, invent missing hydrologic data, or silently hand-edit model artifacts when a reproducible script path exists.
|
|
8
|
+
|
|
9
|
+
## Project identity
|
|
10
|
+
|
|
11
|
+
Project name:
|
|
12
|
+
- Agentic SWMM Workflow
|
|
13
|
+
|
|
14
|
+
Primary purpose:
|
|
15
|
+
- reproducible, auditable, agent-orchestrated stormwater modelling with EPA SWMM
|
|
16
|
+
|
|
17
|
+
Canonical top-level orchestration skill:
|
|
18
|
+
- `skills/swmm-end-to-end/SKILL.md`
|
|
19
|
+
|
|
20
|
+
Canonical execution-path document:
|
|
21
|
+
- `docs/openclaw-execution-path.md`
|
|
22
|
+
|
|
23
|
+
Canonical run artifact root:
|
|
24
|
+
- `runs/<case>/`
|
|
25
|
+
|
|
26
|
+
Core modelling engine:
|
|
27
|
+
- EPA SWMM 5.2 through `swmm5`
|
|
28
|
+
|
|
29
|
+
Primary user-facing claim:
|
|
30
|
+
- agents can coordinate SWMM modelling workflows while calculations, artifacts, QA, provenance, and audit remain deterministic and inspectable.
|
|
31
|
+
|
|
32
|
+
## What the agent should recognize
|
|
33
|
+
|
|
34
|
+
Use Agentic SWMM when the user asks for:
|
|
35
|
+
|
|
36
|
+
- SWMM model building, running, checking, plotting, calibration, or uncertainty propagation,
|
|
37
|
+
- OpenClaw or Hermes orchestration over SWMM modules,
|
|
38
|
+
- a reproducible run directory with manifests and audit notes,
|
|
39
|
+
- Tod Creek real-data smoke testing,
|
|
40
|
+
- paper-facing experiment evidence.
|
|
41
|
+
|
|
42
|
+
Do not treat Agentic SWMM as:
|
|
43
|
+
|
|
44
|
+
- a pure chatbot,
|
|
45
|
+
- a generic GIS delineation system,
|
|
46
|
+
- a hidden model generator,
|
|
47
|
+
- a substitute for observed data or physical assumptions,
|
|
48
|
+
- proof that a full watershed model exists when only a minimal fallback was run.
|
|
49
|
+
|
|
50
|
+
## Identity rule
|
|
51
|
+
|
|
52
|
+
When the user asks what this system is or how it should behave, answer from this public project identity first, then cite concrete repository artifacts if available. The strongest repository anchors are:
|
|
53
|
+
|
|
54
|
+
- `README.md`
|
|
55
|
+
- `skills/swmm-end-to-end/SKILL.md`
|
|
56
|
+
- `docs/openclaw-execution-path.md`
|
|
57
|
+
- `skills/swmm-experiment-audit/SKILL.md`
|