Perry's Double LivesAs any Phineas and Ferb fan knows, the boys' platypus lives two lives: his secret agent one, and his domesticated pet one. As this is obviously impossible to comprehend in real life, we cannot begin to understand that platypus's ways of dealing with the stress of two different lives, and since he cannot speak, it is unknown which life he prefers. Without picking sides, here are two statements to justify why he would pick each life. If you have anything more to add, please do.
Agent P is shown to be on the same level of intelligence as human's, if not more, so one would think this would be the dominant life. Obviously, Agent P acts in a much more dignified manner while in this life, and is able to enjoy things that he could not do around his family, or people closely related to them. However, his other life does serve as a convenient cover up and a place to live when he is not doing what the O.W.C.A. trained him to do. In this case, it would be fair to say that the O.W.C.A. actually raised him by training him onto the level of human intelligence, while his host "family" treats him as a common animal. Nevertheless, and despite which life is dominant, Agent P has come to appreciate his hosts, and it is fair to say that they have a liking towards each other.
Of course, Agent P could never be happy if he lived the life of a common pet, as there is no reducing his IQ. He is as much human as any other character in the series (despite the strange diet), and does not have anything to do that would actually interest an animal with such advanced capabilities, other than stopping evil doers and finding ways to relate to those who can actually understand and have a civilized conversation with him. Rest assured, this life is the only life that any intelligent species could be happy with living.
As Perry's intelligence has grown to the level of a human being's on account of the O.W.C.A.'s training, it is obvious that he didn't ask for it, as no animal would be able to, especially not a platypus, since they don't do much. It is possible that the O.W.C.A. ruined his life and messed with his nature to behave as a normal platypus should. All this aside, Perry obviously prefers his host family over the boring everyday routine of battling Dr. Doofenshmirtz. Everyday he is called away from a luxurious life as a house pet who is treated like an equal by the rest of his family (save for Candace), and is spoiled just as much. He is always torn when his job interferes with the life he could, and should be living with his family, and he would much rather be at home sitting on Phineas/Ferb's bed than trapped in a flower pot listening to some disturbed lunatic's back stories.
If he had a choice, it is clear that he would choose the boys over Dr. D any day, as he is always seen fighting evil with that same bored expression on his face, and always seems to want to be anywhere than where he is whenever the fedora is on his head. There is also the point that his job calls him to fight evil literally every day (of the summer at least) and involves him often being called into action for little more than the O.W.C.A. being slightly suspicious of a normally mundane activity due to it being carried out by his arch enemy. Unfortunately, getting fired by the O.W.C.A. would most likely result in something that sacks memories or leaves him landed in a prison somewhere, because with all his knowledge of the organization, he can't be fired knowing too much. So he shoots for the next best thing, being granted a simple vacation with his family, and being shot down every time.