Perry the Platypus

Perry the Platypus, also known as Perry or Agent P is a fictional character created by Dan Povenmire and Swampy Marsh for the animated television series Phineas and Ferb. Perry is played by Dee Bradley Baker.
Role in Phineas and Ferb.
Phineas Flynn and his stepbrother Ferb Fletcher keep Perry as a pet but think that he’s just a regular platypus who “doesn’t do much”. Whenever Phineas has an idea for what he and Ferb will build that day someone asks “hey, where’s Perry”. Perry is actually a spy working for OWCA (the Organization Without a Cool Acronym) while wearing a fedora and is said to be OWCA’s best secret agent. Perry’s boss Major Monogram normally sends him to fight Dr. Doofenshmirtz. In almost every episode, Perry the Platyus shows up at Doof’s headquarters, Dr. Doofenshmirtz traps Perry, Doof explains his evil plan, Perry escapes, Perry and Dr. Doofenshmirtz fight, Perry beats Doofenshmirtz and Doof yells “Curse you, Perry the Platypus.” That said, there are some exceptions to this. For example, in the Season One Episode Journey to the Center of Candace, Dr. Doofenshmirtz decides to “mix it around a little” by beginning with describing his evil plan and then trapping Perry, but as soon as Dr. Doofenshmirtz explains his plan is “to destroy anyone who can’t make up their mind” Perry immediately catches and arrests Doof after having a flashback to his owner Phineas Flynn saying he couldn’t make up his mind.
Other enemies.
In the episode Rouge Rabbit, Perry the Platypus is sent to fight an evil rabbit named Dennis who is more dangerous than Dr. Heinz Doofenshmirtz is. In the episode “Oh, there you are Perry”, Perry is told to leave Phineas and Ferb to fight a new supervillain the Regurgitator who takes on Dr. Doofenshmirtz as a sidekick and loses to Perry because of Doof’s stupidity. In some episodes, Perry actually works with Dr. Doofenshmirtz against a more dangerous villain.
Relationship with Doofenshmirtz.
Even though Dr. Doofenshmirtz is Perry’s nemesis when Perry isn’t trying to stop Doofenshmirtz from doing evil the two are actually friends. In the Season One episode Oil on Candace, Perry tries to cheer up Dr. Doofenshmirtz when he can’t convince his Professor that he’s good at being evil. In the episode Dude, We’re Getting the Band Back Together, Perry helps Doofenshmirtz throw a birthday party for his daughter Vanessa. In the episode Put that Putter Away, Perry and Doof vacation together. In one episode, Perry pretends to be Doofenshmirtz’s pet so that Doof can impress a woman he wants to date. In the episode It’s About Time, Perry has a song about how sad he is without Doofenshmirtz after Doof replaced him as an enemy with Peter the Panda. At one point, Dr. Doofenshmirtz tells Perry “You are my rock, Perry the Platypus, by which I mean the one person who’s always there for me”.
Role in Across the Second Dimension.
Perry plays a major role in where Perry reveals that he’s actually a secret agent to stop the parallel universe version of Dr. Doofenshmirtz from killing Phineas and Ferb but Phineas is angry with Perry for lying to him.
Role in the OWCA Files.
In the spin-off The OWCA Files, Perry has to train and work with a team of new partners one of whom is the no longer evil Dr. Doofenshmirtz.
Role in Milo Murphy’s Law.
In the spin-off Milo Murphy’s Law, Perry’s boss Major Monogram has him sent to Dr. Doofenshmirtz to stop Doof from accidentally causing problems while trying to be good. Only for Doofenshmirtz to find out and be angry with Perry because “you’re not my friend, you’re my babysitter”. Though in the series finale, Dr. Doofenshmirtz forgives Perry after finding out Perry spent all the money he was making on helping pay for Dr. Doofenshmirtz to invent time travel and become Professor Time.