Auditable Automation of Activated Sludge Modeling for Wastewater Treatment Diagnosis Using LLM-Agents
Abstract Wastewater treatment plants (WWTPs) need mechanistic models that explain carbon, nitrogen, and phosphorus transformations under changing operating conditions. Building activated sludge models (ASMs) still depends heavily on expert choices about boundaries, components, and reactions. We developed AutoWWTP-ASM, an auditable large-language-model agent (LLM-Agent) workflow for library-constrained ASM configuration, execution, and calibration. The workflow converts wastewater-process descriptions into structured configurations and combines a predefined ASM library with boundary specification and optional human review. In a coupled carbon−nitrogen−phosphorus task, AutoWWTP-ASM instantiated a model containing 21 state components and 41 biochemical reactions. Across 37 evaluation tasks, the average accuracy scores of ten LLM backbones ranged from 0.596 to 0.627, indicating a narrow range of backbone-level performance within the tested workflow. Ablation experiments evaluated the knowledge, planning, and reflection modules. Comparisons with a single agent, an 8B LLM, and human modelers assessed deployment and efficiency trade-offs. Additional evaluations using six IWA BSM1 scenarios and data from a full-scale WWTP provided further evidence of applicability under standardized and real-data conditions. We provide open-source LangGraph code, together with Codex, Claude Code, and Agent Skill implementations, to support the reproducible development of auditable LLM-Agent workflows for environmental modeling.
Authors
- Haolin Yang (ORCID: https://orcid.org/0000-0001-8592-5704)
- Yu-Qi Wang (ORCID: https://orcid.org/0009-0005-7266-8194)
- Hong‐Cheng Wang (ORCID: https://orcid.org/0000-0002-6555-1722)
- Yunpeng Song (ORCID: https://orcid.org/0009-0002-6347-8880)
- Jia-Ji Chen (ORCID: https://orcid.org/0009-0007-3587-8381)
- Wen-Zhe Wang
- Ai-Jie Wang
Institutions
- City University of Hong Kong (HK)
- Harbin Institute of Technology (CN)
- Research Center for Eco-Environmental Sciences (CN)
Publication Details
- Journal
- Environmental Science & Technology
- Published
- 2026-09-25
- DOI
- https://doi.org/10.1021/acs.est.6c09278
- Primary Topic
- Wastewater Treatment and Nitrogen Removal
- Type
- article
- Field-Weighted Citation Impact
- 0.00