← 返回
AI智能 Key 中文

Perplexity Search Skill

Search the web with Perplexity Sonar API for current information, citations, and web-grounded answers.
使用 Perplexity Sonar API 搜索网络,获取实时信息、引用及基于网络的回答。
nitinzadpe
AI智能 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 559
下载
💾 3
安装
1
版本
#latest#perplexity#research#search#web

概述

Perplexity Search

Use this skill to search the web via the Perplexity Sonar API. It returns accurate, cited, real-time answers grounded in current web sources.

When to use this skill

Invoke this skill automatically when the user asks about:

  • Current events, recent news, or anything that may have changed recently
  • Product releases, software versions, or API documentation
  • Research questions that benefit from citations and web sources
  • Comparisons, pricing, or availability that requires live data
  • Any question where freshness or sourcing matters

Trigger phrases: "search for", "look up", "find out", "what's the latest", "current", "recent", "news about", "web search", "perplexity search"

Setup

Set your Perplexity API key in the environment before starting OpenClaw:

# Add to ~/.openclaw/.env
PERPLEXITY_API_KEY=pplx-your-key-here

Get a key at https://www.perplexity.ai/settings/api

Command

python3 {baseDir}/scripts/perplexity_search.py --query "<the user's question>"

Optional flags

FlagDefaultDescription
----------------------------
--model sonarsonarFast, general-purpose search
--model sonar-proHigher quality synthesis (costs more)
--model sonar-reasoningStep-by-step reasoning
--domains example.comComma-separated domain allowlist
--max-results 88Cap displayed search results
--temperature 0.20.2Lower = more factual
--jsonPrint raw JSON response

Usage examples

# General search
python3 {baseDir}/scripts/perplexity_search.py --query "latest AI agent frameworks 2025"

# Higher quality synthesis
python3 {baseDir}/scripts/perplexity_search.py --query "compare Perplexity vs Tavily search APIs" --model sonar-pro

# Restrict to a specific site
python3 {baseDir}/scripts/perplexity_search.py --query "PostgreSQL 17 release notes" --domains postgresql.org

# Reasoning mode for complex topics
python3 {baseDir}/scripts/perplexity_search.py --query "why did SVB fail" --model sonar-reasoning

Output

The script prints a structured markdown report with:

  1. Answer — concise, web-grounded response
  2. Citations — numbered source URLs
  3. Search Results — titles, URLs, and snippets
  4. Related Questions — follow-up ideas
  5. Usage — token and cost metadata

Agent workflow

  1. Identify the user's search intent from their message.
  2. Extract a clean, specific query (avoid filler words).
  3. Choose sonar for speed, sonar-pro for depth.
  4. Run the command with python3 {baseDir}/scripts/perplexity_search.py --query "...".
  5. Present the Answer and Citations to the user in a readable format.
  6. Offer related questions as follow-up options.

Security notes

  • The script reads PERPLEXITY_API_KEY from the environment only — never from arguments.
  • The API key is never logged or printed.
  • All external calls go only to https://api.perplexity.ai/chat/completions.
  • No local files are written.

SECURITY MANIFEST

  • Environment variables accessed: PERPLEXITY_API_KEY (only)
  • External endpoints called: https://api.perplexity.ai/chat/completions (only)
  • Local files read: none
  • Local files written: none

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 21:41 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,910
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,697
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 833 📥 212,777