Perry the Platypus codenamed Agent P, is one of the main protagonists of Phineas and Ferb . He is the titular characters' pet platypus, who, unbeknownst to his owners, lives a double life as a secret agent for The O.W.C.A. (a.k.a. "The Organization Without a Cool Acronym"), a government organization of animal spies. In the Agency, his immediate superior is Major Monogram.
Perry has a lair under the Flynn-Fletcher's house that can be entered through various passages. One example is the Chimney Vator, in which he encounters Santa Claus.
His nemesis is Dr. Heinz Doofenshmirtz. Perry's mission is almost always foiling the doctor's plans, which he successfully accomplishes almost every time even with minimal details about the plans. During these missions, his battle with Dr. Doofenshmirtz cleans up what Phineas and Ferb have been working on that day. For one mission (and only one mission so far) his nemesis was The Regurgitator, whose current nemesis is the world.
Perry was adopted 5 years ago at an animal shelter run by the O.W.C.A. by the Flynn-Fletcher family, after Bucky's disappearance. The reason he was adopted was that according to Phineas, Perry looked at both Phineas and Ferb at the same time. When they adopted the platypus, he was given the name "Bartholomew" before he was renamed "Perry" .
Perry is normally found acting like a mindless platypus in front of his owners, Ferb and Phineas. He is also serious while not undercover, even in front of Major Monogram when he does anything silly. He is shown to have a mischievous side, as he willingly peed on Dr. Doofenshmirtz's couch and had once played with him while drenched in honey. Perry also appears to be selfless and devoid of vanity. t is only after he turns everything affected by the Ugly-inator back to normal that he reverts himself to his normal state. He also deeply cares about the Flynn-Fletcher family and is afraid to lose them and would take immediate action whenever they are threatened. He is nice to not only his allies, but to his nemesis Dr. Doofenshmirtz as well, though only at some occasions.
Relationships in Phineas and Ferb=
Perry's superior is the leader of his division of the O.W.C.A., Major Monogram. Monogram himself gives a mission briefing nearly every episode to Agent P. When Perry is receiving his mission in his lair, he writes down notes, assumed as something which would help him during his mission. However, sometimes, he just draws his boss ("S'Winter"). Perry always does as he says, never failing battling Doofenshmirtz or failing (with the exception of Phineas and Ferb's Quantum Boogaloo, which takes place in an alternate universe).
The Flynn-Fletcher family
Perry's affection for his family is most obvious and very indicative when he had a nightmare that his 'animal side' cover was blown and he is forced to lose the Flynn-Fletcher family and get a replacement. When Perry wakes up from the nightmare, Phineas reassures him that it was just "a bad dream", causing Perry to smile and go back to sleep ("Phineas and Ferb Get Busted!"). Perry's feelings for his owners are further showcased when he is faced with the prospects of moving to a new family in order to combat another evil scientist: he appears visibly shaken and sad. In the song "Come Home Perry", Phineas mentions that Perry is the color of a blueberry and is "kinda short and hairy." It is shown that Perry spends part of the night sleeping in Phineas's bed and at some point switches over to Ferb's so as to not show preference or play favorites with any one of them ("Oh, There You Are, Perry"). Also, he sometimes appears in the mornings on Candace's bed, even though it annoys her to no end. This may be because he's trying to give Candace a turn as well.