R2D2 as the James Bond of droids. This somehow makes a lot of sense.
If we accept all the Star Wars films as the same canon, then a lot that happens in the original films has to be reinterpreted in the light of the prequels. As we now know, the rebel Alliance was founded by Yoda, Obi-Wan Kenobi and Bail Organa. What can readily be deduced is that their first recruit, who soon became their top field agent, was R2-D2.
Consider: at the end of RotS, Bail Organan orders 3PO’s memory wiped but not R2’s. He wouldn’t make the distinction casually. Both droids know that Yoda and Obi-Wan are alive and are plotting sedition with the Senator from Alderaan. They know that Amidala survived long enough to have twins and could easily deduce where they went. However, R2 must make an impassioned speech to the effect that he is far more use to them with his mind intact: he has observed Palpatine and Anakin at close quarters for many years, knows much that is useful and is one of the galaxy’s top experts at hacking into other people’s systems. Also he can lie through his teeth with a straight face. Organa, in immediate need of espionage resources, agrees.
On first seeing R2, Obi-Wan has a twinkle in his eye and calls him “my little friend”. Well, he is. However, when Luke wakes up and says that R2 claimed to be owned by an Obi-Wan Kenobi, he blandly says “I don’t seem to remember ever owning a droid.” Ben has in fact owned several but the remark is aimed at R2 and translates as “You keep quiet. I’m not about to tell him everything just yet.” Obi-Wan thinks fast and tells Luke a version of his past that does not involve a father who became a dark lord of the Sith. He wants to examine Luke a lot more closely before he risks telling him the real truth.
And R2 isn’t the only spy:
20 years earlier, Chewbacca was second in command of the defence of his planet. He’s there in the tactical conferences and there on the front lines and is a personal friend of Yoda’s. When he needed reliable people to join the embryonic Alliance, who else would Yoda turn to but his old friend from Kashykk? Given his background, there is no way that Chewie would spend the crucial years of the rebellion as the second-in-command to (sorry Han) a low-level smuggler. Unless it’s his cover. In fact, Chewie is a top-line spy and flies what is in many ways the Rebellion’s best ship.