SlimeTree-RLM × X Integration (Grok-only)
Wraps the X (formerly Twitter) platform API with RLM pre-filter + Grok delegation. Cuts LLM cost by 60-80%, ships with a SHA-256 audit chain, MIT source.
LLM delegation = Grok (xAI) exclusive ― using other LLMs on X data risks X API access restrictions. Platform-native LLM principle.
Issue a Grok API key at console.x.ai (paid, token-based).
Why X integration is Grok-only
X (owned by xAI) is tightening API governance against X-data processing via competitor LLM providers (OpenAI / Anthropic / Google).
"If you process data on X, use xAI's own Grok" is the access-policy-aligned answer ― this library is therefore designed as X integration = Grok only.
For generic prompt processing where vendor choice matters, use the Meta Gateway (Gemini / Claude / OpenAI selectable).
* Architectural principle: "Platform-native LLM" ― Meta = neutral / X = Grok / Google = Gemini / Microsoft (planned) = Azure OpenAI.
Integration routes
Public X API v2 + Grok xAI
▸ Stop a viral-risk Post before it ships
Posts automated posting (µ-prefilter)
RLM pre-judges the draft; on µ, warn before posting. Real posting via X API v2 (POST /2/tweets); Dry-run (curl preview) also supported. Requires X Basic ($200/month) or higher.
Public X Login + Grok xAI
▸ Operate X safely through an internal AI gateway
X Prompt Gateway
Log in with the X account → in-browser RLM produces a D / µ / R verdict → only R goes to the Grok API. Same shape as the Meta Gateway, specialized for X Login + Grok.
Public X DM API + Grok xAI
▸ Don't pipe brand-account DM spam through the AI
DM safe bot (D/µ/R pre-filter)
RLM classifies incoming DMs → D=instant FAQ / µ=spam suppression / R=Grok delegation. X DM API requires X Pro ($5,000/month) or higher. Investment solicitation / affiliate spam is screened out deterministically.
Public X API v2 + Grok xAI
▸ Consistent-quality auto-replies to @-mentions
Mentions auto-reply bot
GET @-mentions → RLM classifies into D/µ/R → D=instant FAQ / µ=silent / R=Grok delegation. Frequent FAQs answered at zero tokens; only nuanced cases reach Grok.
Public X API v2 generic xAI
▸ Hit any X API endpoint from one UI
X API generic client
X API v2 (Tweets / Users / Spaces / Lists / Trends) from a single panel. Post-stage RLM analysis of response text (via Grok), curl-equivalent display, history.
Public Spaces / Lists / Trends xAI
▸ Automate community operations
Spaces / Lists integration
Host automation for X Spaces (audio), List management, and Trend monitoring bots. Requires X Pro API; extensible on demand.
NEXT THEME · 2026-05-30 X = Grok-only grok-3-mini → grok-3 tiering
★ What multi-agent extension changes ✅ X 6/6 B mode shipped (in-Grok)
X integration is Platform-native = Grok-only (aligned with X API access policy).
Within that constraint, within-vendor tiered escalation: grok-3-mini (cheap) → grok-3 (premium) plus role-splitting via system prompts inside the same model makes B / C / D / E work fully.
A (cross-validation) / F (voting) are substituted via temperature sampling inside Grok.
Design guidance under the Grok-only constraint
- "In-vendor tiering" is the sweet spot ― xAI offers clear two-tier separation (grok-3-mini and grok-3) plus temperature control. B/D/C/E ride naturally.
- Cases that demand cross-vendor verification fall outside X integration ― "Verify with both Gemini and Claude" cases belong on Meta integration. Separate roles cleanly.
- Unified with X Premium / X API tier billing ― Grok ships within X Premium on some plans, so no extra LLM billing is required. An invoice-consolidation win for enterprise.
- F (consensus) substitutes via N-temperature sampling ― call the same Grok model 3 times at T=0.2 / 0.5 / 0.9 and take the majority answer (weaker than cross-vendor voting, strong enough for stabilization).
Common pattern (all 5 routes)
| Authentication | OAuth 2.0 (X Login) ― scopes tweet.read + tweet.write + users.read + dm.read + dm.write |
|---|---|
| LLM delegation | Grok (xAI) only. Endpoint = https://api.x.ai/v1/chat/completions (OpenAI-compatible, Bearer token) |
| Verdict | D = instant (no Grok call) / μ = suppressed / R = Grok delegation |
| Audit | Every query chained via SHA-256; exportWAL() emits JSON → archive to S3 etc. |
| X API tier | Read = Free is OK, Post = Basic ($200/month) or higher, DM = Pro ($5,000/month) or higher. See developer.x.com |
| Grok pricing | Token-based (varies by model). Check console.x.ai |
| License | Integration code = MIT (public) / actual WASM = JAVATEL commercial / X API + Grok = customer's own accounts |
Related resources
- SlimeTree-RLM primary materials
- Meta integration hub (multi-provider version, includes generic Gateway)
- Service page (umbrella)
- X API v2 documentation
- xAI Grok API documentation
