SuperAPI AI Directory

kimi-websearch

General & other

View repository

Updated 10-16 02:12

About this skill

Kimi WebSearch

📝 Overview

Calls Kimi's online search capability and chats directly with Kimi. Suitable for scenarios requiring real-time online search and AI-assisted information retrieval.

✨ Features

Feature Module Capability Description Core Value
Asynchronous Submission Submits search keywords to Kimi WebSearch and returns a taskId No need to wait; get the task identifier immediately
Automatic Polling Queries task status every 5 seconds, waiting up to 5 minutes Automatically waits for results without manual querying
Progress Feedback Outputs waiting status in real time via stderr during polling Users can know the search progress
Result Output Outputs complete JSON after the status becomes completed Structured data is convenient for Agent parsing and display
Exception Handling Covers four scenarios: missing API Key, submission failure, timeout, and task failure Each exception has clear prompts and handling

🔑 Authentication

Go to RedFox Hub to obtain an API Key and configure it in the following way:

# 方式一:配置文件(如 OpenClaw 的 ~/.openclaw/openclaw.json)
{ "env": { "REDFOX_API_KEY": "ak_xxxx..." } }

# 方式二:终端环境变量
export REDFOX_API_KEY="ak_xxxx..."

🔄 Workflow

Step 1: Extract search keywords

Extract the search intent and keywords from the user's natural language description, and pass them as inquiry_text .

Step 2: Call the search script

python3 ~/.agents/skills/kimi-websearch/scripts/kimi_search.py "<搜索关键词>"

The script automatically completes:

  1. Submit search:POST /story/api/kimi/submit, passing in {"inquiry_text": "...", "source": "kimi websearch-GitHub"}
  2. Poll results: every 5 seconds POST /story/api/kimi/result query once until the status is completed
  3. Real-time feedback: outputs waiting prompts via stderr during polling
  4. Final output: after status completed outputs the complete JSON result to stdout

Step 3: Display results

After the script returns JSON, extract data.content the Kimi answer text in and data.result the cited sources in, organize them structurally, and display them to the user.

📦 Dependencies

pip3 install requests

⚠️ Error Handling

Situation Handling Method
Not configured REDFOX_API_KEY Prompt the user to go to RedFox Hub to obtain an API Key
Submission failed Output error information and suggest the user retry
Polling timeout (5 minutes) Prompt timeout and suggest retrying later
Task failed (status=failed) Output failure details