Existing mobile agent-enabled anomaly detection schemes have not considered temporal behavior for their correct functioning and detection of temporal anomalies. This study employs a holistic system approach to design an Enhanced mobile Agent-enabled Anomaly Detection System (EAADS) by designing two new algorithms. The proposed algorithms are not only important for the completeness of the EAADS, but also for the detection of the anomalies caused by the delayed arrival of the in situ verification results. The formal specifications of the individual algorithmic functionalities are addressed by employing the Petri net theory. A bottom-up synthesis of the individual Petri net modules is carried out to formulate a unified model, which has helped in the identification and removal of inconsistencies in the system design. This process formally characterizes the behavioral properties and the overall workflow of the EAADS. The standard unified Petri net model is then extended into a corresponding high class Generalized Stochastic Petri Net (GSPN) model to formalize and analyze the temporal behavior of the EAADS in a highly nondeterministic communication environment. Finally, the GSPNbased temporal behavior is validated through implementation of the functional specifications on a real testbed composed of the resource constrained MICAz motes. The theoretical and experimental results demonstrate the ability of the EAADS to detect certain types of anomalies and the aptness of the temporal behavior of the EAADS for the low resource sensor networks even in a highly nondeterministic communication environment.