Elon Musk Opens The Black Box: X Releases Its Algorithm To The Public

The GitHub repository needs expert review, although Musk earlier said the now-released code covers how the post recommendation works in X.
In this photo Illustration a X logo is seen on a smartphone screen and effigies of Elon Musk with the Twitter logos as background. (Photo Illustration by Nikolas Kokovlis/NurPhoto via Getty Images)
In this photo Illustration a X logo is seen on a smartphone screen and effigies of Elon Musk with the Twitter logos as background. (Photo Illustration by Nikolas Kokovlis/NurPhoto via Getty Images)
Profile Image
Yuvraj Malik·Stocktwits
Published Jan 20, 2026   |   1:47 AM EST
Share
·
Add us onAdd us on Google
  • ‘We open-sourced our new X algorithm,’ according to the X post from the social media site’s engineering department.
  • Musk has been an advocate for open-source technology, having previously released parts of the code for Grok’s older AI models.
  • The move comes as X faces criticism for Grok-generated explicit images populating the site. 

Elon Musk’s X has made parts of the social media site’s source code public, according to an official post on the site, following through on an earlier promise and repeating something he did months after acquiring what was then called Twitter in October 2022.

“We have open-sourced our new X algorithm, powered by the same transformer architecture as xAI's Grok model,” an X post from @XEng read. The code is available in the GitHub repository here.
 

Source: X

  

Musk’s Open Source Push

Immediate details about the “new X algorithm” or what the codebase covers were thin. Teasing the release more than a week back, Musk had said the X algorithm will include “all code used to determine what organic and advertising posts are recommended to users,” adding that the libraries will be updated over time with developer notes.

Musk has been an advocate for open-source technology, having earlier released parts of the source code for Grok AI models 1, 2, and 2.5. He has promised to open-source Grok 3. In these cases, the models were released under a license that allows free use and modification but restricts the use of their outputs for training other, competing AI models. 

In March 2023, X (then known as Twitter) published parts of its code, including the algorithm that recommends tweets in users’ timelines, along with a blog detailing how it works. 

However, both X and Grok’s code pages have not been updated in about two years, according to The Verge.

What Else Is Happening At xAI/X?

Musk’s move comes as X faces criticism from users and certain governments about how Grok-generated explicit images of living persons, including minors, have populated the social media site. In response, xAI last week rolled out changes such that Grok would no longer be able to edit photos of real people.

Earlier this month, xAI, which houses X and Musk’s AI business, raised $20 billion from investors, mainly to scale up the company’s data center capacity. Meanwhile, the daily active user count of Meta’s Threads (141.5 million) surpassed that of X (125 million) as of this month, according to Similarweb data. 

For updates and corrections, email newsroom[at]stocktwits[dot]com.

Read Next: Smith & Wesson, Sturm, Other Gun Stocks In Focus As US Reportedly Moves To Ease Firearm Restrictions

Share
·
Add us onAdd us on Google
Read about our editorial guidelines and ethics policy