In the Age of Ultron mid-credit scene,
Thanos puts on some sort of a glove and says "Fine, I'll do it myself." Which seems to imply his plan to get it done by others has failed.
Did he mastermind the events in the movie in any manner?
This has indeed been asked at the SciFi SE, and there are some good answers there, but for my own part I can say: we don't know. We can assume (from Marvel Comic Book lore) that Thanos is
attempting to gather all the Infinity Stones for himself
and has been frustrated by the events of the films in the Marvel Cinematic Universe so far. It's a reasonable assumption to think that he's talking about the events of Age of Ultron in that mid-credits scene, but an alternative reading is that he's thinking about the films in general, and the events of Guardians of the Galaxy in particular, where
his plans to use others to retrieve one of the Stones failed.
I think the real answer to your question won't be revealed until later, possibly not until Avengers: Infinity War in 2018.
Apart from inadvertently delivering the mind stone to the Avengers, no.
In the mid-credits scene to Age of Ultron, Thanos says "Fine. I'll do it myself." Thanos' goal is to obtain all the stones, which he tasked Loki and Ronan with. Both failed, and Loki lost him the mind stone (which was in the scepter) in the process.
Thanos did not intend for Loki to fail and leave the mind stone in the Avengers' hands, ergo, he did not mastermind the events of Age of Ultron.
Obviously, it is impossible to answer this question with absolute surety, so I will simply supply the most likely and logical answer.
In the original comics, as far as I am aware, Thanos was the wielder of the golden glove known as the "Infinity Gauntlet" (As seen in the end credits). This weapon was of paltry power excepting when it harnessed the nearly unlimited energy of the Infinity stones.
Several infinity stones have already been shown in the Marvel Cinematic Universe, including but possibly not limited to the Aether (Thor 2), the Tesseract (The Avengers), the power stone (Guardians of the Galaxy), and of course the mind stone that was previously contained within Loki's scepter. Recall that this particular stone held the consciousness that was "copied and pasted" into Ultron. In this way it seems reasonable that Thanos was the mastermind of the events transpiring in the second "Avengers" movie. In fact, it seems suspicious how easily the Avengers were able to capture and harness the powers of the mind stone. Perhaps H.Y.D.R.A. is really an extension of Thanos's will?
I cannot guarantee the veritability of this reasoning, and on second thought I realize it is not precisely of the type of answer Stack Exchange prefers, however I will post it in the hopes that it may clear up any questions you have.