Gemini Smart Search for Openclaw

A specialized search skill for Openclaw agents that leverages Gemini with Google Search grounding and intelligent model fallback routing.

jas0n1ee
v0.1.1
Mar 12, 2026
0
899
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install gemini-smart-search

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 gemini-smart-search 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 Gemini Smart Search?

Gemini Smart Search is a sophisticated search workflow designed for the Openclaw Skills ecosystem. It provides AI agents with direct access to Google Search grounding through the Gemini API, bypassing static gateway configurations. This skill is engineered for developers who need fine-grained control over search backends, allowing for real-time model switching between different Gemini Flash and Flash-Lite variants without requiring a gateway restart.

By utilizing a dedicated script-backed approach, Gemini Smart Search ensures high availability through a robust quota-aware fallback system. It bridges the gap between raw web data and agent reasoning by delivering strictly structured JSON responses, including citations and detailed metadata about the specific model used during the execution chain.

Gemini Smart Search Use Cases

  • Performing deep web research using specific Gemini model families for grounding.
  • Isolating API quota pools by using dedicated keys for search-intensive tasks.
  • Orchestrating multi-step AI workflows that require predictable JSON search outputs.
  • Implementing search functionality that requires automatic fallback between Flash and Flash-Lite models during high traffic or rate-limiting events.

How Gemini Smart Search Works

  1. The AI agent invokes the Python entrypoint with a specific query and a preferred performance mode (cheap, balanced, or deep).
  2. The skill resolves the appropriate API key, prioritizing SMART_SEARCH_GEMINI_API_KEY before falling back to the standard GEMINI_API_KEY.
  3. Based on the selected mode, the script selects a primary model from the candidate chain (e.g., Gemini 3 Flash or 2.5 Flash-Lite).
  4. The script executes the search request using Google Search grounding via the Gemini API.
  5. If a transient error or quota limit is reached, the skill automatically probes the next model in the fallback chain.
  6. The final grounded answer and associated citations are parsed into a structured JSON schema and returned to the agent.

Gemini Smart Search Setup

To integrate this search capability into your Openclaw Skills environment, follow these steps:

  1. Ensure Python 3 is installed in your environment.
  2. Configure your API keys in a .env.local file (gitignored) within the skill directory:
SMART_SEARCH_GEMINI_API_KEY=your_api_key_here
  1. Test the installation by running a sample query via the Python script:
python3 skills/gemini-smart-search/scripts/gemini_smart_search.py --query "Openclaw Skills features" --mode balanced --json

Gemini Smart Search Data Schema & Taxonomy

The skill produces a consistent JSON output contract to ensure compatibility with downstream automation. Key fields include:

Field Description
ok Boolean indicating success or failure.
model_used The specific API model ID that generated the response.
answer The grounded text response derived from search results.
citations A list of source URLs or grounding redirect links.
fallback_chain The list of models attempted during the request lifecycle.
error Detailed error messaging in case of failure.

Gemini Smart Search Advanced Features

  • Multi-layer model routing with display chain labeling for human-readable logs.
  • Intelligent candidate probing for preview-era and version-specific Gemini model IDs.
  • Automated escalation paths that generate GitHub issue URLs for human intervention on critical failures.
  • Repo-local environment loading to prevent credential leakage in shared environments.
  • Configurable search modes (cheap, balanced, deep) to optimize for speed versus depth of reasoning.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*