It’s possible, but aside from the existence of the post-credits scene, nothing in Age of Ultron (or any other movie) suggests it.
Before Avengers 1,
Thanos gave the staff to Loki, in the hope that Loki would recover the Tesseract from earth and deliver it to him.
And in Guardians of the Galaxy
Thanos was attempting to use Ronan to recover the Power Stone, although Ronan decided to (try to) keep it himself.
I think in the post-credits scene, Thanos was just referring to these two schemes and their failure, rather than anything that happened in Avengers 2.
Because if he did influence events in the movie: how? The best theory I’ve seen is that Thanos put some sort of artificial intelligence into the Mind Stone before the giving the Sceptre to Loki, presumably in the hope that if Loki failed, someone else would use that intelligence to create a robot that would destroy the earth.
That seems like a pretty speculative and remote backup plan for getting the Tesseract, especially as the Avengers 1 post-credits scene
suggests that Thanos didn’t know much about earth before setting the Chitauri loose.
Note also that
Ultron makes no attempt to locate the Tesseract in Avengers 2, and never even mentions it.
(And, as it happens, Thanos wouldn’t have gotten anything even if Ultron succeeded, thanks to Thor taking the Tesseract back to Asgard at the end of Avengers 1.)
The simpler explanation is Thanos gave the Mind Stone to Loki so that Loki could actually manage to carry out his plan: controlling the minds of Selvig and Hawkeye sure was helpful. A slightly-more-complicated, slightly-more-fun, barely-even-belivable explanation is that Loki convinced Thanos to give him the Mind Stone using this reasoning, in hope of keeping it and the Tesseract for himself.
The scene is probably only included at the end of Avengers 2 because the next Avengers movie is called Infinity War, and will thus presumably feature
Thanos attempting to personally recover all the Infinity McGuffins.
It’s marketing, not plot explanation, like Thor’s hammer in the post-credits scene of Iron Man 2.
Having pondered this fitfully every night for the last three years, before finally falling into a restless and troubled sleep each time, Avengers: Infinity War has finally come out.
During the movie, Thanos doesn’t mention anything about his actions in Avengers 1. He certainly uses the Space, Power, Reality and Time stones directly in the movie to further his pursuit of the full set, so he could have been using the Mind stone indirectly, as an AI-bootstrap-honeypot-kinda-thing, when embedding it in Loki’s staff (as well as letting Loki use it directly to mind-control people). But there’s no reference to such a plan, or even any reference to Thanos having previously been in possession of the Mind Stone.