# Send xAI Search to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "xai-search",
    "name": "xAI Search",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/aydencook03/xai-search",
    "canonicalUrl": "https://clawhub.ai/aydencook03/xai-search",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/xai-search",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=xai-search",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/xai-search.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/xai-search"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/xai-search",
    "downloadUrl": "https://openagent3.xyz/downloads/xai-search",
    "agentUrl": "https://openagent3.xyz/skills/xai-search/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xai-search/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xai-search/agent.md"
  }
}
```
## Documentation

### xAI Search (Grok API)

Use xAI's agentic search to query X/Twitter and the web in real-time. This leverages Grok's web_search and x_search tools.

Docs: https://docs.x.ai/docs/

### Requirements

XAI_API_KEY environment variable
Python 3 + xai-sdk: pip install xai-sdk

### Web Search

curl -s https://api.x.ai/v1/chat/completions \\
  -H "Authorization: Bearer $XAI_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "grok-3-fast",
    "messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
    "tools": [{"type": "function", "function": {"name": "web_search"}}]
  }' | jq -r '.choices[0].message.content'

### X/Twitter Search

curl -s https://api.x.ai/v1/chat/completions \\
  -H "Authorization: Bearer $XAI_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "grok-3-fast",
    "messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
    "tools": [{"type": "function", "function": {"name": "x_search"}}]
  }' | jq -r '.choices[0].message.content'

### Combined (Web + X)

curl -s https://api.x.ai/v1/chat/completions \\
  -H "Authorization: Bearer $XAI_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "model": "grok-3-fast",
    "messages": [{"role": "user", "content": "YOUR QUERY HERE"}],
    "tools": [
      {"type": "function", "function": {"name": "web_search"}},
      {"type": "function", "function": {"name": "x_search"}}
    ]
  }' | jq -r '.choices[0].message.content'

### Helper Script

For convenience, use the xai-search.py script in the scripts/ folder:

# Web search (adjust path to your skill location)
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py web "latest news about AI"

# X/Twitter search  
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py x "what are people saying about Clawdbot"

# Both
python ~/.clawdbot/skills/xai-search/scripts/xai-search.py both "current events today"

### Models

grok-3-fast — fast, good for quick searches
grok-4-1-fast — reasoning model, better for complex queries

### X Search Filters

You can filter X searches by:

allowed_x_handles / excluded_x_handles — limit to specific accounts
from_date / to_date — date range (ISO8601 format)
enable_image_understanding — analyze images in posts
enable_video_understanding — analyze videos in posts

### Web Search Filters

allowed_domains / excluded_domains — limit to specific sites
enable_image_understanding — analyze images on pages

### Tips

For breaking news: use X search
For factual/research queries: use web search or both
For sentiment/opinions: use X search
The model will make multiple search calls if needed (agentic)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: aydencook03
- Version: 1.0.4
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/xai-search)
- [Send to Agent page](https://openagent3.xyz/skills/xai-search/agent)
- [JSON manifest](https://openagent3.xyz/skills/xai-search/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/xai-search/agent.md)
- [Download page](https://openagent3.xyz/downloads/xai-search)