James Stirling was an agent of the English government sent to France to learn the French government's post-Revolutionary plans for England. Posing as government official Lemaitre, he had access to First Deputy Maximilien Robespierre.
When Ian Chesterton, Barbara Wright and Susan Foreman were imprisoned in the Conciergerie in July 1794, unknown to them he arranged matters so that Ian could escape. He allowed the First Doctor, disguised as a regional officer, access to the prison and took him to see Robespierre.
The Doctor brought Lemaitre to see Jules Renan, Ian and Barbara, where Lemaitre revealed himself as Stirling. Ian passed on to him Webster's dying message. After Robespierre was shot and arrested, Stirling planned to return home to England. (TV: The Reign of Terror)
Behind the scenes
The info text on the DVD release of The Reign of Terror alleges that this spy's name is a play on James Bond. Goldfinger was in full production at the time that Reign was, and so writer Dennis Spooner called his character Stirling, half of the phrase "sterling bond", a common financial term for a bond issued in pounds.