AGENT SKILL

websearch

Search Google via the Serper API. Configure access via /login, then MCP Connections, then Serper (web search). Takes one query and returns titles, URLs, snippets, and knowledge-graph data.

License 许可
MIT
最近更新
2026-10-14
Stars
★ 3
Forks
0

01 前言 Front Matter

name
websearch
description
Search Google via the Serper API. Configure access via /login, then MCP Connections, then Serper (web search). Takes one query and returns titles, URLs, snippets, and knowledge-graph data.

02 资源文件 2

03 SKILL.md 正文

Web Search

Search the web via the Serper Google Search API. The API key stays on the host: cells call this crate, and the host performs the HTTP request.

Setup

Get a free API key at https://serper.dev, then run /login in WasmEdge Agent, switch to MCP Connections, and choose Serper (web search) to paste it. The key is stored in WasmEdge Agent and used by the host automatically.

If web search reports a missing key, walk the user through those two steps; don't ask them to set environment variables.

Optional overrides (host environment variables):

  • WASMEDGE_AGENT_WEBSEARCH_TIMEOUT - HTTP timeout in seconds (default 45).
  • WASMEDGE_AGENT_WEBSEARCH_NUM_RESULTS - number of organic results to return (default 5).

Usage

Call the mounted crate from a rust cell:

// Signatures:
//   websearch::run(query: &str) -> anyhow::Result<String>
//   websearch::search(query: &str, opts: websearch::SearchOpts) -> anyhow::Result<String>
//   SearchOpts { num_results: Option<u32>, timeout: Option<u32>, max_output: Option<u32> }
use agent_lib::skills::websearch;

let results = websearch::run("latest WasmEdge Agent release")?;
println!("{results}");

04 同仓库更多 Skills