  Intelligent transport of molecular species across different barriers is
critical for various biological functions and is achieved through the unique
properties of biological membranes. An essential feature of intelligent
transport is the ability to adapt to different external and internal conditions
and also the ability to memorise the previous state. In biological systems, the
most common form of such intelligence is expressed as hysteresis. Despite
numerous advances made over previous decades on smart membranes, it is still a
challenge for a synthetic membrane to display stable hysteretic behaviour for
molecular transport. Here we show the memory effects and stimuli regulated
transport of molecules through an intelligent phase changing MoS$_2$ membrane
in response to external pH. We show that water and ion permeation through 1T'
MoS$_2$ membranes follows a pH dependent hysteresis with a permeation rate that
switches by a few orders of magnitude. We demonstrate that this phenomenon is
unique to the 1T' phase of MoS$_2$ due to the presence of surface charge and
exchangeable ions on the surface. We further demonstrate the potential
application of this phenomenon in autonomous wound infection monitoring and
pH-dependent nanofiltration. Our work significantly deepens understanding of
the mechanism of water transport at the nanoscale and opens an avenue for
developing neuromorphic applications, smart drug delivery systems,
point-of-care diagnostics, smart sensors, and intelligent filtration devices.
