/web-search
Implement web search capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to search for real-time information from the web, retrieve up-to-date content beyond the knowledge cutoff, or find the latest news and data. Returns structured search results with
$ npx -y skills add jjyaoao/helloagents --skill web-search --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/web-search
Context preview
The summary Claude sees to decide when to auto-load this skill.
Implement web search capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to search for real-time information from the web, retrieve up-to-date content beyond the knowledge cutoff, or find the latest news and data. Returns structured search results with
SKILL.md
web-search.SKILL.mdname: web-search
description: Implement web search capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to search for real-time information from the web, retrieve up-to-date content beyond the knowledge cutoff, or find the latest news and data. Returns structured search results with URLs, snippets, and metadata.
license: MIT
Web Search Skill
This skill guides the implementation of web search functionality using the z-ai-web-dev-sdk package, enabling applications to search the web and retrieve current information.
Installation Path
**Recommended Location**: `{project_path}/skills/web-search`
Extract this skill package to the above path in your project.
**Reference Scripts**: Example test scripts are available in the `{project_path}/skills/web-search/scripts/` directory for quick testing and reference. See `{project_path}/skills/web-search/scripts/web_search.ts` for a working example.
Overview
The Web Search skill allows you to build applications that can search the internet, retrieve current information, and access real-time data from web sources.
**IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.
Prerequisites
The z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.
CLI Usage (For Simple Tasks)
For simple web search queries, you can use the z-ai CLI instead of writing code. This is ideal for quick information retrieval, testing search functionality, or command-line automation.
Basic Web Search
# Simple search query
z-ai function --name "web_search" --args '{"query": "artificial intelligence"}'
# Using short options
z-ai function -n web_search -a '{"query": "latest tech news"}'Search with Custom Parameters
# Limit number of results
z-ai function \
-n web_search \
-a '{"query": "machine learning", "num": 5}'
# Search with recency filter (results from last N days)
z-ai function \
-n web_search \
-a '{"query": "cryptocurrency news", "num": 10, "recency_days": 7}'Save Search Results
# Save results to JSON file
z-ai function \
-n web_search \
-a '{"query": "climate change research", "num": 5}' \
-o search_results.json
# Recent news with file output
z-ai function \
-n web_search \
-a '{"query": "AI breakthroughs", "num": 3, "recency_days": 1}' \
-o ai_news.jsonAdvanced Search Examples
# Search for specific topics
z-ai function \
-n web_search \
-a '{"query": "quantum computing applications", "num": 8}' \
-o quantum.json
# Find recent scientific papers
z-ai function \
-n web_search \
-a '{"query": "genomics research", "num": 5, "recency_days": 30}' \
-o genomics.json
# Technology news from last 24 hours
z-ai function \
-n web_search \
-a '{"query": "tech industry updates", "recency_days": 1}' \
-o today_tech.jsonCLI Parameters
- `--name, -n`: **Required** - Function name (use "web_search")
- `--args, -a`: **Required** - JSON arguments object with:
- `query` (string, required): Search keywords
- `num` (number, optional): Number of results (default: 10)
- `recency_days` (number, optional): Filter results from last N days
- `--output, -o <path>`: Optional - Output file path (JSON format)
Search Result Structure
Each result contains:
- `url`: Full URL of the result
- `name`: Title of the page
- `snippet`: Preview text/description
- `host_name`: Domain name
- `rank`: Result ranking
- `date`: Publication/update date
- `favicon`: Favicon URL
When to Use CLI vs SDK
**Use CLI for:**
- Quick information lookups
- Testing search queries
- Simple automation scripts
- One-off research tasks
**Use SDK for:**
- Dynamic search in applications
- Multi-step search workflows
- Custom result processing and filtering
- Production applications with complex logic
Search Result Type
Each search result is a `SearchFunctionResultItem` with the following structure:
interface SearchFunctionResultItem {
url: string; // Full URL of the result
name: string; // Title of the page
snippet: string; // Preview text/description
host_name: string; // Domain name
rank: number; // Result ranking
date: string; // Publication/update date
favicon: string; // Favicon URL
}Basic Web Search
Simple Search Query
import ZAI from 'z-ai-web-dev-sdk';
async function searchWeb(query) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: 10
});
return results;
}
// Usage
const searchResults = await searchWeb('What is the capital of France?');
console.log('Search Results:', searchResults);Search with Custom Result Count
import ZAI from 'z-ai-web-dev-sdk';
async function searchWithLimit(query, numberOfResults) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: numberOfResults
});
return results;
}
// Usage - Get top 5 results
const topResults = await searchWithLimit('artificial intelligence news', 5);
// Usage - Get top 20 results
const moreResults = await searchWithLimit('JavaScript frameworks', 20);Formatted Search Results
import ZAI from 'z-ai-web-dev-sdk';
async function getFormattedResults(query) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: 10
});
// Format results for display
const formatted = results.map((item, index) => ({
position: index + 1,
title: item.name,
url: item.url,
description: item.snippet,
domain: item.host_name,
publishDate: item.date
}));
return formatted;
}
// Usage
const results = await getFormattedResults('climate change solutions');
results.forEach(result => {
console.log(`${result.position}. ${result.title}`);Read more
name: web-search description: Implement web search capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to search for real-time information from the web, retrieve up-to-date content beyond the knowledge cutoff, or find the latest news and data. Returns structured search results with URLs, snippets, and metadata. license: MIT
Web Search Skill
This skill guides the implementation of web search functionality using the z-ai-web-dev-sdk package, enabling applications to search the web and retrieve current information.
Installation Path
**Recommended Location**: `{project_path}/skills/web-search`
Extract this skill package to the above path in your project.
**Reference Scripts**: Example test scripts are available in the `{project_path}/skills/web-search/scripts/` directory for quick testing and reference. See `{project_path}/skills/web-search/scripts/web_search.ts` for a working example.
Overview
The Web Search skill allows you to build applications that can search the internet, retrieve current information, and access real-time data from web sources.
**IMPORTANT**: z-ai-web-dev-sdk MUST be used in backend code only. Never use it in client-side code.
Prerequisites
The z-ai-web-dev-sdk package is already installed. Import it as shown in the examples below.
CLI Usage (For Simple Tasks)
For simple web search queries, you can use the z-ai CLI instead of writing code. This is ideal for quick information retrieval, testing search functionality, or command-line automation.
Basic Web Search
# Simple search query
z-ai function --name "web_search" --args '{"query": "artificial intelligence"}'
# Using short options
z-ai function -n web_search -a '{"query": "latest tech news"}'Search with Custom Parameters
# Limit number of results
z-ai function \
-n web_search \
-a '{"query": "machine learning", "num": 5}'
# Search with recency filter (results from last N days)
z-ai function \
-n web_search \
-a '{"query": "cryptocurrency news", "num": 10, "recency_days": 7}'Save Search Results
# Save results to JSON file
z-ai function \
-n web_search \
-a '{"query": "climate change research", "num": 5}' \
-o search_results.json
# Recent news with file output
z-ai function \
-n web_search \
-a '{"query": "AI breakthroughs", "num": 3, "recency_days": 1}' \
-o ai_news.jsonAdvanced Search Examples
# Search for specific topics
z-ai function \
-n web_search \
-a '{"query": "quantum computing applications", "num": 8}' \
-o quantum.json
# Find recent scientific papers
z-ai function \
-n web_search \
-a '{"query": "genomics research", "num": 5, "recency_days": 30}' \
-o genomics.json
# Technology news from last 24 hours
z-ai function \
-n web_search \
-a '{"query": "tech industry updates", "recency_days": 1}' \
-o today_tech.jsonCLI Parameters
- `--name, -n`: **Required** - Function name (use "web_search")
- `--args, -a`: **Required** - JSON arguments object with:
- `query` (string, required): Search keywords
- `num` (number, optional): Number of results (default: 10)
- `recency_days` (number, optional): Filter results from last N days
- `--output, -o <path>`: Optional - Output file path (JSON format)
Search Result Structure
Each result contains:
- `url`: Full URL of the result
- `name`: Title of the page
- `snippet`: Preview text/description
- `host_name`: Domain name
- `rank`: Result ranking
- `date`: Publication/update date
- `favicon`: Favicon URL
When to Use CLI vs SDK
**Use CLI for:**
- Quick information lookups
- Testing search queries
- Simple automation scripts
- One-off research tasks
**Use SDK for:**
- Dynamic search in applications
- Multi-step search workflows
- Custom result processing and filtering
- Production applications with complex logic
Search Result Type
Each search result is a `SearchFunctionResultItem` with the following structure:
interface SearchFunctionResultItem {
url: string; // Full URL of the result
name: string; // Title of the page
snippet: string; // Preview text/description
host_name: string; // Domain name
rank: number; // Result ranking
date: string; // Publication/update date
favicon: string; // Favicon URL
}Basic Web Search
Simple Search Query
import ZAI from 'z-ai-web-dev-sdk';
async function searchWeb(query) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: 10
});
return results;
}
// Usage
const searchResults = await searchWeb('What is the capital of France?');
console.log('Search Results:', searchResults);Search with Custom Result Count
import ZAI from 'z-ai-web-dev-sdk';
async function searchWithLimit(query, numberOfResults) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: numberOfResults
});
return results;
}
// Usage - Get top 5 results
const topResults = await searchWithLimit('artificial intelligence news', 5);
// Usage - Get top 20 results
const moreResults = await searchWithLimit('JavaScript frameworks', 20);Formatted Search Results
import ZAI from 'z-ai-web-dev-sdk';
async function getFormattedResults(query) {
const zai = await ZAI.create();
const results = await zai.functions.invoke('web_search', {
query: query,
num: 10
});
// Format results for display
const formatted = results.map((item, index) => ({
position: index + 1,
title: item.name,
url: item.url,
description: item.snippet,
domain: item.host_name,
publishDate: item.date
}));
return formatted;
}
// Usage
const results = await getFormattedResults('climate change solutions');
results.forEach(result => {
console.log(`${result.position}. ${result.title}`);🤖 生产级多智能体框架 - 工具响应协议、上下文工程、会话持久化、子代理机制等16项核心能力 HelloAgents 是一个基于 OpenAI 原生 API 构建的生产级多智能体框架,集成了工具响应协议(ToolResponse)、上下文工程(HistoryManager/TokenCounter)、会话持久化(SessionStore)、子代理机制(TaskTool)、乐观锁(文件编辑)、熔断器(CircuitBreaker)、Skills 知识外化、TodoWrite 进度管理、DevLog
Other skills on helloagents.
- /ASR
Implement speech-to-text (ASR/automatic speech recognition) capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to transcribe audio files, convert speech to text, build voice input features, or process audio recordings. Supports base64 encoded audio files
Open skill - /LLM
Implement large language model (LLM) chat completions using the z-ai-web-dev-sdk. Use this skill when the user needs to build conversational AI applications, chatbots, AI assistants, or any text generation features. Supports multi-turn conversations, system prompts, and context
Open skill - /TTS
Implement text-to-speech (TTS) capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to convert text into natural-sounding speech, create audio content, build voice-enabled applications, or generate spoken audio files. Supports multiple voices, adjustable
Open skill - /VLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images
Open skill - /docx
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When GLM needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content,
Open skill - /finance
Comprehensive Finance API integration skill for real-time and historical financial data analysis, market research, and investment decision-making. Priority use cases: stock price queries, market data analysis, company financial information, portfolio tracking, market news
Open skill

