An amazing write up about how ADK implements similar capabilities
https://github.com/google/adk-go/issues/298