Revolver Ocelot: [shrug] Practice.
There's The Mole, who's a villain pretending to work for the good guys. And the Reverse Mole, which is the same but reversed. You put them together, and you get the Double Agent, who's working for either the villain or the hero, and acts as a fake mole for the other.
Sometimes, they like to go one step beyond, or eleven. This is the trope for people who have exacted layers and layers of deception, normally as a massive Gambit Roulette to satisfy their wishes or their true employers' wishes. It's quite often that the chain of deception ends with the person the spy loves. The effect on the viewer can be very disorienting as they try to keep up.
Contrast HeelFace Revolving Door, which is a character cycling between being a hero and a villain, and Chronic Backstabbing Disorder, where people constantly make allegiances to stab them in the back. In the case of the revolving door and the disorder, the character is genuinely changing alignments or allegiances, whereas in this trope the character never truly changes (or at least, rarely), it's just the in-universe perceptions of the character that change. Sometimes, the recursion can reach I Know You Know I Know levels.
For example, take the classic Cold War double agent. A Russian who "defects" to the Americans, to supply information back to the Russians. In these examples, the double agent is actually a spy for a fleet of invading aliens. But the CIA know about the aliens, thus make the man a mole for them. But the KGB had their suspicions about the aliens anyway, but don't have the tech themselves to infiltrate the aliens so they piggyback on the Americans. But this is all an act for his true employers, a Path of Inspiration... and so on.
Compare Wild Card, who openly has no clear or multiple allegiances.
- Follow along closely, children: Xellos in Slayers pretends to be a priest who's really a demon (who is a priest of the demon religion) who's really under the orders of a demon but is actually betraying THAT demon for another demon, and is trying to destroy the world except sometimes maybe not, and helps the team, except when trying to destroy them, except when he's secretly helping. Lina trusts him implicitly to eventually fuck her over and says at much at one point. Xellos thinks she's crazy, but she's not the one serving multiple masters with multiple plans to destroy/save/rule the world.
- Kaji in Neon Genesis Evangelion, appearing to work for Nerv, Seele, the Japanese Ministry of the Interior, and against another one of them, in varying configurations. His true mission is to find out the truth about the nature of both The Conspiracy behind Second Impact and the angels for himself.
- Sideways in Transformers Armada, not aided by a shaky, rushed translation. He's an Autobot. No, a Decepticon posing as an Autobot. No, he just wants the Mini-cons for himself. No, he's working for Unicron. No, he is part of Unicron. And then he returns in Transformers Cybertron to do it all over again with a yet different final goal.
- Tsuchimikado Motoharu from A Certain Magical Index is the only magician-esper hybrid and is constantly switching between working for Aleister Crowley (and Academy City's dark side) and Necessarius. It's even hinted that he works for even more covert organizations, but he's being let off the hook for the time being. The best part is that everyone knows he's got multiple agendas and nobody knows who he really works for... but because of this, he makes an excellent neutral middleman between all these organizations so he's left alone for the most part.
- From Naruto, we have Kabuto Yakushi. First, he disguised himself as a Leaf ninja for at least four years, only to reveal he's working for Orochimaru, who himself does not entirely trust him. Later we discover he was a spy for Sasori in Orochimaru's organization, but Orochimaru had long since removed that brainwashing and made him a double agent to keep tabs on the Akatsuki. After the apparent death of Orochimaru, Kabuto went rogue, with various reactions to the loss of Orochimaru from shock to joy. Nowadays, he's working with Tobi, but blackmailed him and is pretty much in charge, depending on their various trump cards. Later we learned he was a spy for Konoha (which he later spies on for Orochimaru) and infiltrated numerous countries on its behalf. However, Konoha stopped trusting him resulting in him having a grudge again Konoha. Confused yet?
- Trigun: Manga version of Nicholas D. Wolfwood. Part of every major faction in the series and at least one minor one. Shot his teacher to join the Gung Ho Guns to subvert Knives' plans for The End of the World as We Know It, but also manipulated The Hero on behalf of the villains before and even after becoming emotionally invested in his well-being. Then turned on them after Vash was defeated and captured, and staged a jailbreak. Finally abandons everyone in favor of his primary allegiance: the kids at the orphanage where he spent the closest thing to a happy bit of his childhood.
- Nimura Furuta from Tokyo Ghoul and its sequel, :Re. He's a Tyke Bomb working for the organization V, a Ghoul Investigator, a collaborator in Dr. Kanou's experiments, a mole that leaks information to Aogiri and infiltrated both the Ghoul Restaurant and the Clowns gang as Souta. To top off the complicated mess of his involvements, he's a Bastard Bastard from the Washuu Clan. Suffice to say, he's spent considerable time establishing connections with as many groups as possible. It isn't clear exactly where his true loyalties lie, or what his true goals might be. By the second half of the sequel, however, he is at least established as the final Big Bad, who is ultimately loyal only to himself.
- Agent Shigeki Arakawa from the JGSDF in Patlabor 2 is working for the government while supposedly working with Tsuge, while supposedly working with Gotoh, while trying to appear innocent of Tsuge's terrorist acts as to avoid repercussions. It doesn't work for him, as he overplays Gotoh.
- Aruka Schild of NEEDLESS. She's introduced as a member of the resistance against Arklight. She appears to betray them but was in fact working for Arklight as a double agent to obtain a data chip their leader possessed. When she appears again she makes several attempts to kill her brother Cruz, but mind-bogglingly, also gives him help in secret, even going so far as to kill her own subordinates. Cruz is thoroughly confused by her contradictory actions. In their final encounter, Aruka reveals SHE was the one who hid the data chips in the first place, putting one in Cruz's head during a surgery he was having. Turns out all her murder attempts on her brother were so she wouldn't blow her cover while Arklight was watching and the help she gave in secret was to get Cruz, and the chip, as far away from harm and Arklight as possible. Sadly she is killed by Arklight as a traitor before she can heel-face turn, and the author never goes into further depth about her life of espionage and intrigue. How Aruka ended up under Arklight's thumb and what she was trying to accomplish would make a darn interesting spin-off story.
- Zeke from Attack on Titan. Raised to infiltrate Marley for the Eldian Resistance, then betrayed the resistance for Marley, then betrayed Marley for a second resistance and the allied Eldian nation that the first resistance was trying to restore. Needless to say, while the second resistance trusts him, as he's leading it, Eldia doesn't trust him any farther than it can throw him.
- Princess Principal essentially has a binary example. Charlotte, a.k.a. "Princess," is on the surface a double-agent, continuing to play her role as princess while she works with her kingdom's enemies, the Commonwealth, to take the throne. The complicating factor is that she technically isn't the princess—unbeknownst to everyone else, she swapped places with Ange, the spy squad's ace agent, when they were children. Ironically, the Commonwealth's game plan is to install Ange as a "fake" queen after assassinating the current one, not realizing that Ange actually is the heir to the throne. Ange (actually Charlotte) plays along with this plan for the most part, but is only truly loyal to Charlotte (actually Ange), and just to add further conflict, "Charlotte" does want to go through with this plan while "Ange" would rather they both sneak out of the country so they don't get killed. At one point the team is ordered to eliminate the Princess, and to escape this tricky situation, both of them end up impersonating themselves.
- The Autobot Punch/Counterpunch was originally portrayed as a Double Agent (an Autobot who pretended to be a Mole for the Decepticons). Later interpretations of the character sometimes depict him as a Double Reverse Quadruple Agent, often due to prolonged effects of Becoming the Mask.
- The second season of Sleeper has Holden doing this through the entire run.
- During the early run of New Avengers, Spider-Woman is a quintuple agent. She's an Avenger, a member of HYDRA, an agent of S.H.I.E.L.D., loyal to Nick Fury specifically, and really a Skrull.
- Trinity War: The Atom turns out to be a JLA agent who was ordered to infiltrate the Justice League on Amanda Waller's orders. But then the finale reveals that she's actually Atomica of Earth-3, working with The Outsider and his Secret Society to manipulate everyone so that they could get their hands on Pandora's Box and use it to summon the rest of the Crime Syndicate.
- In Monstress, Master Ren is an agent of the Dusk Court, but he's actually keeping tabs on them for his cat superiors, except not really as he's actually working for the Lord Doctor, but now he's grown a conscience and isn't working for him anymore.
- Wonder Woman (1987): While Diana sees right through all Ares' subterfuge when Zeus is deposed by Athena the war god plays all the sides, acting as a spy for Athena's group and Zeus' group whle also having his own (flexible) goal. He ends up aiding Athena, though not being truley on her side, but that's because there's no one he hates more than Zeus and Hades tried to murder Ares' granddaughter Diana right in front of him which forced him to pick a definitive side. Wonder Girl remains confused even after Ares plays his hand by killing Hades and freeing Diana and her allies.
- Calvin and Hobbes did this in one strip where they're playing football. Then they try to justify why the other didn't score (I'm actually a double agent, triple agent, your goal is on top of mine so anytime you score it's a point for me, I'm actually a badminton player disguised as a football player, etc.) until it turns into a game of Calvinball.
- In Harry Potter and the Methods of Rationality Blaise Zabini is a quintuple agent. In a game with three sides. The only reason he never became a sextuple agent was that he couldn't find anyone else to sell out to, though it probably doesn't help that one of his true masters Memory-Charmed him into forgetting their arrangement. He later makes this work for him: now that he's cultured his image as a Wild Card among wildcards, at a time when Slytherin House is divided in twain, with battle lines drawn, he sits in the middle.
- In Deep Cover Naruto spends years as spying on Sound for Konoha. Then he gets a job from Orochimaru to replace one of Konoha's other spies and feed them false information. In other words, he's a Konoha agent pretending to be a Sound agent pretending to be a Konoha agent pretending to be a Sound agent. In the end, he realizes that his loyalty to Konoha is only due to being born there and chooses to be a Sound ninja.
- Basically everyone in Changelings, Changelings Everywhere! is either a spy or duplicate from another changeling faction to the point most aren't really sure who they work for. Eventually, the Twilight Sparkle changeling breaks out her graph paper so everyone can figure out who they work for.
- Kaji is this Neon Metathesis Evangelion as much as in canon. He works as inspector for the U.N., he works for Gendo, he works for the Japanese Ministry of the Interior, and at times also against all of those. Recently, he has even begun working for Kaworu in exchange for information. He already has pissed off or will piss off SEELE, Gendo and the JSSDF.
- Eventually, Jaune in In the Kingdom's Service ends up as a student at Beacon who's secretly working for the Vale Secret Service, pretending to work for Cinder Fall, and working alongside Roman Torchwick to stop Cinder. Roman is one of only two people (alongside Blake) who knows all of Jaune's loyalties, real and fake, and is up front that he'll betray Jaune the moment their interests no longer align. After Oobleck dies and a new director takes over the VSS, Jaune plays all three sides against one another, though once again, Roman knows he's doing it and simply doesn't care because it advances his agenda as well.
- In Cypher, the protagonist is the plaything in a Gambit Pileup. He ends up a hex-tuple spy, ultimately working for himself. He pulled a Memory Gambit before the movie began, so he could pass one set of lie-detectors to get into one agency, then fail the same set of lie-detectors to get into the rival agency.
- Lightly riffed in Indiana Jones and the Kingdom of the Crystal Skull : Mac betrays Indy in the beginning, "explains" it partway through by claiming to be a CIA double-agent, then betrays him again at the end. Indy lampshades this:
Indy: What, are you some kind of triple agent?!
Mac: Nah, I just lied about being a double.
- Koskov from The Living Daylights is a somewhat downplayed version of this trope. By the end of the film his loyalties have mostly been clarified, he was using the British to eliminate a superior who was about to have him arrested for corruption, but earlier in the film he bounces back and forth.
- Cary Grant's character in Charade is constantly changing sides, turning from The Mole to Double Agent and eventually to Double Reverse Quadruple Agent.
- A relatively simple one in Spy: CIA agent Bradley Fine turns up alive and working for the villain after faking his death, only for him to later reveal that he was actually forced to go into deep cover after another agent really did turn traitor and leaked the identities of the agency's top operatives.
- Ilsa Faust in Mission: Impossible Rogue Nation, whose allegiance seems to shift with every scene. Eventually, it's revealed that she's a mole working under the command of MI6 whose goal is to take down the Syndicate; in order to maintain the illusion of working for them she is forced to "betray" Ethan and his allies numerous times to the enemy when in actuality she's helping them all the while... maybe.
- Nowak in The Inquest of Pilot Pirx is a robot who works for no one but himself and pretends to be a human who for humanity's sake pretends to be a robot who works for no one but himself.
- Protagonist Evelyn Salt in Salt, the extent of which is revealed over the course of the film. She started as a KGB, later SVR, Sleeper Agent inserted into the United States as a child and joined the CIA, then gets outed by her own SVR handler as part of The Plan and goes on the lam. Problem was, she'd gone native after her American husband pulled out all the stops to get her freed after she was captured in North Korea on a CIA assignment, and after they kidnap and later murder him, she fakes carrying out her part of the sleeper agents' plan, kills her handler, then infiltrates the infiltrators to completely wreck their attempt to start World War III.
- In Atomic Blonde, Lorraine is revealed to be the mysterious Satchel, a KGB mole within MI6. Except the very end of the movie shows that in reality she's a CIA agent, planted to play both of the other agencies against each other.
- Severus Snape in Harry Potter. Early on in the series, we are given reason to suspect that he's an agent for Voldemort, but Dumbledore keeps insisting that Snape is on their side, without ever actually saying why he's so certain of this. The short version is, both sides think that Snape is their double agent, and both are aware of the other side thinking that to be the case. The only question is which side Snape actually does work for, and we don't finally learn the truth for a long time. The fact that Snape is able to pull this off when both of Voldemort and Dumbledore are accomplished mind-readers is all the more impressive.
- In Dune, Yueh came pretty close, what with his being mentally conditioned at the Imperial Medical School to be unable to harm another person, and then secretly captured along with his wife by the Harkonnen Family and re-brainwashed into an assassin, then retained by the Atreides Family on the grounds of his original, supposedly unbreakable conditioning, eventually betraying them to the Harkonnens on the promise of being reunited with his wife but secretly resisting their brainwashing and at the last minute helping the Duke's son and her mother escape, then arming the captured Duke Atreides with a concealed suicide weapon he can use to kill the Baron Harkonnen, then pretending to still be loyal to Harkonnen and asking to be reunited with his wife at which point Harkonnen tells him she is dead and kills him. More of a very unstable double agent, but then this all happens in something like the first three chapters of the book.
- X-Wing Series: Gara Petothel, though not intentionally, at least at first. At first, she intended to be The Mole; later she became the mask. Later still she was discovered and had to go back to her old side - but worked to sabotage it.
- One of these is the main character of Keith Laumer's Dinosaur Beach, leading to multiple levels of Tomato Surprise as he betrays one faction or another. His ultimate allegiance turns out to be to none of the main factions—all of them wished to "fix" the timestream by eliminating time travelers after their own time period, but none were willing to accept that their own time travel was part of the problem. He set everything up to retroactively prevent the invention of time travel, at the cost of the existence of everyone who was born after its invention.
- The Illuminatus! novels have Tobias Knight, described as the only quintuple agent in the history of espionage. Apparently at one point he was working for the CIA, KGB, FBI, Illuminati and the Discordians all at the same time, and had reached the point where he was participating in conspiracy for its own sake.
- While the agent in question was completely unaware of his status, unraveling the layers of this drive the plot of Philip K. Dick's We Can Remember It For You Wholesale. Maybe.
- The Mack Reynolds novel The Five-Way Secret Agent, where a guy is drafted into an international espionage assignment by five different opposing factions, one after another.
- In James Clavell's Noble House, Roger Crosse is the chief of British Intelligence for Hong Kong, who pretends to work for the KGB but really reports to London and earns money and commendations (by selling information to and selling out agents from) from both sides.
- Kemper Boyd in James Ellroy's American Tabloid. He works as a gofer for the Kennedy brothers, spies on them for J. Edgar Hoover, gets a job investigating civil rights abuses at the Kennedy Justice Department and uses it as a cover for operating an anti-Castro Cuban exile training camp for the CIA, and turns the camp into a front for a heroin-smuggling scheme he cooked up with The Mafia. If he had somehow worked out a way to get on the Hughes Tool Company payroll, he'd have been working both for and against every single faction in the novel simultaneously.
- Tim Powers' novel Declare is based partially on the life of Kim Philby (see below, under "Real Life") and Cold War spying in general, so this inevitably comes into play. As is put to the protagonist Andrew Hale, the final fate of any spy network is "playback," where they're caught by a hostile power and used to feed false information back to their home agency, played back for all they're worth while trying to extract useful information from them. Hale ends the book playing back against the British SIS and the Soviet KGB for himself, finally getting out of the Great Game and retiring with the woman he loves.
- The Riddle Master Trilogy: Deth: Pretends to be working for the High One, despite actually being the High One himself and working under deep cover for his impersonator, so that he can mentor his successor into success, which requires betraying said successor to the man unknowingly impersonating himself, aka the High One and faking his own death to impersonate a wizard who was never a wizard but was always him. (Deth why.)
- In Changes, a novel of The Dresden Files, Martin is a member of the Fellowship of St. Giles, people who have been infected by, but not yet succumbed to, the Red Vampire curse, who work to oppose the Red Court. As events in the novel progress he betrays his fellow members to the Red Court, apparently as one of their agents. However he really is against the Red Court, just on his own terms, and betraying the others was part of a gambit of his, which involves sacrificing his own life to ultimately defeat the Red Court.
- Charlie Walter in The Mental State is a LITERAL example! After his true role in the Battle of Wits between Zack and Saif is revealed, Zack even describes him as this WORD FOR WORD! His true allegiance is with Zack, but Saif is aware of this and tortures information out of him. Luckily, Zack had prepared for this in advance and supplied Charlie with false information. This ultimately makes him a quadruple agent that Saif reversed and Zack reversed back.
- In 1984, O'Brien is a prominent member of the Inner Party (essentially government top brass), but Winston gets the gut feeling that he's not as loyal to the Party as he should be. About midway through the novel, O'Brien seemingly confirms Winston's suspicion when he reveals himself to be a member of the Brotherhood and brings Winston into the fold. But then even later, it turns out that O'Brien was not only loyal to the Party all along, but was also the mastermind behind Winston's capture by the Thought Police and would eventually be the one to carry out Winston's Mind Rape.
Winston: They got you too!
O'Brien: They got me a long time ago.
- The Traitor Baru Cormorant: there's a reason why the book is called that. She betrays her homeland, Taranoke, by joining the Empire of Masks that colonized it. For the Masquerade, she suppresses a rebellion in Aurdwynn, and then turns around and betrays the Masquerade by raising a new one more likely to succeed. Leading that rebellion, Baru destroys Aurdwynn's colonial administration. But Baru is doing so on orders from the Throne, the Masquerade's shadow government, acting as a honeypot to draw out every rebel in Aurdwynn, both overt and covert, so they can be wiped out in a single stroke (while also removing the popular but ineffectual colonial governor from power). With Aurdwynn thus pacified, Baru proves herself worthy of joining the Throne and attaining near-absolute power over the empire. And with that power, she intends to destroy the Masquerade from within as revenge for the atrocities it perpetrated against Taranoke, all the other lands it's colonized, and finally herself, when the Throne's final entrance exam turns out to be forcing her to execute the woman she loves.
- Special Operations: Happens several times.
- Dieter Braun and Hans Tauber in the first book initially seem to just be loyal Germans, then Finn comes to suspect that the two of them are secretly members of the resistance, a suspicion which is confirmed, although the two are actually Abwehr spies trying to bring down the Resistance for the Nazi's.
- In the second book Veronique initially seems to be a British agent on a mission, then apparently kills a fellow agent and goes rogue, The man actually died in an accident and she is still serving the Allies.
- Also in the second book Jacques is sabotaging the mission for the Nazi's, but only because they have his parents prisoner, with him also trying to manipulate the Nazi's to free the prisoners and come out on top... just at the cost of seeing some of his allies as expendable.
- Alan Munro in the fourth book had a good record as an agent but seemingly deserted with a lot of money. He is actually trying to save the life of his daughter, who is a prisoner the Gestapo are about to execute, but it remains a matter of concern just what hell do to save her life ultimately he doesn't; sell out anyone though.
- InCryptid: Antimony Price infiltrates the Covenant as The Mole for the Price family to learn their plans for North America. The Covenant, once deciding she's not a threat, train her as one of their own, and send her to infiltrate the Spencer carnival to determine whether they're knowingly harboring cryptids. It turns out the Covenant knew who she was from the beginning, but they hoped they could turn her to their side. It doesn't work.
- The Deer and the Cauldron - Wei Xiaobao keeps accumulating multiple sets of conflicting loyalties (some genuine, some he made up in order to stay alive); it's no surprise that he eventually gets tired of trying to manage the mess he got himself into by Faking the Dead.
- Tony Almeida in Season 7 of 24. He initially seems to be working for David Emerson and his mercenaries, until it's revealed that he's working with Bill and Chloe to take down the people behind Emerson (General Benjamin Juma and Jonas Hodges). But then it's revealed he was evil and working for a cabal of rival Big Bads who wanted Juma and Hodges taken down all along, then eventually we find out he's trying to gain the trust of the cabal's leader so he can kill him in revenge for ordering the death of his wife back in Season 5.
- Dr. Jill Roberts (Jordana Brewster) in several episodes of Chuck. Her apparent loyalty switches back and forth in a dizzying manner.
- The loyalties of Adelle DeWitt in Dollhouse dizzyingly switch between Rossum and Echo at least once or twice per episode throughout the second/final season. Eventually, it's revealed she's working against Rossum.
- Farscape: Scorpius takes this to mindbending levels by the end of the series. Sikozu qualifies as well, especially in Peacekeeper Wars when she sells out to the species she was created to destroy in an attempt to make them free her species.
- In fact, when Scorpius finally explains all the levels of spying he's doing, Noranti exclaims, "Oh, I do admire your compartmentalization of duplicity!"
- In both cases they're actually much more straightforward than they first appear. They have one goal, and any allegiance beyond that is something to be picked up, faked, or discarded at will.
- Dr Kellerman in the Doctor Who serial Revenge of the Cybermen.
- Figuring out how many factions Alex Krycek works for in any given episode of The X-Files is an exercise in futility, especially since he also has an unhealthy tendency to backstab his employers (mostly) for the lulz.
- Grimm has Captain Renard, a half-Wesen estranged son of the Royals. Every single faction he has contacted so far has assumed he's working for some other side. And his actions really aren't helping us decide either. Then in season 5 he gets recruited by the Wesen supremacist group Black Claw unless he's just stringing them along to entrap them, or to get his daughter back, or for some other reason. Keep in mind that this is all on top of being a police officer and Nick's boss, which usually means having to cover up when Nick's actions are more Grimm than cop.
Meisner: You chose the wrong side, Sean.Renard: I never choose sides. You shouldn't either.
- Colby Granger in NUMB3RS has a two-episode arc of this. First he's an FBI agent. Then it turns out he's a spy for the Chinese. And then it turns out that that's a cover story; he's actually working for a different branch of the FBI to take down a real Chinese spy inside the DOJ. Everyone figures it out eventually, but there's a point at which the rest of the team can't even agree with each other about who Colby is and what he's up to.
- The first episode of this arc also features a former British Intelligence agent who is this. It's stated that by the time he was discharged from the service, "nobody knew which side he was playing for". (In fact, it's never entirely made clear who, if anyone, he was aligned with by the time the episode comes around.)
- Star Trek
- Star Trek: Deep Space Nine: So, does Garak support the Detappa Council? The Obsidian Order? The Central Command? The Dissident Movement? The Federation? Enabran Tain? Himself? Have fun trying to figure it out because none of the characters in-universe can! His true loyalty seems to be to Cardassia itself and that means his alliances can shift all over the place depending on who he feels has Cardassia's best interests at heart.
Kira: Don't worry, he's on our side — I think.
- Star Trek: The Next Generation: The two-part episode "Gambit" had both Picard and Riker captured by a group of artifact smugglers, and they pretend to work for them to investigate what they're really up to. Furthermore, Picard and Riker have to pretend to hate each other for this to work (the group's boss dislikes Picard, so Picard disliking Riker would hopefully make the boss take Riker into his confidence). Throw in a half dozen other crew members, each with their own personal loyalties and it starts to get very confusing. This is even lampshaded in the episode by Picard:
Picard: I'm having trouble remembering whose side I'm on!
- Star Trek: Deep Space Nine: So, does Garak support the Detappa Council? The Obsidian Order? The Central Command? The Dissident Movement? The Federation? Enabran Tain? Himself? Have fun trying to figure it out because none of the characters in-universe can! His true loyalty seems to be to Cardassia itself and that means his alliances can shift all over the place depending on who he feels has Cardassia's best interests at heart.
- Cortez on Last Resort. While on the sub, she is secretly a CIA mole that they've planted there to undermine a rogue nuclear sub captain by stealing his launch key. But then, the actual CIA has been partially infiltrated by the Conspiracy, so she's secretly working for a sub-conspiracy that wants to keep the rogue sub in play, just under a different captain.
- Parodied in a MADtv sketch spoofing Alias, along with the show's hyperkinetic style (read the dialogue about two times as fast as you normally would, and you'll get the idea).
Sydney: Dad!Dad: There's no time. I'm a spy for SD6.Sydney: But SD6 is a rogue faction for the CIA.Dad: But I'm a double agent for the CIA.Sydney: How do I know you're not a triple agent pretending to be a double agent who's pretending to be an agent for SD6 when you're really not an agent at all?Dad: ...Now I'm confused.
- Nicholas Brody, a POW brought back after 8 years on Homeland is suspected to be The Mole for Al Qaeda by CIA agent Carrie Matheson. Turns out she's right, however the CIA manages to convince him to work for them in exchange for immunity after his attempted suicide bombing. It becomes unclear where his allegiance lies.
- Aidan Matthews in Revenge. Starts out as Emily's mole inside Grayson Global, planted with the help of their mentor Takeda, and somehow manages to not blow his cover even once Emily's marriage to Daniel is revealed to be a fraud, leading to a point where both Conrad and Victoria believe him to be their double agent in their feud with each other.
- On The Musketeers, Rochefort was originally the Cardinal's spy in Spain, who was kept hostage, tortured, and then sent back to France to spy on them, however he has his own plans to usurp the king and marry Queen Anne.
- Leo Kamali from Strike Back: Shadow Warfare.
- Cassandra in Nikita is a matryoshka doll of loyalties. Introduced as the wife of Belarussian president Valeri Ovechkin, who was then convinced to turn on him, she is then revealed to have been an MI-6 agent who had been sent to Belarus as a honey trap. Later still, it is revealed that she was originally an intelligence agent sent to infiltrate MI-6.
- Parodied to the hilt in the radio play 'The Dog It Was That Died' by Tom Stoppard.
- The Alpha Legion in Warhammer 40,000 count as a Chaos Space Marine army under the rules, but in truth, they might still be loyal to the Imperium. Or they might actually be playing both sides while really working towards the Cabal's vision for the galaxy long after the organisation's death. Or they might just be loyal to their two Primarchs, who might both be loyal to Chaos, both loyal to the Imperium, or one brother might be scheming against the other and pulling part of the legion away. The most likely thing is that the decentralised organisation of the Legion backfired against them after the death of Horus during his rebellion against the Imperium and the (maybe happened, maybe not) death of Alpharius, or at least whatever legionary who was thinking they were Alpharius at the time and with Omegon (who himself believed Alpharius was dead and took his identity) probably faking his death immediately after the Horus Heresy in the Great Scouring, and now they're just a bunch of fractured warbands without an ideology or long-term strategy in common. There is no way to know the true loyalties of any given Alpha Legionnaire. Thanks to chemical and psychic brainwashing, the Legionnaire himself, or any of their serfs, may not be aware of it either.
- The Green Lady from Exalted is working for four different Deathlords—one of whom is convinced she's secretly a man—as well as the Bureau of Destiny, and playing every last one of them off of the others. In fact, she's pulling such a convoluted, multilayered Memory Gambit that even she doesn't know whose side she's really on. Her true loyalties lie with Heaven, but she may well end up helping to destroy the world before her gambit resolves itself.
- Fully and hilariously possible in Paranoia: secret societies often have agents infiltrate other secret societies, who in turn might use the very same person to spy on yet another secret society, ad nauseum. The rulebook even acknowledges the (very remote) possibility of spying on all of Alpha Complex at once. "Try to keep your cover stories straight."
- The end result of this is a secret society called The Wobblies. The Computer heard about it and sent a team of Troubleshooters to gather information. Problem was, it didn't exist (the Real Life Wobblies had died out long before Alpha Complex was created), so when the Troubleshooters returned with no information they were swiftly executed for insubordination. This cycle repeated until one group got smart and actually founded the society just so they had something to spy on. This attracted the attention of other groups, who sent in their own spies, resulting in a group made up entirely of spies from other groups.
- The Werewolves of Miller's Hollow will sometime flirt with this. The mayor of the village can secretly be a werewolf, but more precisely a white werewolf, as well as the lover of the pied piper. It works better if there are many players.
- Munchkin Impossible has the triple agent card. It allows you to claim allegiance to three nations (out of the four available) at the same time. There's also the sidekick Dusty McRonin, the man of too many allegiances.
- Loyalties in Demon: The Fallen can get convoluted, as shown with Fell Knight Guanli in the City of Angels supplement. He's an LAPD officer... except he's secretly a demon and the Minister of Lions in the Infernal Court of Los Angeles... except he's actually The Mole for the Cryptic faction placed there to spy on the Court... except he's in the process of betraying them too by killing other demons alongside his lover Ravana to consume their power... And then there's the fact that Ravana's loyalties are in turn somewhat convoluted...
- BIONICLE has a rather simple one, as these things go: Roodaka worked for both the Brotherhood of Makuta and the Dark Hunters, but she played them off of each other and her true allegiance is to herself. Eventually, both sides found out and started targeting her; at which point a third faction, the Order of Mata Nui, caught her and made her a Boxed Crook.
- Metal Gear
- Revolver Ocelot has, at various points in the series, apparently been working for the CIA, NSA, KGB, GRU, FOXHOUND, rogue FOXHOUND, the Gurlukovich Mercenaries, Solidus Snake and the Patriots... while not really working for any of them. In Metal Gear Solid 4: Guns of the Patriots, we learn that his true allegiences lay with Big Boss, and the entire Solid games was a plot by him to recover Big Boss's remains and fulfill his dream of Outer Heaven. He goes so far as to brainwash himself into acting like Snake's deceased brother Liquid, whilst maintaining the pretence that he was being possessed by Liquid's spirit through his arm (grafted onto Ocelot after he lost his during the events of MGS 1). The extent to which this was a true personality swap and not an act is left very ambiguous.
- EVA from Metal Gear Solid 3: Snake Eater. When Snake meets her, he assumes that she is an NSA agent who defected to the Soviets and now works for the KGB infiltrating Volgin's private army. But she's actually a Chinese spy posing as a KGB agent and let herself get captured by Volgin. She walked into Snake by accident without knowing about his mission (since she didn't know the password), but when he asked her if she was "ADAM", she did some quick thinking and said she was ADAM's partner "EVA". Snake bought it and "EVA" ran with it during the entire mission. For added bonus points, both EVA and Snake were unaware of the fact that ADAM was Ocelot.
- Zelos of Tales of Symphonia works for Lloyd by working for Kratos while working for Yggdrasil by pretending to pretend to be helping Lloyd in one ending. He also passes information to the Renegades throughout, that group also being headed up by a more traditional Double Agent who's pretending to still be working for Yggdrasill himself. Of course, Zelos' true allegiance for most of the game is to himself, explicitly so when he's found out. Afterward, he either pulls a genuine and permanent HeelFace Turn or else forces the party to fight and kill him, depending on which path you're on.
- The above character's Spiritual Successor, Alvin from Tales of Xillia, is even worse. First, he seems to be on your side. Then, it's revealed he's done work for Exodus, the group trying to assassinate Milla. He's also spying for Gaius and the Chimeriad, manipulating Ivar, and at one point he leaks information to Muzet as well. This is less of a diabolical plot on his part and more of a natural impulse; he was raised as a child spy.
- Xenoblade Chronicles has Alvis. Through the course of the story, it's impossible to tell which side he's on. At one point he's a mysterious helper, then he's acting shady with a group of shady characters, then he's back again on Shulk's side. It continues to grow from there, and it's not until the very end that his true motivations become clear.
- Spiritual ancestor Xenogears featured Citan, who first appears to be helping the party, later betrays the party, then reveals that he was ordered to actually help the party by pretending to betray them to keep his cover as a secret agent. He may have also been acting without authorization at least some of the time as well, it's hard to say.
- Fire Emblem: Path of Radiance and Fire Emblem: Radiant Dawn have Naesala, Raven King of Kilvas. He works for Daein as a mercenary leader (the rest of the mercenaries are Kilvans), and he seemingly betrayed Reyson for Oliver, but later he betrays Daein to protect Reyson and Leanne from Ashnard. Chronic Backstabbing Disorder, anyone? Turns out his ultimate loyalty was to his own kingdom, but this was complicated by a blood pact he'd signed with a certain Begnion senator. Generally, he took whichever side would benefit Kilvas the most, or harm it the least. The last time he switched sides, he did so in order to secure the blood pact and do away with it once and for all.
- Carmen Sandiego: Carmen is described in some of the game manuals as a Triple agent. It's not too hard to think she probably reaches Double Reverse Quadruple Agent status pretty easily, given her legendary stealing prowess.
- Made explicit in the Sega Master System version, where she is described as "an agent, double agent, triple agent and quadruple agent for so many countries even she has forgotten who she's working for."
- Kingdom Hearts has Axel in Chain of Memories, working for Marluxia. He betrays Marluxia for Zexion and Lexaeus and then ditches them to fend for himself - although 358/2 Days reveals that he was under Saix's orders the whole time. In Kingdom Hearts II, he abandons the Organization after being ordered to eliminate Roxas, kidnapping Kairi, and ultimately sacrificing himself to protect Sora. He plays for all teams.
- In Knights of the Old Republic, you can repeatably betray the two instructors of the Sith Academy on Korriban, pitching them against each other while pretending to work for each of them as a double agent. This can end with them both saying to kill the other, then they feel the effects of the poison you gave to both of them, leading them to realize you are working for yourself. As is proper for a Sith, so really they're very good teachers.
- In Baldur's Gate II, while in Underdark, you can triple-cross two Drow priestesses, an elder Baatezu, and a silver dragon, who each thinks you work for them, while in reality, you pursue your own agenda...
- In Star Wars: The Old Republic Imperial characters have several opportunities to do this and decide on the fly whose side you're actually on if anyone's. One of the most notable cases is act 2 in Imperial Agent's story, where you're an undercover agent for both the Imperial and Republic intelligences though not entirely by choice for the Republic, since they've found the keyword to set off your brainwashing (originally put in place by Imperials at the command of the Sith) which allows them to give orders you cannot disobey. And then one of the other members of the Republic team turns out to have been on to you but let it go because he was actually working for a third faction all along. Then in the third act, things get complicated.
- The Lost Archive DLC in Assassin's Creed: Revelations reveals Lucy to be one.
- Harley Filben in Deus Ex. He starts off as a UNATCO informant giving JC Denton information about the NSF. As it turns out, he's working for the NSF. And near the end of the game, he reveals that he's actually part of the Illuminati, posing as an NSF agent. The funny thing is, every time he reveals a new identity, that's the side you happen to be working with at that part in time. He was on your side the whole time.
- Dietrich Troy/Nicklaus in Spy Fiction. He's working for both Phantom and Enigma. He's committed several acts of terrorism, but also wants revenge on Scarface. In hindsight, it also appears that he specifically arranged the destruction of the primary Lahder production facilities, the rescue of Doctor Coleman, and the defeat of Scarface, so he's at least against Enigma if not necessarily aligned with Phantom.
- Battlefield 3 features the Big Bad, who, it is revealed late in the game, is actually an American agent provocateur, which is why no one believes the main character's assertions that he's a bad guy. While it is entirely possible to look at the evidence and draw the same conclusion as the interrogators, the protagonist ultimately decides they're wrong and goes after him. And he's right. The Big Bad used his American contacts to cover up his terrorist dealings, and is only just barely stopped from nuking New York City by the protagonist.
- An almost untraceable example comes from Planescape: Torment in the form of a semi-retired officer of the Harmonium named Ebb Creakknees. Early in the game, he is presented as a 'tout', or guide, who sits in the Smoldering Corpse bar and is one of the most valuable and helpful sources of information on Sigil and its environs. Much later, however, he can be found leading a group of Anarchists in Curst and reveals he is a double agent spying on the Harmonium...except if certain conditions are met, in which he reveals himself to be a triple agent, a member of the Harmonium pretending to be an Anarchist pretending to be a member of the Harmonium.
- Delita, The Chessmaster from Final Fantasy Tactics is allegedly a Double Agent working for the church in the Southern Sky forces, but he's also strategically feeding info to Ramza while sending bad intel to the Church. In his case, he's ultimately a Wild Card out for his own ambition. Acting as a Double Reverse Quadruple Agent allows him to stay out of the way while Ramza kills off the other players in the Gambit Pileup.
- The Sims:
- One career level in The Sims 3 Law Enforcement career is "Triple Agent".
- In The Sims 4, despite getting an achievement for maxing out the Secret Agent career at rank 10, you get the job "Triple Agent" at rank 11 if you're on the Villain branch. The true allegiance of a sim with this job is simply not known, according to the description.
- The Resident Evil franchise has the mysterious Ada Wong, a mercenary and corporate spy of unknown alliances. She's involved herself in numerous incidents throughout the franchise, frequently manipulating and double-crossing people as easily as most people breathe. She seems to be a freelance agent that takes on individual assignments from different parties, though it's impossible to know for certain. While working for one of Umbrella's competitors, she formed alliances with the likes of Albert Wesker and would later turn on him as well, for another unnamed third group. The only consistent loyalty she displays throughout the franchise is her complicated relationship with Leon, taking advantage of him but also willing to risk her assignments and life to protect him.
- Team Fortress 2: While the Spy is described as such in his official biography, in the supplementary comics each color Spy is exclusively loyal to their team and there's no sign that there's any cross-team shenanigans going on; in game, Spies can "only" go into triple agent territory—is that allied Spy you see wearing a disguise of the enemy Spy one of your double agents or an actual enemy Spy pretending to be such? Better Spy-check him anyway just to be sure!
- Professor Tiktoffen in Girl Genius. Everyone seems to think they are the ones he is really working for. It's been revealed that he was pretty much everyone's "man inside" the city-state of Mechanicsburg, and his true loyalty was solely to himself — his goal was to take over Mechanicsburg, and by making all the other factions think he was on their side in the struggle for the empire, they wouldn't oppose him when he made his bid for power over a single city.
- Schlock Mercenary:
- Tagon's Toughs occasionally find they have the opportunity to play this role, or at least what looks like the opportunity to do so. Look for the phrase "get paid twice"; it means both sides in a conflict are trying to hire the Toughs, and Tagon is optimistically trying to find a way to satisfy both contracts without letting either one catch on to his game.
- On at least one occasion they successfully managed to get paid five times.
- They get paid four times in "The Body Politic", starting here. They get paid twice for stealing Xinchub's corpse, once for preventing the same theft, and once more for cloning a copy. Though it's worth noting that the two sides paying for the corpse's theft are actually working together, because "[Tagon] will do anything if he thinks he can be paid twice".
- The Order of the Stick explains the trope with a simple quote:
Nale: Glamored Armor? Isn't that kind of a weak ability, Dad?
Tarquin: Actually, when you change flags as often as I do, it's a real cost-saver.
- The Avengers: Earth's Mightiest Heroes!: Black Widow. ...Maybe. Maybe not. Or... Who knows? Season Two shows Nick Fury trusts her directly as a Lancer when dealing with the Skrull invasion. Then again he also had Mockingbird as a confidant, and she's the Big Bad Skrull Queen in disguise.
- In Totally Spies!, an agent working for WOOHP turns out to be The Dragon for Jerry's Evil Twin Terrance then is later revealed to be a triple agent pretending to be a double agent. Then it turns out he really is working for Terrance after all.
Clover: Wait, so you're a double Double Agent?
Alex: Wouldn't that make him a quadruple agent?
- Ali Touchent, identified as "Tarek" by the pseudonymous "Omar Nasiri" in his book "Inside the Jihad: My Life with Al-Qaeda - A Spy's Story", was supposedly a fervent and devoted member of the fundamentalist Armed Islamic Group (GIA) fighting against the Algerian military government. However, later evidence surfaced that he may've been an agent provocateur working with and/or for the Algerian government to help portray the GIA in the light of ruthless killers by goading them into committing various atrocities. However, the fact that he was behind the Paris metro attacks of 1995, among other terrorist acts, makes his allegiances all the more murky and questionable.
- During the Second World War, Britain had great success (in fact, 100% success) at detecting German spies and either imprisoning/executing them, or turning them into double agents. In fact, the reason for imprisoning some of the captured German spies instead of turning them is that Germany would've gotten suspicious if all of their spies seemingly succeeded in evading capture.
- There's a story that the Germans, suspecting many of their spies had been turned, tried a counter: they instructed one of their spies to (on arrival) go to British intelligence and admit to being a German spy and to offer to be a double agent. This way, they'd find out what the British told double agents to say, while the spy would pass their real observations on by alternate means. This would have been a triple agent (i.e. pretending to be a double agent.) However, on arrival the spy went to British intelligence as planned but also told them about the triple agent plan, so the British could control both streams of information - hence he was a quadruple agent.
- Several spies gave intelligence that led Hitler to conclude that Normandy being the target was a deception and that Calais, located at the shortest distance across the Channel and also closer to targets in Germany itself, was the real target (one of the agents truthfully reported that Normandy was the target, but because his particular information stream to this point had been verified lies the Germans took it as further evidence of a Calais landing). The resulting intelligence caused Hitler to keep his armored reserves concentrated at Calais until it was too late for the potential reserves to do anything meaningful. These agents were notified by radio that they had been awarded the Iron Cross for their services to Germany.