1. Conduid
  2. Agents
  3. Zhonghao1995/agentic-swmm-workflow
MCP server · Agents

Zhonghao1995/agentic-swmm-workflow

modelling workflow: model building, simulation runs with manifests and continuity checks, calibration, GIS/QGIS integration, design storms and climate scenarios, uncertainty analysis, plotting, and modelling memory. Config generators included for Codex, Claude Code, OpenClaw, and Hermes.

52Fair

Scored 21 hours ago · breakdown

About Zhonghao1995/agentic-swmm-workflow

Zhonghao1995/agentic-swmm-workflow is an MCP server published by Zhonghao1995 in the Agents category: modelling workflow: model building, simulation runs with manifests and continuity checks, calibration, GIS/QGIS integration, design storms and climate scenarios, uncertainty analysis, plotting, and modelling memory. Config generators included for Codex, Claude Code, OpenClaw, and Hermes. Conduid read 45 tools from its source: assign_subcatchment_outlets, audit_run, basin_shp_to_subcatchments, build_inp, build_raingage_section, export_inp and 39 more. It is published to PyPI as aiswmm and runs with uvx.

The repository has 37 stars and 15 forks, and its last commit was on 28 Oct 2026. Conduid has no tagged release on record for it. Its topics include agentic-framework, claude-skills, gis, hermes-skill, modelling-memory and openclaw.

Install

uvx
uvx aiswmm
pip
pip install aiswmm
From source
git clone https://github.com/Zhonghao1995/agentic-swmm-workflow

Tools (45)

assign_subcatchment_outletsRewrite the outlet column of a subcatchments CSV so each subcatchment drains into a real network node (not the literal outfall). Without this step the pipe network sits idle in the SWMM model. Three modes: nearest_junction (default; needs network.json), nearest_catch_basin (needs a manhole/catch-basin geojson), manual_lookup (needs a 2-col CSV).
ParameterTypeDescription
candidatesGeojsonPathstring
candidatesIdFieldstring
includeOutfallsAsCandidatesboolean
lookupCsvPathstring
modestring
networkJsonPathstring
outCsv *string
subcatchmentsCsvIn *string
subcatchmentsGeojson *string
audit_runAudit a SWMM run directory and write deterministic provenance / comparison / note artifacts.
ParameterTypeDescription
caseNamestring
compareTostring
noObsidianboolean
objectivestring
outComparisonstring
outModelDiagnosticsstring
outNotestring
outProvenancestring
runDir *string
workflowModestring
basin_shp_to_subcatchmentsPick one or more polygons from a municipal basin shapefile and emit SWMM-ready subcatchments.geojson + subcatchments.csv. Width defaults to sqrt(area_m2); slope defaults to 1 percent.
ParameterTypeDescription
basinShp *stringBasin shapefile or geojson path (must have a projected CRS).
defaultSlopePctnumber
idFieldstringField name used by mode=by_id_field.
idPrefixstringPrefix for generated subcatchment IDs.
idValueanyValue to match when mode=by_id_field.
indexinteger0-based feature index when mode=by_index.
modestring
outCsv *string
outGeojson *string
outletNodeIdstring
rainGageIdstring
widthMethodstring
build_inpAssemble runnable SWMM INP + manifest from subcatchment/params/network/climate inputs.
ParameterTypeDescription
configJsonPathstring
defaultGageIdstring
networkJsonPath *string
outInpPath *string
outManifestPath *string
paramsJsonPath *string
rainfallJsonPathstring
raingageJsonPathstring
subcatchmentsCsvPath *string
timeseriesTextPathstring
waterQualityJsonPathstring
build_raingage_sectionBuild SWMM [RAINGAGES] helper snippet tied to a rainfall timeseries name.
ParameterTypeDescription
gageIdstring
intervalMinnumber
outJsonPath *string
outTextPath *string
rainFormatstring
rainfallJsonPathstring
scfnumber
seriesNamestring
stationIdstring
export_inpExport a SWMM network JSON model to INP sections
ParameterTypeDescription
networkJsonPath *string
format_rainfallConvert rainfall CSV or SWMM .dat into SWMM timeseries text + JSON metadata.
ParameterTypeDescription
additionalInputCsvPathsarray
datValueUnitsstring
defaultStationIdstring
inputCsvPathstring
inputDatPathsarray
inputGlobPatternsarray
outputJsonPath *string
outputTimeseriesPath *string
seriesNamestring
seriesNameTemplatestring
stationColumnstring
timestampColumnstring
timestampFormatstring
timestampPolicystring
unitPolicystring
valueColumnstring
valueUnitsstring
windowEndstring
windowStartstring
generate_design_stormSynthesise a design-storm hyetograph (Chicago/Keifer-Chu or alternating-block) from return period and IDF coefficients when no measured rainfall exists. Writes SWMM [TIMESERIES] text and metadata JSON matching format_rainfall output contract.
ParameterTypeDescription
a1number
aCoeffnumber
bnumber
cCoeffnumber
cExpnumber
dtnumber
duration *number
formstring
idfCsvstring
idfJsonstring
method *string
nnumber
outJson *string
outTimeseries *string
rnumber
returnPeriodnumber
seriesNamestring
gis_preprocess_subcatchmentsConvert subcatchment polygon GeoJSON + network JSON into builder-ready subcatchment CSV with deterministic width/slope/outlet linking.
ParameterTypeDescription
defaultCurbLengthMnumber
defaultRainGagestring
defaultSlopePctnumber
demStatsIdFieldstring
demStatsJsonstring
idFieldstring
maxLinkDistanceMnumber
minSlopePctnumber
minWidthMnumber
networkJson *string
outCsv *string
outJson *string
outletHintFieldstring
subcatchmentsGeojson *string
import_city_networkImport structured city pipe/surface asset exports into dual-system-ready SWMM network JSON
ParameterTypeDescription
junctionsCsvPathstring
junctionsGeojsonPathstring
mappingPath *string
outfallsCsvPathstring
outfallsGeojsonPathstring
outputPathstring
pipesCsvPathstring
pipesGeojsonPathstring
import_networkImport conduit/junction/outfall data into the SWMM network JSON schema
ParameterTypeDescription
conduitsPath *string
junctionsPath *string
mappingPath *string
outfallsPath *string
outputPathstring
infer_outfallPick a single SWMM outfall point from a pipe LineString layer. Two modes: endpoint_nearest_watercourse (default; needs a watercourse geojson) or lowest_endpoint (uses minimum y coord, no watercourse needed). Emits outfalls.geojson with one Point (node_id=OUT1, type=FREE).
ParameterTypeDescription
modestring
outPath *string
pipesGeojsonPath *string
watercourseGeojsonPathstring
map_landuseMap subcatchment land use CSV to SWMM subcatchment/subarea parameter JSON.
ParameterTypeDescription
inputCsvPath *string
lookupCsvPathstring
outputPath *string
map_soilMap subcatchment soil CSV to SWMM Green-Ampt infiltration parameter JSON.
ParameterTypeDescription
inputCsvPath *string
lookupCsvPathstring
outputPath *string
merge_paramsMerge land use and soil JSON outputs into one SWMM params payload.
ParameterTypeDescription
landuseJsonPath *string
outputPath *string
soilJsonPath *string
plot_rain_runoff_siRainfall (inverted) vs node/link flow hydrograph to the Nature figure spec (SI, mm/5min default, 89 mm single column, 7 pt sans-serif, ticks out, Wong palette, no title). Writes outPng (450 dpi preview) plus its vector twin outPdf.
ParameterTypeDescription
dpinumberPNG preview resolution; the PDF is vector.
dtMinnumber
focusDaystring
inp *string
linkstringSWMM conduit/link id; when set, the lower panel plots Flow_rate for the conduit instead of a node attribute. Mutually exclusive with 'node'.
nodestring
nodeAttrstring
out *string
outPng *stringPNG preview path; the vector PDF twin is written beside it with the same stem.
padHoursnumber
rainKindstring
rainTsstring
widthstringFigure width: single column (89 mm) or double column (183 mm).
windowEndstring
windowStartstring
prepare_storm_inputsClip raw municipal storm pipe (and optional manhole) shapefiles to a basin and emit adapter-ready GeoJSON plus a filled mapping.json. Does NOT pick the outfall (use infer_outfall) or fix flow direction (use reorient_pipes).
ParameterTypeDescription
basinClipGeojsonPath *string
caseName *string
diameterPolicystring
manholesShpPathstring
mappingTemplatePath *string
outDir *string
pipesShpPath *string
sourceDescription *string
qaRun QA checks on a SWMM network model — a network JSON (networkJsonPath) or a SWMM .inp (inpPath, e.g. a SWMManywhere-synthesized model). Provide exactly one.
ParameterTypeDescription
inpPathstring
networkJsonPathstring
qgis_area_weighted_paramsIntersect subcatchments with landuse and soil polygons, compute area fractions, and write area-weighted SWMM params JSON plus audit CSVs.
ParameterTypeDescription
idFieldstring
landuse *stringLand-use polygon layer.
landuseFieldstring
landuseLookupstring
outDir *stringOutput folder for weighted_params.json and area-weight audit CSVs.
soil *stringSoil polygon layer.
soilFieldstring
soilLookupstring
strictboolean
subcatchments *stringSubcatchment polygon layer, e.g. final_layers/subcatchments.shp.
qgis_export_swmm_intermediatesRun the complete MVP QGIS data-side bridge and export 01_gis, 02_params, and 04_network artifacts for Agentic SWMM.
ParameterTypeDescription
caseIdstring
defaultRainGagestring
defaultSlopePctnumber
demstring
idFieldstring
landuseFieldstring
landuseLayerstring
minSlopePctnumber
minWidthMnumber
networkJson *string
outletstring
outletHintFieldstring
rainfallstring
runDir *string
soilFieldstring
soilLayerstring
strictCrsboolean
subcatchmentsGeojson *string
qgis_extract_slope_area_widthExtract builder-ready subcatchment area, width, slope, and outlet links from QGIS-exported subcatchment polygons.
ParameterTypeDescription
defaultRainGagestring
defaultSlopePctnumber
idFieldstring
minSlopePctnumber
minWidthMnumber
networkJson *string
outCsv *string
outJson *string
outletHintFieldstring
subcatchmentsGeojson *string
qgis_import_drainage_assetsCopy/import a prepared drainage network JSON and run swmm-network QA.
ParameterTypeDescription
networkJson *string
outNetworkJson *string
outQaJson *string
qgis_load_layersValidate raw/QGIS-exported source layer paths and shapefile sidecars before SWMM data preparation.
ParameterTypeDescription
boundarystring
demstring
landusestring
networkstring
out *string
outletstring
rainfallstring
soilstring
subcatchmentsstring
qgis_normalize_layersUse QGIS Processing to reproject DEM, boundary, land-use, and soil layers to one CRS and clip them by the boundary.
ParameterTypeDescription
boundary *string
categoricalResamplinginteger
dem *string
demResamplinginteger
landuse *string
outDir *string
soil *string
targetCrsstringOptional target CRS auth id, WKT/PROJ string, or layer path. Defaults to boundary CRS.
targetResolutionnumber
qgis_overlay_landuse_soilExtract land-use and soil attributes from a QGIS overlay subcatchment GeoJSON into swmm-params CSV inputs.
ParameterTypeDescription
idFieldstring
landuseFieldstring
outLanduseCsv *string
outSoilCsv *string
soilFieldstring
subcatchmentsGeojson *string
qgis_package_final_layersPackage QGIS/GRASS watershed outputs into a clean final_layers folder for SWMM/GIS use: subcatchments.shp, flow.shp, slope_percent.tif, outfall.shp, overview.png, and manifest.json.
ParameterTypeDescription
accumulation *stringQGIS/GRASS flow accumulation raster, e.g. 01_gis/threshold_sweep/acc_100.tif.
caseId *string
finalDir *stringOutput folder, conventionally runs/<case>/final_layers.
noOverviewboolean
slope *stringSlope percent raster generated from the DEM.
stream *stringQGIS/GRASS stream raster, e.g. 01_gis/threshold_sweep/stream_100.tif.
subcatchments *stringSource subcatchment shapefile from the standard or entropy partition.
titlestring
qgis_validate_crsWrite a CRS consistency report from a qgis_load_layers manifest.
ParameterTypeDescription
layersManifest *string
out *string
reorient_pipesReorient LineString pipes so geometry direction matches flow direction (BFS from outfall vertices). Use after infer_outfall and before import_city_network when input pipes came from raw municipal shapefiles whose vertex order is digitisation order, not flow order.
ParameterTypeDescription
coordinatePrecisionnumber
outPath *string
outfallsGeojsonPath *string
pipesGeojsonPath *string
snap_pipe_endpointsCluster nearby pipe LineString endpoints (sub-millimetre to centimetre vertex drift) and snap each cluster to its centroid so that adjacent pipes share identical endpoint coordinates. Without this, import_city_network treats drifting endpoints as separate junctions and the network ends up as disconnected fragments. Run between prepare_storm_inputs and infer_outfall.
ParameterTypeDescription
outPath *string
pipesGeojsonPath *string
toleranceM *number
summaryReturn a lightweight summary of a SWMM network JSON model
ParameterTypeDescription
networkJsonPath *string
swmm_calibrateEvaluate explicit candidate parameter sets and report the best one for the chosen objective.
ParameterTypeDescription
aggregatestring
baseInp *string
bestParamsOutstring
candidateRunDirstring
dryRunboolean
flowColstring
objectivestring
obsEndstring
obsStartstring
observed *string
parameterSets *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
runRoot *string
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_calibrate_dream_zsRun DREAM-ZS Bayesian calibration with a KGE-based likelihood (`exp(-0.5 * (1 - KGE) / sigma^2)`). Writes five posterior artefacts to the chosen audit directory (defaults to the parent of summaryJson): posterior_samples.csv (post-burn-in MCMC samples), best_params.json (MAP estimate), chain_convergence.json (Gelman-Rubin Rhat per parameter), posterior_<param>.png (marginal histogram per parameter), posterior_correlation.png (parameter correlation matrix). The calibration_summary.json keeps the Slice 1 shape (primary_objective='kge', primary_value, kge_decomposition, secondary_metrics) plus a `posterior_summary` block with chain count, Rhat values, and per-parameter quantiles. Requires the optional 'spotpy' Python dependency.
ParameterTypeDescription
aggregatestring
baseInp *string
bestParamsOutstring
candidateRunDirstring
dreamChainsintegerNumber of MCMC chains (>=2 for Rhat).
dreamOutputDirstringAudit directory for the 5 DREAM-ZS artefacts. Defaults to the parent of summaryJson.
dreamRhatThresholdnumberGelman-Rubin Rhat convergence threshold.
dreamRunsAfterConvergenceintegerExtra samples to draw after convergence is detected.
dreamSigmanumberLikelihood width sigma on (1-KGE).
dryRunboolean
flowColstring
iterationsintegerTotal MCMC iterations (across all chains).
objectivestring
obsEndstring
obsStartstring
observed *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
runRoot *string
searchSpace *anySearch-space file path, OR an inline object {param: {min, max, type?, precision?}} which is written to <runRoot>/search_space.json so the space used is preserved as run evidence.
seedinteger
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_calibrate_sceuaGlobal SCE-UA calibration with KGE as the primary objective. Emits calibration_summary.json with primary_value, kge_decomposition (r, alpha, beta), secondary_metrics (NSE, PBIAS%, RMSE, peak-flow, peak-timing) and a convergence.csv trace. Requires the optional 'spotpy' Python dependency.
ParameterTypeDescription
aggregatestring
baseInp *string
bestParamsOutstring
candidateRunDirstring
convergenceCsvstringWhere to write the per-iteration KGE trace (default: alongside summaryJson).
dryRunboolean
flowColstring
iterationsintegerSCE-UA budget (total function evaluations).
objectivestring
obsEndstring
obsStartstring
observed *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
runRoot *string
sceuaNgsintegerNumber of complexes (spotpy default heuristic is 2*p+1).
searchSpace *anySearch-space file path, OR an inline object {param: {min, max, type?, precision?}} which is written to <runRoot>/search_space.json so the space used is preserved as run evidence.
seedinteger
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_calibrate_searchRun bounded reproducible calibration search (random, LHS, or adaptive multi-round refinement).
ParameterTypeDescription
aggregatestring
baseInp *string
bestParamsOutstring
candidateRunDirstring
dryRunboolean
eliteFractionnumber
flowColstring
iterationsinteger
minSpanFractionnumber
objectivestring
obsEndstring
obsStartstring
observed *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
refineMarginnumber
roundsinteger
runRoot *string
searchSpace *anySearch-space file path, OR an inline object {param: {min, max, type?, precision?}} which is written to <runRoot>/search_space.json so the space used is preserved as run evidence.
seedinteger
strategystring
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_compareCompare continuity error (%) between two SWMM .rpt files (e.g., GUI vs CLI).
ParameterTypeDescription
rpt *string
rpt2 *string
swmm_continuityParse Runoff Quantity / Flow Routing continuity tables from a SWMM .rpt.
ParameterTypeDescription
rpt *string
swmm_peakParse peak flow and time-of-peak for a specific node/outfall from a SWMM .rpt. The node name must be supplied (no default).
ParameterTypeDescription
node *string
rpt *string
swmm_rainfall_ensembleGenerate a rainfall ensemble. Method 'perturbation' samples N noisy copies of an observed rainfall timeseries (gaussian_iid, multiplicative, autocorrelated, or intensity_scaling). Method 'idf' synthesises N design hyetographs (Chicago, Huff, or SCS Type II) by sampling IDF (a, b, c) parameters from their confidence intervals. Each realisation is written as a CSV; if a base INP is supplied, every realisation is patched and run through swmm5 and the summary aggregates peak flow + total volume.
ParameterTypeDescription
baseInpstringIf provided, each realisation is patched into a copy of this base INP and run through swmm5.
config *stringPath to a JSON config (see skills/swmm-uncertainty/examples/rainfall_*_config.json).
dryRunbooleanGenerate realisations + CSVs but skip swmm5.
method *stringEnsemble generation method.
runRoot *stringOutput root. Summary lands at <runRoot>/09_audit/rainfall_ensemble_summary.json.
seedinteger
seriesNamestringName of the [TIMESERIES] block to replace.
swmmNodestring
swmm_runRun swmm5 on an INP and write rpt/out + manifest.json into runDir. When 'node' is omitted the runner resolves 'auto' after the run: the outfall carrying the largest total volume in the Outfall Loading Summary (else the first [OUTFALLS] entry), so the manifest's peak metric targets the outfall that matters.
ParameterTypeDescription
inp *string
memoriesAppliedarrayOptional. List of modeling-memory entry ids whose parameters were programmatically applied to this run's inputs (e.g. ["cm-abc123"]). Recorded in manifest.json under 'memories_applied' for auditability. Omit when no memory was applied.
nodestringOptional. Omit (or pass 'auto') to report on the outfall carrying the largest total volume after the run.
outNamestring
rptNamestring
runDir *string
swmm_sensitivity_morrisMorris elementary-effects sensitivity analysis via SALib. Produces per-parameter mu_star + sigma at sample budget r*(k+1).
ParameterTypeDescription
aggregatestring
baseInp *string
flowColstring
morrisLevelsinteger
morrisRintegerNumber of trajectories; budget = r*(k+1).
obsEndstring
obsStartstring
observed *string
parameterSpace *stringJSON object: parameter -> {min, max} bounds.
patchMap *string
runRoot *string
seedinteger
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_sensitivity_oatOne-at-a-time (OAT) sensitivity: perturb each parameter around a baseline and rank by RMSE+peak-error spread. Backs the legacy parameter_scout workflow at the new home (swmm-uncertainty).
ParameterTypeDescription
aggregatestring
baseInp *string
baseParams *stringJSON object of baseline parameter values.
flowColstring
obsEndstring
obsStartstring
observed *string
patchMap *string
runRoot *string
scanSpec *stringJSON object: parameter -> list of trial values.
seedinteger
summaryJson *stringWhere to write sensitivity_indices.json.
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_sensitivity_scanEvaluate many explicit parameter sets against observed flow and rank them.
ParameterTypeDescription
aggregatestring
baseInp *string
dryRunboolean
flowColstring
objectivestring
obsEndstring
obsStartstring
observed *string
parameterSets *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
runRoot *string
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_sensitivity_sobolSobol' variance-based sensitivity analysis via SALib (Saltelli sampling). Produces per-parameter first-order S_i + total-effect S_T_i at sample budget N*(2k+2).
ParameterTypeDescription
aggregatestring
baseInp *string
flowColstring
obsEndstring
obsStartstring
observed *string
parameterSpace *stringJSON object: parameter -> {min, max} bounds.
patchMap *string
runRoot *string
seedinteger
sobolNintegerSaltelli base sample size; budget = N*(2k+2).
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
swmm_uncertainty_source_decompositionIntegrate raw uncertainty outputs in <runDir>/09_audit/ (Sobol' / Morris / DREAM-ZS / SCE-UA / rainfall ensemble / MC propagation) into uncertainty_source_summary.md + uncertainty_source_decomposition.json (schema_version 1.0). Pure function; safe to re-invoke; emits an Evidence Boundary table so no method is silently absent.
ParameterTypeDescription
runDir *stringPath to the run directory (the one containing the 09_audit/ folder).
swmm_validateApply one chosen parameter set to a second event and score the validation run.
ParameterTypeDescription
aggregatestring
baseInp *string
bestParams *string
dryRunboolean
flowColstring
objectivestring
obsEndstring
obsStartstring
observed *string
patchMap *string
printRankingboolean
rankingJsonstring
rankingTopinteger
runRoot *string
summaryJson *string
swmmAttrstring
swmmNodestring
timeFormatstring
timestampColstring
trialNamestring

Security checks

6 checks have not been run yet.

Questions

About Zhonghao1995/agentic-swmm-workflow

How do I install Zhonghao1995/agentic-swmm-workflow?

Run uvx aiswmm, then add the server to your MCP client's configuration.

Is Zhonghao1995/agentic-swmm-workflow safe to use with an AI agent?

Its trust score is 52 out of 100 (fair). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Zhonghao1995/agentic-swmm-workflow still maintained?

Yes — the last commit was a month ago. The repository has 37 stars and 15 forks.

What tools does Zhonghao1995/agentic-swmm-workflow provide?

Conduid read 45 tools from the source: assign_subcatchment_outlets, audit_run, basin_shp_to_subcatchments, build_inp, build_raingage_section, export_inp, format_rainfall, generate_design_storm and 37 more. 45 of them publish their parameters, listed under Tools above.