The way I have come to understand the differences between Design Thinking, Agile and Lean UX is that Design Thinking and Lean UX are frameworks to solve problems where as Agile is a project management methodology.
Design Thinking and Lean UX are very similar at their core. But Design Thinking has gained so much traction in the non UX world that the term has become popularized, even though the UX industry has been practicing this long be fore the term Design Thinking.
Design Thinking at it's core is:
Lean UX at it's core is:
- Feedback and Research
- Delcare Assumptions
- Create an MVP
- Run an Experiment
Both of these problem solving methodologies roughly follow the double diamond approach.
Agile on the other hand is a project management methodology that was created in response to the Waterfall methodology.
Traditionally in Waterfall products would have the full specs created before engineers could get started building. This becomes a problem when you're building a system for a rocket going to space that takes years to build. Technology can change, new materials can be invented or requirements have shifted from. When things like this happened it'd be detrimental to the project or they would begin developing the specs for the fix.
In Agile specs are written for smaller chunks of the product and put into a prioritized backlog where smaller self sustaining teams can focus on completing a few chunks in a given period of time.
Going back to your original question "How does Design Thinking, Agile and Lean UX work together?"
They don't... At least not when rigidly implemented.
Traditionally an Agile team would have all the disciplines needed to complete a chunk of work and work in a fixed period of time (Sprints). When Agile was created the Design discipline was not considered since it was an engineering focused methodology.
The reason why they don't work well together is because as designers we need time for research before we can begin designing something. Given the fixed amount of time in a sprint proper research is often sacrificed in order to finish the designs. Which leads to problems down the road.
That being said, I have heard the terms "Agile-fall" or "Faux Agile aka Fragile" to describe Agile hacks in order for designers to be able to use frameworks like Design Thinking or Lean UX without being a blocker for engineering.
In general "Agile Fall" works something like this: The Design and Engineering teams share the same product backlog, but the Design team is at least 1 sprint ahead of the Engineering team. This gives the Design team the space to use the Design Thinking or Lean UX methodologies to inform their designs before handing off to the engineering team to begin. In effect it is a bunch of small waterfalls. It is all still new since Design as a whole is beginning to be valued on the same level as engineering.
Hope that helps!