In the first half of the seventh century, there were three powers in this part of the world. These were the Tang dynasty in China under emperor Taizong, the North Indian empire under Harshvardhan and the Tibetan empire under Songsten Gampo.
The new religion Islam emerged in the first half of the seventh century in western Asia. The Arab armies inspired by Islam were making inroad into Central Asia. To counter the influence of Arab armies in Central Asia, the Tibetan emperor was advancing towards Central Asia. This enhanced the power of the Tibetan ruler. So, the Chinese emperor was wary of the rising power of the Tibetan ruler.
During the same period, Harshwardhan of India sent a diplomatic mission to the Tang court in 641 AD. Tang promptly reciprocated. The name of the first Chinese ambassador to India was Liang Huaijing. The mission intended to determine if Harsha was interested in a military alliance against Tibet.
Interestingly, Liang was also a member of the party that had dropped off the Chinese Princess in Lhasa – as part of a marital alliance with emperor Songsten – on his way to India.
In any case, Harsh followed up with two more missions in the following years and Taizong had sent one more. During the exchanges, China wanted the technology to manufacture sugar.
By 646 AD, India-China relations were on a high. Then Harsh passed away. Taizong became preoccupied with the Korean Peninsula while his marital alliance with the Tibetans began to bear fruit.