At what ages can a child serve as a Shomer for the purpose of breaking Yichud?
Yichud between a man and woman is permitted in a case that a Shomer is present. Children that are of the age to understand the act of intercourse, but will not agree to intercourse, are considered valid Shomrim to help break Yichud. During the day it suffices to have one child Shomer to break Yichud. However, at night, two children Shomrim are required to break Yichud. There are various opinions regarding the range of age which makes a child eligible to serve as a Shomer. Practically, children between the age of 5 and 9 are valid Shomrim. This applies whether the child is male or female, and whether or not the child is a relative of the male or female adult of which the Yichud is taking place.
 See Devar Halacha 4/1-3l; Nitei Gavriel 29/1-7; The Laws of Yichud 94
 Michaber E.H. 22/10 “So too, Yichud is permitted with a woman that has a small female child with her who knows the taste of intercourse and does not give herself up for intercourse”; Kiddushin 81b
The reason: As a woman is fearful to have relations in the presence of the child, as the child will reveal her secret. [Michaber ibid]
 Rama Y.D. 192/4; Raavad; Nitei Gavriel 27/8
 There is no exact age recorded in the Talmud or Shulchan Aruch to define the above statement of “knows the taste of intercourse and does not give herself up for intercourse”. [Salmas Chaim 718 in name of Chasam Sofer] Some Poskim rule that every person may measure the age based on his own estimation. [Chjasam Sofer Y.D. 144] Some Poskim write that from the age that a girl is ashamed to be naked in front of others she is considered a Shomer. [Beis Shlomo 48; Yagel Yaakov 14; See Nitei Gavriel 29/2] Other Poskim say the age is based on when the child is old enough to tell over things that she sees. [Porat Yosef 28] Some Poskim record an exact age, as will be brought below:
The following minimum ages are recorded in Poskim: Female child: From 3 years old. [Mahram Merothenberg; Hamakneh Kiddushin 82a; Porat Yosef 1/29 that so is implied from Bach and Tur; See Tzitz Eliezer 6/215]; From 5 years old. [Tzemach Tzedek 39; Dvar Halacha 4/2; Nitei Gavriel 29/2-3 that so rule Morei Horaos] From 5-6 Years old. [Shevet Halevi 5/202]; From 6-7 years old. [Yaskil Avdi 5/22] Male child: From 5 years old for a male. [Chasam Sofer E.H. 2/96; Tzemach Tzedek Hashmatos Miluim C.M. 10; Chukeiy Hanashim of Ben Ish Chaiy 42/164; Nitei Gavriel 29/7] From 6 years old. [Dvar Halacha 4/3 that so ruled Chazon Ish] From 6-7 years old. [Sidrei Taharah Y.D.D 192/13] From 7 years old. [Ohalei Yeshurun in name of Rav Moshe Feinstein]; From 9 years old. [Hamakneh Kiddushin 81a; Kesef Mishneh Tumas Meis 11/9; Pleisi Y.D. 192/4; Machatzis Hashekel 192; Chochmas Adam ibid; Dvar Halacha 4/10 based on Beis Yehuda 13]
The following maximum age is recorded in Poskim: Female child: Until 9 years old. [Bach 22; Pischeiy Teshuvah 22/12 in name of Zechor Leavraham Yud Erech Yichud, in name of Bach; Piskei Dinim 192/17; Beis Shlomo 48; Chochmas Adam 115/9; Levushei Mordechai E.H. Tinyana 42; Shevet Halevi 5/202; Betzel Hachochmah 2/59; Nitei Gavriel 29/5] Until 10 years old. [Or Sameiach 4; Pesach Habayis 10 in name of Chazon Ish] Until 12 years old. [Panim Meiros 2/131; Ezer Mikodesh 22; Atzei Arazim 22/15; Porat Yosef 24; Ohalei Yeshurun in name of Rav Moshe Feinstein] Male child: Until 9 years old. [Bach 22; Piskei Dinim 192/17; Sidrei Taharah Y.D. 192/13; Ezer Mikodesh 22/3; Levushei Mordechai E.H. Tinyana 42; Dvar Halacha 4/3; Nitei Gavriel 29/7] Until 12 years old. [Mahram Merothenberg]
 Devar Halacha 4/1