The amino acid sequences of peptides determine their self-assembling properties. Accurate prediction of peptidic hydrogel formation, however, remains a challenging task. This work describes an interactive approach involving the mutual information exchange between experiment and machine learning for robust prediction and design of (tetra)peptide hydrogels. We chemically synthesize more than 160 natural tetrapeptides and evaluate their hydrogel-forming ability, and then employ machine learning-experiment iterative loops to improve the accuracy of the gelation prediction. We construct a score function coupling the aggregation propensity, hydrophobicity, and gelation correctorCg, and generate an 8,000-sequence library, within which the success rate of predicting hydrogel formation reaches 87.1%. Notably, the de novo-designed peptide hydrogel selected from this work boosts the immune response of the receptor binding domain of SARS-CoV-2 in the mice model. Our approach taps into the potential of machine learning for predicting peptide hydrogelator and significantly expands the scope of natural peptide hydrogels.