On August 13, 2026, xAI released the X algorithm as open source, documenting in detail how the whole system decides what you see. This page is a summary of that drop and a quick reference for anything to do with how X ranks, filters and labels a post.
Three drops so far. The first two showed the plumbing. This one shipped the parts that matter: the production weights, the real model, and the moderation stack.
Pipeline code, demo model derived from Grok-1. No weights.
Incremental sync of the same scope.
+363k lines: weights, Phoenix training and serving code, the whole labeling stack.
Stated reason: reduce gameability.
Click through the six stages. Ranking decides the order; whether a post can appear at all is a separate system (visibility filtering), fed by labels computed off the request path.
in-network · up to 1,200
out-of-network · up to 1,000
out-of-network · up to 800
The real formula with the real production weights: score = Σ weight × P(action), then the offset, same-author decay and the OON discount, exactly as the code applies them. Drag the probabilities and watch what the feed would do.
Square-root scale so the small ones stay visible. Toggle the mutual-follow condition to see the reply weight jump.
k = how many of your posts rank above this one in the same pool. Pick your post:
Floor is 25%. Your posts compete inside one load; they never stack. Thread dedup then keeps only your best-scoring branch.
Reply weight on original posts from mutual follows. Not replies, not reposts. xAI published this change with full diffs as the template for how future updates will appear.
Random users get +5, +10, +15 or +20. Most stay at 0.
Rolled out broadly after strong early results.
World Cup feedback: discussion from non-followed accounts was getting crowded out.
How long a post stays a retrieval candidate for people who don't follow you. Originals only: replies, reposts and community posts never enter these indexes. Re-indexing fires when favs cross 1, 2, 4, 8, 16...
Off the request path, continuously: post published → category screen (10 safety categories) → policy classifiers → labels. The labels come back at serve time as the visibility rulebook.
First drop wins and evaluation stops. "Hidden from non-followers" is literally the second tab.
Click a claim to see what the repo actually says.
Each of these is a mechanical tripwire in the published code, with the label it fires. Where a reputation exemption exists, the URL panel below spells it out.
"Reply if / like if / RT if", follow trains, vote-with-a-like. Grok classifies per post and the label hides it from every non-follower. High credibility does not exempt you.
SPAM_HIGH_RECALLCredibility is PageRank over the follow graph: mass from low-cred accounts rounds to zero. Meanwhile agatha tracks blocks and reports relative to favs received, so fake numbers push the exact ratios that get you labeled.
AGATHA_SPAM · challenge / suspendThe bot detector reads raw action sequences with timing; "engagement amplifier" is one of its eight archetypes. Staggered, organic replies from accounts that behave like humans, or don't bother.
bdsm → enforcementGrok scores replies too. A zero lands a 14-day reply demotion, and low-quality links at-mentioning non-followers have their own dedicated spam rule.
RISKY_HIGH_VIZ_REPLY · 14dURL reputation rules label posts on sight, and a bad link in a pinned post labels the whole account for 7 days. Canonical domains only, especially in pins.
MALICIOUS_URL · DO_NOT_AMPLIFY · account 7dDuplicate-text clustering runs on word and character n-grams. Identical captions across your account network get swept together in one pass.
COPYPASTA_SPAMMedia models score every image and video. Three NSFW-labeled posts among your last five labels the account for 7 days: everything hidden from non-followers.
account NSFW · 7dThe formula prices one expected mute at ~118 favs and one report at ~468, predicted per viewer. Rage-reach compounds negatively while the like counter climbs.
-58.8 mute · -234 reportRTs from non-followed accounts are hard-dropped and never indexed for retrieval; even in-network they run at 0.75x. Quote or original, always.
OONRetweetReplyFilterEvery domain and URL carries a stored reputation grade, like a credit score X keeps for the whole web. When you post a link, the system unwraps it (t.co, then every redirect behind it) into a chain of hops and judges the whole route. The service that assigns grades is not published; the punishments are.
The safe grades. A chain is only clean if its final stop holds one of these.
Spam-adjacent. Punished in context: bad final stop, @-mention promo, or a pinned post.
Spam grade. The post is labeled SPAM, and every other post carrying the URL gets swept too.
The malicious tier: phishing/malware class. Four labels at once, including MALICIOUS_URL.
Exemptions: the at-post-time rules skip high-PageRank accounts (cred score 54+, fallback 25k+ followers) and government-verified accounts. The retroactive sweeps that fire when a grade CHANGES skip nobody.
The media models score every link card. An OG image graded near-certain NSFW (0.999+) writes a verdict on the URL itself for 7 days, labeling up to 5,000 posts that carry it. An article can be clean and still get poisoned by its thumbnail.
One-time moves where the mechanism applies the moment you act. None of this rescues weak content: every lever multiplies P(action)s the post itself has to earn.
Ten operating rules derived from the code above. Check off what you already run.