Pre-1.0 · stable v0.7.7 · pip install aiswmm==0.7.7 · CHANGELOG Headaches from tedious model setup? Try our another project SWMMCanada, our automated model-building project: draw an area anywhere in Canada and get a ready-to-run SWMM model. Up and running now.
FAQ
agentic-swmm-workflow is a Claude Code plugin with 18 hand-picked skills for automation work, indexed on Flowy. Install it with the command on its page. It includes skill-author, swmm-anywhere, swmm-builder. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --agent claude-code
Repo: Zhonghao1995/agentic-swmm-workflow
Pre-1.0 · stable v0.7.7 ·
pip install aiswmm==0.7.7· CHANGELOG
[!TIP] Headaches from tedious model setup? Try our another project SWMMCanada, our automated model-building project: draw an area anywhere in Canada and get a ready-to-run SWMM model. Up and running now.
fetch_swmm_from_canada tool; outside Canada, SWMManywhere-based synthesis covers the rest of the globe. Two complementary upstream sources.Agentic SWMM is an open-source, verification-first framework for reproducible and extensible stormwater modelling, starting with EPA SWMM. It connects QGIS-based preprocessing, upstream model generation from SWMMCanada inside Canada (real storm networks for 8 cities, synthesis anywhere else in the country) and SWMManywhere-based synthesis outside Canada, 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
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.
macOS and Linux:
curl -fsSL https://aiswmm.com/install.sh | bash
Windows PowerShell:
irm https://aiswmm.com/install.ps1 | iex
Reproducible run (pinned Docker image, v0.7.7), no local install:
docker run --rm -v "$PWD/runs:/app/runs" ghcr.io/zhonghao1995/agentic-swmm-workflow:v0.7.7 acceptance
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.
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.
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.
model.inp.rpt and .outexperiment_provenance.json, comparison.json, and experiment_note.mdThe 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. v0.7.1 re-verification: the minimum natural-language prompt length for this chain is now 11 words, and the model.out SHA256 remains identical across the v0.7.0 → v0.7.1 minor revision. |
Examples: TUFLOW and Tecnopolo.
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.
Agentic SWMM is the SWMM engine within a larger effort toward a trustworthy, auditable, fully automated urban-hydrology modelling platform: a top-level agentic runtime orchestrating engine-specific automation on top of a shared data-to-model front end.
| Project | Role in the ecosystem | Status |
|---|---|---|
| agentic-hydrology-platform | Orchestration layer: top-level agentic runtime that governs data, model selection, runs, and audit across the engine branches | LSTM catchment-modelling pipeline live; cross-engine (SWMM / MIKE+) orchestration in progress |
| SWMMCanada | Data & model-building layer: ingests and cleans GIS / open data and synthesises reliable model files; the shared front end for the engines. Agentic SWMM consumes it as an upstream INP source via fetch_swmm_from_canada (real municipal pipes for 8 Canadian cities) | SWMM today; extending to MIKE+ and InfoWorks ICM |
| Agentic SWMM (this repository) | SWMM engine: verification-first EPA SWMM automation (Skills + MCP + deterministic runs + audit) | Stable v0.7.7 |
| Agentic-MIKE-Plus | MIKE+ engine: headless DHI MIKE+ automation (Skills + MCP), built on the Agentic SWMM design and the same method paper | Active development |
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-workflow
The 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.
aiswmm login) vs opt-in Anthropic backend, both API-key + standard function-calling, auth, and how to switchContributions 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:
GitHub citation metadata is provided in CITATION.cff. Please cite the published article.
Zhang, Z., & Valeo, C. (2026). Agentic SWMM: Auditable and reproducible stormwater modelling workflow with Agent Skills and Model Context Protocol. AI for Engineering, 1(1), 5. https://doi.org/10.3390/aieng1010005
Zhang, Z., & Valeo, C. (2026). agentic-swmm-workflow [Computer software]. GitHub. https://github.com/Zhonghao1995/agentic-swmm-workflow
.dockerignore
.github/
workflows/
ci.yml
docker-anywhere.yml
docker.yml
publish-pypi.yml
release-assets.yml
sync-installers-to-website.yml
windows-smoke.yml
.gitignore
agent/
config/
intent_map.json
memory/
curated/
facts.md
memory_evolution_config.md
evidence_memory.md
identification_memory.md
modeling_workflow_memory.md
operational_memory.md
README.md
soul.md
user_bridge_memory.md
agentic_swmm/
__init__.py
agent/
__init__.py
calibration_batch.py
continuation_classifier.py
digest_render.py
error_boundary.py
error_remediation.py
executor.py
experimental_providers.py
feature_flags.py
flag_naming.py
gap_fill_runtime.py
help_router.py
hitl_surface.py
honesty.py
intent_classifier.py
mcp_cache.py
mcp_client.py
mcp_coverage.py
mcp_pool.py
memory_context.py
memory_informed_policy.py
memory_trace.py
memory_verbs.py
onboarding.py
permissions_profile.py
permissions.py
planner_introspection.py
planner.py
policy.py
prompts.py
provider_preflight.py
repl.py
reporting.py
runtime_loop.py
runtime.py
session_bootstrap.py
session_header.py
session_history.py
single_shot.py
skill_router.py
state.py
swmm_runtime/
__init__.py
calibration_runner.py
compare.py
design_storm.py
inp_parsing.py
postflight.py
preflight.py
rpt_summary.py
run_artifacts.py
run_layout.py
run_manifests.py
uncertainty_plan.py
version_compat.py
tool_handlers/
__init__.py
_shared.py
demo.py
gap_fill.py
introspection.py
runtime_ops.py
swmm_anywhere.py
swmm_audit.py
swmm_builder.py
swmm_calibration.py
swmm_canada.py
swmm_climate.py
swmm_map.py
swmm_memory.py
swmm_network.py
swmm_onboarding.py
swmm_plot.py
swmm_report.py
swmm_review.py
swmm_rpt.py
swmm_runner.py
swmm_storm.py
swmm_uncertainty.py
swmm_wq.py
web.py
tool_registry.py
tui_chrome.py
types.py
ui_colors.py
ui.py
warm_intro.py
welcome.py
audit/
__init__.py
chat_note.py
llm_calls.py
moc_generator.py
provenance_v1_2.py
run_folder_layout.py
case/
__init__.py
case_defaults.py
case_id.py
case_registry.py
cli.py
commands/
__init__.py
agent.py
audit.py
bootstrap_memory.py
calibrate.py
capabilities.py
cite_param.py
cite.py
compare.py
config.py
demo.py
doctor.py
expert/
__init__.py
_shared.py
calibration.py
gap_promote.py
memory_reflect.py
pour_point.py
publish.py
thresholds.py
login.py
map.py
mcp.py
memory_archive_cmd.py
memory_health.py
memory.py
model.py
plot.py
report.py
review.py
run.py
runs_tidy.py
setup.py
skill.py
storm.py
trace.py
transfer.py
uncertainty.py
config.py
diagnostics/
__init__.py
doctor_report.py
fixes.py
gap_fill/
__init__.py
llm_enumerator.py
preflight.py
proposer.py
protocol.py
recorder.py
ui_per_gap.py
ui.py
hitl/
__init__.py
decision_recorder.py
request_expert_review.py
threshold_evaluator.py
integrations/
__init__.py
inp_source.py
raw_snapshot.py
swmmanywhere_runner.py
swmmcanada_runner.py
memory/
__init__.py
audit_hook.py
audit_to_memory.py
benchmark_resolver.py
calibration_memory.py
card.py
case_adaptive_thresholds.py
case_inference.py
citations.py
context_budget.py
context_fence.py
cross_watershed_transfer.py
facts.py
health_tiers.py
jsonl_store.py
lessons_lifecycle.py
lessons_metadata.py
memory_archive.py
memory_outcomes.py
memory_provenance.py
moc_generator.py
negative_lessons_markdown.py
negative_lessons.py
parametric_memory_index.py
parametric_memory.py
proposal_skeleton.py
recall_search.py
recall.py
reference_benchmarks.py
run_failures.py
run_progress.py
session_db.py
session_repair.py
session_sync.py
storm_library.py
user_baseline.py
version_compat.py
watershed_similarity.py
providers/
__init__.py
_http.py
anthropic_api.py
base.py
factory.py
openai_api.py
runtime/
__init__.py
registry.py
utils/
__init__.py
hashing.py
paths.py
subprocess_runner.py
tables.py
cases/
.gitkeep
tecnopolo/
case_meta.yaml
todcreek/
case_meta.yaml
CHANGELOG.md
CITATION.cff
data/
Todcreek/
Boundary/
Boundary.cpg
Boundary.dbf
Boundary.prj
Boundary.sbn
Boundary.sbx
Boundary.shp
Boundary.shx
Flow/
1984Rflow.dat
J1(obs).tsb
Geolayer/
landuse.cpg
landuse.dbf
landuse.prj
landuse.shp
landuse.shp.rtree
landuse.shx
n48_w124_1arc_v3_Clip_Projec1.tfw
n48_w124_1arc_v3_Clip_Projec1.tif
soil.cpg
soil.dbf
soil.prj
soil.shp
soil.shp.fld
soil.shp.rtree
soil.shx
Rainfall/
1984rain.dat
defaults_table.yaml
Dockerfile
Dockerfile.anywhere
docs/
agent-nl-swmm-evidence-20260514.md
agent-nl-swmm-gpt55-evidence-20260515.md
agent-nl-swmm-gpt55-llm-engaged-evidence-20260515.md
agent-nl-swmm-gpt55-plot-evidence-20260515.md
agentic-runtime-ux-prd.md
api-key-configuration.md
byte-identical-reproducibility.md
codex-runtime.md
experiment-audit-framework.md
figs/
agentic_swmm_logo.png
aiswmm_demo_greenwich.png
aiswmm_v060_runtime_smoke.png
aiswmm_v060_skill_tools_smoke.png
audit_comparison_example_readme.png
audit_comparison_example.png
information_entropy_subcatchment_partition_readme.png
modeling_memory_skill_evolution.png
openclaw_swmm_pipeline.pdf
openclaw_swmm_pipeline.png
qgis_standard_final_layers_overview.png
swmm_anywhere_conduit_chain.png
swmm_anywhere_network_map.png
swmm_anywhere_rain_runoff.png
tecnopolo_199401_J22_rain_runoff.png
tecnopolo_199401_outfall_rain_runoff.png
tecnopolo_mc_uncertainty_flow_envelope_readme.png
tecnopolo_prepared_layout.png
tuflow_swmm_module03_raw_layers.png
v0.7.1_nyc_midtown_synth_network.png
v0.7.1_tecnopolo_memory_hydrograph.png
framework-validation/
BACKLOG.md
saanich-b7-network-routed-20260513/
junction_flow.png
model.inp
model.rpt
network.json
README.md
runner_manifest.json
subcatchments_after_b7.csv
subcatchments_before_b7.csv
saanich-b8-end-to-end-out1-flowing-20260513/
model.inp
model.rpt
network.json
outfall_flow.png
outlet_lookup.csv
README.md
runner_manifest.json
snap_report.json
subcatchments_routed.csv
saanich-cold-start-cecelia-20260513/
model.inp
model.rpt
outfall_flow.png
README.md
runner_manifest.json
saanich-e2e-new-tools-20260513/
mapping.json
model.inp
model.rpt
network.json
outfall_flow.png
README.md
runner_manifest.json
subcatchments.csv
saanich-smoke-20260513/
cold_start_diagnostic.json
cold_start_diagnostic.md
framework_gaps_backlog.md
framework_mcp_manifest.json
framework_smoke_summary.json
model.inp
README.md
hitl-thresholds.md
installation.md
llm_providers.md
memory_runtime_cli.md
memory_runtime.md
modeling-memory-and-skill-evolution.md
obsidian-compatible-rag-memory.md
openclaw-execution-path.md
qgis-final-layers-mcp.md
releases/
v0.6.0.md
v0.6.1.md
v0.6.2-alpha.md
v0.6.3-alpha.md
v0.6.4.md
v0.7.0-alpha.md
repo-map.md
runtime-install-options.md
swmm-anywhere-case-study.md
swmm-anywhere-quickstart.md
v0.7.1-cross-session-memory-evidence.md
v0.7.1-swmmanywhere-nl-driven-evidence.md
validation-evidence.md
examples/
calibration/
base_params.json
observed_flow.csv
parameter_sets.json
patch_map.json
README.md
scan_spec.json
search_space.json
tecnopolo/
... 752 more© 2026 Flowy · Free and open source
Built for Claude Code · Not affiliated with Anthropic
| 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), with no shapefile, no DEM file, and 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. |
| Cross-session memory autonomous activation | An 11-word user prompt drove a complete Tecnopolo run on 2026-05-28 during which the LLM autonomously queried recall_session_history and recovered two prior Tecnopolo sessions from 12 days earlier: the first user-observable activation of the memory layer on a real production run. | Memory layer fires correctly and shapes planner decisions; staleness weighting and negative-precedent handling are next-milestone scope. |