Treating oral diseases remains challenging as API is quickly washed out of the application site by saliva turnover and mouth movements. In situ gels are a class of application forms that present sol-gel transition's ability as a response to stimuli. Their tunable properties are provided using smart polymers responsible for stimuli sensitivity, often providing mucoadhesivity. In this study, antimicrobial in situ gels of thermosensitive and pH-sensitive polymers loaded with silver nanoparticles were prepared and evaluated. The nanoparticles were prepared by green synthesis using Agrimonia eupatoria L. extract. According to the data analysis, the in situ gel with the most promising profile contained 15 % of Pluronic® F-127, 0.25 % of methylcellulose, and 0.1 % of Noveon® AA-1. Pluronic® F-127 and methylcellulose significantly increased the viscosity of in situ gels at 37 °C and shear rates similar to speaking and swallowing. At 20 °C, a behavior close to a Newtonian fluid was observed while being easily injectable (injection force 13.455 ± 1.973 N). The viscosity of the formulation increased with temperature and reached 2962.77 ± 63.37 mPa·s (37 °C). A temperature increase led to increased adhesiveness and rigidity of the formulation. The critical sol-gel transition temperature at physiological pH was 32.65 ± 0.35 °C. 96.77 ± 3.26 % of Ag NPs were released by erosion and dissolution of the gel after 40 min. The determination of MIC showed effect against E. coli and S. aureus (0.0625 mM and 0.5000 mM, respectively). The relative inhibition zone diameter of the in situ gel was 73.32 ± 11.06 % compared to gentamicin sulfate. This work discusses the optimization of the formulation of novel antibacterial in situ gel for oromucosal delivery, analyses the impact of the concentration of excipients on the dependent variables, and suggests appropriate evaluation of the formulation in terms of its indication. This study offers a promising dosage form for local treatment of oral diseases.