BERLIN/FRANKFURT (Reuters) - German robotics maker Kuka <KU2G.DE> is on the brink of agreeing to an investor agreement with Chinese bidder Midea <000333.SZ> that includes a long-term commitment to existing headquarters, factories and jobs, a source close to the negotiations said.

Kuka needs to decide in the coming week whether it wants to recommend the acceptance of Midea's 4.5 billion euro ($4.99 billion) bid, the biggest German industrial technology company to be targeted by a Chinese buyer in a wave of recent deals.

The source told Reuters that there had been a breakthrough in negotiations between Kuka and Midea, with the results presented to a meeting of the supervisory board on Saturday.

"Now the details just need to be finalised so that the agreement can be signed in the coming days," the source said.

The agreement to maintain the current headquarters and maintain factories and employees should run until 2023, the source added.

Kuka was not immediately available to comment

The Frankfurter Allgemeine Sonntagszeitung reported that Midea had offered Kika guarantees including the independence of the company's management and its listing in Frankfurt.

News of Midea's bid for Kuka last month caused a furor among German politicians, though Midea has since said it would allow Kuka to operate independently and help it expand in China.

On a visit to Beijing this month, Chancellor Angela Merkel signaled that she would not try to prevent a takeover but also left the door open to German firms making a counter-offer.

However, no potential German or European rival bidder has emerged at this stage.

(Reporting by Alexander Hübner and Joern Poltz, writing by Emma Thomasson,; Editing by Stephen Powell)