xAI Grok Integration for Openclaw

A powerful interface to interact with xAI Grok models and perform real-time searches across X/Twitter posts.

blueberrywoodsym
v1.0.2
Feb 22, 2026
15
12.5k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install x-ai

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install x-ai using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is xAI Grok Integration?

This skill provides a bridge between your local environment and xAI suite of Grok models. By utilizing Openclaw Skills, developers can leverage Grok-3 for complex reasoning, vision models for image analysis, and unique real-time search capabilities that pull data directly from X (formerly Twitter) with citations. It is designed for efficiency and speed, offering multiple model variants to balance performance and cost.

Built for developers who need more than just static LLM responses, this integration ensures access to the latest frontier models while maintaining a lightweight footprint via Node.js scripts. Whether you are automating technical research or building vision-capable agents, this tool provides the necessary hooks to the xAI API ecosystem.

xAI Grok Integration Use Cases

  • Querying Grok-3 for complex technical or philosophical reasoning tasks.
  • Analyzing visual content using specialized vision models for image understanding.
  • Performing real-time research on current events or technical frameworks using live X data.
  • Integrating fast, efficient AI chat into local automation pipelines using mini and fast model variants.

How xAI Grok Integration Works

  1. The user provides a prompt or command via the CLI or through an AI agent interface using Openclaw Skills triggers like grok or ask grok.
  2. The skill identifies the requested model, defaulting to grok-3 if no specific variant is defined in the environment variables.
  3. For search queries, the dedicated search script utilizes the xAI Responses API and the x_search tool to fetch live social data from X.
  4. For vision tasks, local images are validated and transmitted securely to the xAI endpoint for processing.
  5. Responses, including citations for real-time posts, are returned to the user in a clean, technical format.

xAI Grok Integration Setup

To start using this among your Openclaw Skills, obtain an API key from the xAI console and set it in your environment.

export XAI_API_KEY="xai-YOUR-KEY"

Ensure you have node installed. You can also optionally set a default model:

export XAI_MODEL="grok-3"

xAI Grok Integration Data Schema & Taxonomy

Component Description
Scripts chat.js (Chat), models.js (Metadata), search-x.js (X Search)
Allowed Images .jpg, .jpeg, .png, .gif, .webp
Environment XAI_API_KEY (Required), XAI_MODEL (Optional)
Output Real-time post citations, JSON chat responses, and model lists

xAI Grok Integration Advanced Features

  • Real-time X/Twitter search with support for handle-specific filtering and date range constraints.
  • Native support for the full Grok-3 family, including mini and fast variants for different latency requirements.
  • Secure image analysis that restricts file access to specific image extensions only.
  • Dynamic model discovery to automatically list and select available xAI endpoints.
  • High-performance execution via Node.js with zero persistent conversation storage for enhanced security.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*