Elon Musk open-sources X's "For You" feed algorithm powered by Grok AI. A complete technical breakdown of how 600 million users' feeds are curated.
On January 10, 2026, Elon Musk announced that X (formerly Twitter) would open-source its entire recommendation algorithm. A week later, the complete codebase was published on GitHub under the Apache 2.0 license. This includes all code used to determine what organic posts and advertisements appear in your "For You" feed.
"We will make the new X algorithm, including all code used to determine what organic and advertising posts are recommended to users, open source in 7 days. This will be repeated every 4 weeks, with comprehensive developer notes."
— Elon Musk, January 10, 2026
January 10, 2026
Elon Musk announces algorithm will go open source in 7 days
January 17, 2026
Full algorithm code released on GitHub (xai-org/x-algorithm)
Every 4 Weeks
Promised updates with comprehensive developer notes
Fetches user engagement history and metadata to understand preferences
Retrieves posts from Thunder (in-network) and Phoenix Retrieval (out-of-network)
Adds core post data, author information, and media details
Removes duplicates, aged content, blocked authors, and muted keywords
Phoenix transformer predicts engagement probabilities with weighted scoring
Sorts by score and selects top K candidates for your feed
Final visibility checks and deduplication before display
The system relies entirely on Grok-based transformer to learn relevance from user engagement sequences
During ranking, posts cannot attend to each other, ensuring consistent, cacheable scores
Predicts probabilities for likes, replies, reposts, clicks, blocks, mutes, reports, and more
Thunder enables sub-millisecond in-network lookups via in-memory storage
Composable pipeline framework allowing easy addition of new components
Powered by xAI's Colossus data center in Memphis for massive scale inference
X (formerly Twitter) is the primary social platform for crypto news, alpha, and community engagement. Understanding how the algorithm works helps you:
Open-sourcing algorithms aligns with crypto's core values of transparency and decentralization. This move sets a precedent for:
Follow crypto news on X and trade with the best rates using our exclusive discount codes:
The complete source code is available on GitHub at github.com/xai-org/x-algorithm under the Apache 2.0 license.
Phoenix is the Grok-based transformer model that predicts engagement probabilities for each post. It uses a two-tower retrieval model with user and candidate embeddings.
Thunder is an in-memory post store that enables sub-millisecond lookups for in-network content. It consumes Kafka events and maintains per-user post collections.
Elon Musk promised updates every 4 weeks with comprehensive developer notes explaining what changed.
No. The system relies entirely on the Grok-based transformer to learn relevance from user engagement sequences with zero hand-engineered features.