Even though Hollywood has always been fond of spy thrillers, it didn't really notice the CIA until the 60s, when agent Felix Leiter, played by Jack Lord, appeared in "Dr. No." But the CIA has been working with Hollywood since the 1950s.

Tricia Jenkins, the author of "The CIA in Hollywood," says the CIA first started working with Hollywood to influence foreign audiences. "Their purpose was essentially to shape foreign policy or to win hearts and minds overseas during the cold war," she says.



The CIA developed a think tank to fight communist ideology, which negotiated the rights to George Orwell's "Animal Farm" – getting a talking pig on the screen 20 years before "Charlotte's Web." Jenkins says the CIA also wanted to promote a certain view of American life, for instance pressing for line changes in 1950s scripts to make black characters more dignified, and white characters more tolerant. This "politically correct" image was intended to promote an attractive image of America to a world picking sides in the Cold War.



But while the CIA used Hollywood to project an American ideal, they didn't seem much concerned with their own image.



"In the old days, the CIA, and its predecessor the OSS, they didn't really spend much time worrying about what the public thought about them," says to Ted Gup, author of "The Book of Honor: Covert Lives and Classified Deaths at the CIA." He says that with the end of the Cold War, the CIA realized it needed an image overhaul. "It's come to recognize that without public support, its budget is in jeopardy. And its very activities are in jeopardy."



In 1996, the CIA hired a Hollywood liaison: Chase Brandon – who happens to be the cousin of Tommy Lee Jones, and consequently had lots of Hollywood connections.



Tricia Jenkins says there's been a noticeable change in the portrayal of the CIA after that period. Before the 1990s, in films like "Three Days of the Condor," the CIA was portrayed as evil, amoral assassins, or sometimes buffoons, like Max on the TV show "Get Smart."



"Now it's a much more favorable presentation," says Jenkins. "Frequently being depicted as a moral organization that is highly efficient. It rarely makes mistakes, it's needed more than ever."



Since the mid-90s, the CIA has worked on a long list of productions, including "The Sum of All Fears," and some big TV names – "Alias," "24," and "Homeland."



There are some uglier portrayals, sometimes produced with unapproved help from former agents– like in the movie "Syriana," which features George Clooney as Bob Barnes, a CIA officer tasked with assassinating a Middle Eastern leader. The Character Bob Barnes was based on real ex-CIA agent, Bob Baer.



The real Bob Baer— working on a new book, "The Perfect Kill: 21 Laws of Assassination" – recalls that "they called me up and said, 'We want to go on a trip with you to the Middle East.' I went with the director, Stephen Gaghan, I took him to Lebanon, I took him to a meeting with some shady people I knew in London, in Nice, Soforth, and he was absolutely fascinated by seeing the real Middle East."



"Syriana" isn't exactly an advertisement for the CIA. But these days, that's the exception– Jenkins says for the most part, the CIA gets their preferred image across–and unless you read the fine credits at the end of a film, you'd have no idea you just watched a movie produced with CIA help.



"It's important to note that the CIA doesn't help everyone. It's only going to help those who portray CIA in a positive light and helps them boost recruitment interest," Jenkins says.



During her stint on Alias, Jennifer Garner actually made a recruitment ad for the CIA. And if you find Ben Affleck or Jessica Chastain attractive, it's hard to think of better recruitment ads than "Argo" and "Zero Dark Thirty."