Install
openclaw skills install gemini-smart-searchSearch the web using Gemini with Google Search grounding through a local script, with model routing and quota fallback across Gemini Flash-Lite / Flash varia...
openclaw skills install gemini-smart-searchUse this skill when Gemini should be the search backend, but gateway-level web_search config is too static or too disruptive to change.
This skill is a script-backed search workflow, not a gateway tool override.
It exists to provide:
Model routing is split into two layers:
Current display chains:
gemini-2.5-flash-litegemini-3.1-flash-litegemini-2.5-flashgemini-2.5-flashgemini-3-flashgemini-2.5-flash-litegemini-3-flashgemini-2.5-flashgemini-3.1-flash-liteFor 3.x models, do not assume the UI label is the raw API id. Probe candidate ids such as preview-suffixed names when needed.
Run the Python script or the shell wrapper via exec and request JSON output.
Python is now the canonical entrypoint because it also loads repo-local .env.local when present. The shell wrapper remains a convenience layer.
Primary example (preferred):
python3 skills/gemini-smart-search/scripts/gemini_smart_search.py \
--query "BoundaryML context engineering" \
--mode cheap \
--json
Wrapper example (convenience only):
bash skills/gemini-smart-search/scripts/gemini_smart_search.sh \
--query "BoundaryML context engineering" \
--mode cheap \
--json
python -m gemini_smart_search may work when run from the scripts/ directory, but it is not a supported interface for agents right now. Do not depend on it.
Expect JSON with at least:
okquerymodemodel_usedfallback_chaindisplay_chainanswercitationserrorescalationNotes:
model_used is the actual probed API model id (for example gemini-3-flash-preview), not the human-facing display label.--json, supported runtime paths should return structured JSON on both success and error. Invalid CLI arguments now also return JSON when --json is present.The script should prefer a dedicated key path for this skill, then fall back to the standard Gemini key.
Required key resolution order:
SMART_SEARCH_GEMINI_API_KEY (primary declared env)GEMINI_API_KEY (compatibility fallback)If neither key is present, the agent must explicitly ask the human for a Gemini API key before claiming setup is complete.
Do not store the key in tracked repository files. Prefer a repo-local, gitignored file such as .env.local.
See references/config.md.
web_searchUse this skill when:
Do not use this skill when:
web_search is sufficientweb_fetch)browser)Fallback only for errors like:
Do not silently fallback on obvious local/script bugs or invalid arguments.
references/config.md — environment variables and design notesreferences/qa-test-plan.md — focused QA scope for v1 behavior and release gatesreferences/qa-results-2026-03-12.md — CLI-oriented QA outcomes from the current release cyclereferences/agent-qa-cases.md — adversarial agent-style misuse reviewreferences/model-id-recon.md — verified callable Gemini model IDs and mapping notesreferences/escalation-design.md — when to return a GitHub issue URL for human escalationreferences/release-checklist.md — artifact release checklist with current completion statusreferences/development-goals-v0.1.1.md — next small version scope and artifact policyreferences/release-notes-v0.1.1.md — release notes for the current artifactassets/example-output.json — expected response shapescripts/smoke_test.sh — non-destructive local smoke checks for the scaffoldscripts/prepare_artifact.sh — deterministic clean artifact export helperPython implementation is now wired for a first real version:
.env.local loadingThis is still intentionally minimal: it does not yet expose advanced tuning flags, caching, or richer citation post-processing.
Before publishing an artifact, consult references/release-checklist.md, review references/development-goals-v0.1.1.md, run scripts/prepare_artifact.sh, and publish the release note in references/release-notes-v0.1.1.md alongside the artifact.