These kids try to beat their evil teacher, I think her name has Macbeth or Ms. Beth or something, and they all act as secret agents? I never got to finish this animated show. It is either Australian or Canadian.
After further research, you are probably looking for I.N.K. Invisible Network of Kids
Pinkerton School is a boarding school with two teachers. One of the teachers, Mr. Soper, is nice, and the other, Ms. Macbeth, is evil and is constantly trying to enslave the children of the school. However, four of the students act as a secret organisation known as "The Invisible Network of Kids", or "I.N.K." for short. I.N.K's mission is to thwart all of Ms. Macbeth's evil plans.
Ms. Macbeth is the evil teacher of Pinkertown. She has purple hair, black eyes, dark pink turtleneck jacket, long dark green skirt, boots, bright green glasses, purple nail polish, and a pointy nose. She is an evil villain who causes problems to I.N.K. Invisible Network Of Kids. She always plans up mischievous plans. She is a teacher in the Pinkerton School but spends much more energy hatching evil schemes to take over the world than to teach her students. She has a pet goldfish who she considers to be her evil companion, even though it is just like a normal goldfish who can't talk. No child knows about she being evil except for I.N.K. Invisible Network Of Kids. She describes herself as the evil villain. Interestingly enough, she also holds the functions of a "mascot" for the show, insofar as she is the one making most of the musical parts (in every episode she is singing a song about her evil scheme) and stars as a more crudely drawn cartoon character in the 'Science Club' sequences at the end of every episode. While being a villain, her goofyness and the randomness of her actions make her the comic relief of the show as well. In "Investigation at Pinkerton", it was revealed that Macbeth was a famous children's singer named Valentine Bergonia 30 years ago.
Found by searching for animated evil teacher macbeth
For an animated TV show with kids as secret agents, could you be thinking of Codename: Kids Next Door, or are you looking for a more "realistic" sort of secret agents?
Codename: Kids Next Door (commonly abbreviated as KND) is an American animated television series created by Tom Warburton for Cartoon Network, and the 13th of the network's Cartoon Cartoons. The series centers on the adventures of five ten-year-olds who operate from a high-tech tree house, fighting against adult and teen villains with advanced 2×4 technology. Using their codenames (Numbuhs 1, 2, 3, 4, and 5), they are Sector V, part of a global organization called the Kids Next Door. Numbuh One is the bald, astute, no-nonsense, super skilled British boy Nigel Uno, leader of Sector V. Numbuh Two is the chubby, humorous, intellectual, aviation enthusiast nerdy boy Hoagie Gilligan. Numbuh Three is the quirky, happy-go-lucky Japanese-American girl Kuki Sanban. Numbuh Four is the short-tempered, often irrational, fighting-prone Australian-American boy Wallabee Beatles. Numbuh Five is the intelligent, laid-back, highly skilled African-American girl Abigail Lincoln.