AgentSkillsCN

searching-web

使用Tavily API搜索网络,获取实时信息。当用户需要最新信息、想搜索互联网或询问需要最新网络数据的问题时,请使用此工具。

SKILL.md
--- frontmatter
name: searching-web
description: Searches the web using Tavily API for real-time information. Use when the user needs current information, wants to search the internet, or asks questions requiring up-to-date web data.

Web Search Tools

Tools for searching the web using the Tavily API.

Requirements

Set environment variable:

  • TAVILY_API_KEY: Your Tavily API key

Basic Search

python
result = await tavily_search(
    query="latest Python release",
    max_results=5
)

Response format

json
{
  "success": true,
  "data": {
    "results": [
      {
        "title": "Result Title",
        "url": "https://example.com",
        "content": "Snippet of the page content...",
        "score": 0.95
      }
    ],
    "query": "latest Python release"
  }
}

Advanced Options

python
result = await tavily_search(
    query="machine learning tutorials",
    max_results=10,
    search_depth="advanced",
    include_domains=["github.com", "arxiv.org"],
    exclude_domains=["pinterest.com"]
)

Parameters

ParameterTypeDescription
querystrSearch query (required)
max_resultsintNumber of results (default: 5)
search_depthstr"basic" or "advanced"
include_domainslistOnly search these domains
exclude_domainslistExclude these domains

When to Use

  • Finding current information not in training data
  • Researching recent events or news
  • Looking up documentation or tutorials
  • Fact-checking with web sources