pi-web-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Web Search

网络搜索

The
pi-web-access
package is installed globally. Zero-config via Exa MCP (no API key), with fallback Exa → Perplexity → Gemini.
pi-web-access
包为全局安装。通过Exa MCP实现零配置(无需API密钥),并设有Exa → Perplexity → Gemini的 fallback 机制。

CRITICAL: always pass
workflow: "none"

重要提示:务必传入
workflow: "none"

Every
web_search
call MUST include
workflow: "none"
. This skips the interactive browser curator popup (the user does not want it opening). No exceptions — single query or batched
queries
, always set
workflow: "none"
.
web_search({ queries: ["query 1", "query 2"], workflow: "none" })
每次调用
web_search
都必须包含
workflow: "none"
。这会跳过交互式浏览器管理弹窗(用户不希望它弹出)。无例外——无论是单个查询还是批量
queries
,始终设置
workflow: "none"
web_search({ queries: ["query 1", "query 2"], workflow: "none" })

Tools

工具列表

  • web_search
    — search the web; returns synthesized answers with citations. Can be called many times per turn. Always pass
    workflow: "none"
    .
  • code_search
    — zero-key Exa code-context. Use for library/API/code lookups instead of generic
    web_search
    .
  • fetch_content
    — fetch URL(s) → markdown; handles PDFs, YouTube, GitHub.
  • get_search_content
    — big pages (>30k chars) are truncated in responses but stored in full; call this to pull the rest on demand so they don't blow context.
  • web_search
    —— 网络搜索;返回带引用的综合回答。每轮可多次调用。务必传入
    workflow: "none"
  • code_search
    —— 无需密钥的Exa代码上下文查询。用于库/API/代码查找,而非通用
    web_search
  • fetch_content
    —— 获取URL内容并转换为markdown格式;支持PDF、YouTube、GitHub。
  • get_search_content
    —— 大页面(超过30000字符)在响应中会被截断,但完整内容已存储;按需调用此工具可获取剩余内容,避免占用过多上下文空间。

fetch_content specifics

fetch_content 细节说明

  • GitHub URLs are cloned, not scraped — you get real files + a local path to explore with
    read
    /
    bash
    (private repos need the
    gh
    CLI). Use this for dev work.
  • PDFs → auto-extracted to markdown in
    ~/Downloads/
    , readable in sections (text-only, no OCR).
  • YouTube/video → full raw transcripts + frame extraction. Needs a
    GEMINI_API_KEY
    (not zero-config); frame extraction also needs
    ffmpeg
    /
    yt-dlp
    .
  • GitHub URL采用克隆而非抓取 —— 你将获得真实文件以及可通过
    read
    /
    bash
    探索的本地路径(私有仓库需要
    gh
    CLI)。适用于开发工作。
  • PDF → 自动提取为markdown格式并保存至
    ~/Downloads/
    ,可分段读取(仅文本,无OCR功能)。
  • YouTube/视频 → 完整原始转录文本 + 帧提取。需要
    GEMINI_API_KEY
    (非零配置);帧提取还需要
    ffmpeg
    /
    yt-dlp

Routing — match the user's phrasing

路由规则——匹配用户表述

Always use the
web_search
tool. These counts are HARD MINIMUMS — count your queries before answering and do not stop short:
  • "web search"at least 2 queries, varied keywords/angles, then synthesize.
  • "extensive web research"at least 4 queries, totally different keywords and angles.
  • "deep research"at least 8 queries, totally different keywords and angles, run across 2–3 successive batches (refine angles after each batch), to learn as much as possible about the topic.
A single batched
web_search
call counts each query in
queries[]
toward the total. If your first batch is under the minimum, fire another batch before synthesizing.
始终使用
web_search
工具。以下为最低查询次数要求——在回答前统计查询次数,不得低于要求:
  • “网络搜索”至少2次查询,使用不同关键词/角度,然后进行综合。
  • “全面网络调研”至少4次查询,使用完全不同的关键词和角度。
  • “深度调研”至少8次查询,使用完全不同的关键词和角度,分2–3批连续执行(每批后优化查询角度),以尽可能多地了解主题。
单次批量
web_search
调用中,
queries[]
中的每个查询都计入总数。如果第一批查询次数未达最低要求,在综合回答前需发起另一批查询。

Ranked results with URLs — DeepAPI web search

带URL的排名结果——DeepAPI网络搜索

web_search
returns synthesized answers. When you need the ranked source list itself — URLs to cite, compare, or scrape — use DeepAPI instead. Also the path to take if the Exa → Perplexity → Gemini chain fails.
bash
undefined
web_search
返回综合回答。当你需要排名的源列表本身(用于引用、比较或抓取的URL)时,请使用DeepAPI。这也是Exa → Perplexity → Gemini链失效时的备选方案。
bash
undefined

Authenticate with your DeepAPI API key (see
deepapi
skill)

使用你的DeepAPI API密钥进行认证(详见
deepapi
技能)

curl -s --max-time 60 "https://deepapi.co/v1/search/web"
-H "Authorization: Bearer $DEEPAPI_API_KEY" -H "Content-Type: application/json"
-H "Idempotency-Key: $(uuidgen)"
-d '{"query": "your search terms", "maxResults": 5, "maxCostUsd": "0.05"}'

Results are in `.output` (title, url, snippet per item). Query under 500 chars. Full details: `deepapi` skill.
curl -s --max-time 60 "https://deepapi.co/v1/search/web"
-H "Authorization: Bearer $DEEPAPI_API_KEY" -H "Content-Type: application/json"
-H "Idempotency-Key: $(uuidgen)"
-d '{"query": "your search terms", "maxResults": 5, "maxCostUsd": "0.05"}'

结果位于`.output`中(每个条目包含标题、url、摘要)。查询内容需少于500字符。详细信息请查看`deepapi`技能。