San Francisco (AFP)

X, formerly known as Twitter, will host self-styled "town hall" meetings with Republican presidential candidate Donald Trump and independent candidate Robert F. Kennedy ahead of the country's November elections.

The move comes as the owner of the social media site, Elon Musk, appears to be cozying up to Trump, who is reportedly considering the Tesla boss for a role in the White House in the event of a victory, the Wall Street Journal reported earlier this week.

Musk said in a tweet on Friday that the events "will be interesting," confirming a report on the matter first made by Axios.

No dates or further details were given for the forums with the ex-president and Kennedy, which will be held in conjunction with cable network NewsNation.

Joe Biden was also extended an invitation, but a source close to his campaign told AFP the president will not participate and remains focused on the already planned pair of debates against Trump.

The South African-born tech guru has said he will not give his financial support to either Trump or Biden in this year's election.