Kagi
/install kagi
Kagi (API)
Use the bundled Python scripts to call Kagi’s API from the OpenClaw host.
Quick start
- Create a token in https://kagi.com/settings/api
- Export it for your shell/session:
export KAGI_API_TOKEN='…'
- Run a search:
python3 scripts/kagi_search.py "haaps glass" --limit 10 --json
- Or ask FastGPT (LLM + web search):
python3 scripts/kagi_fastgpt.py "Summarize the latest Haaps glass mentions" --json
Tasks
1) Web search (Kagi Search API)
Use when you need a normal ranked list of results (URLs/titles/snippets).
Command:
python3 scripts/kagi_search.py "\x3Cquery>" [--limit N] [--json]
Notes:
- Defaults to printing a readable digest; use
--jsonfor raw API output. - The script automatically sets
Authorization: Bot \x3Ctoken>.
2) Answer/summarize with citations (FastGPT)
Use when you want a short answer grounded in web results, including reference URLs.
Command:
python3 scripts/kagi_fastgpt.py "\x3Cquestion>" [--cache true|false] [--json]
3) Using Kagi as a drop-in for web_search
If Brave Search is rate-limited (429) or you want better results:
- Use
scripts/kagi_search.pyto fetch results - Then use the main agent model to synthesize / summarize based on the returned URLs/snippets
Files
- API reference snippets:
references/kagi-api.md - Python client + CLIs:
scripts/kagi_client.py,scripts/kagi_search.py,scripts/kagi_fastgpt.py
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install kagi - After installation, invoke the skill by name or use
/kagi - Provide required inputs per the skill's parameter spec and get structured output
What is Kagi?
Perform web searches and generate summarized answers with citations using the Kagi API and FastGPT for higher-quality results or rate-limit fallback. It is an AI Agent Skill for Claude Code / OpenClaw, with 1480 downloads so far.
How do I install Kagi?
Run "/install kagi" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Kagi free?
Yes, Kagi is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Kagi support?
Kagi is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Kagi?
It is built and maintained by michaelasper (@michaelasper); the current version is v0.1.0.