AgentSkillsCN

Tavily

通过Tavily API进行搜索或内容提取。

SKILL.md
--- frontmatter
name: Tavily
description: Performs a search or extracts content using the Tavily API.

Tavily Search Skill

Performs a search or extracts content using the Tavily API. Specify 'search' or 'extract' in the 'action' parameter.

Usage

The skill is executed via a Python script: .myaaw/skills/tavily/scripts/tavily.py. It accepts a JSON string as the first argument calling the tool.

Arguments

The input JSON should contain the following fields:

FieldTypeDescriptionRequired
actionstringThe action to perform: search (Search API) or extract (Extract API).Yes
search_argsobjectArguments for the Tavily search API. Required if action is search.Conditional
extract_argsobjectArguments for the Tavily extract API. Required if action is extract.Conditional

Search Arguments (search_args)

FieldTypeDescriptionDefault
querystringThe search query. (Required)-
topicstringCategory of the search: general or news.general
search_depthstringDepth of the search: basic or advanced.basic
chunks_per_sourceintNumber of content chunks per source (advanced search only).3
max_resultsintMaximum number of search results.5
time_rangestringTime range (day, week, month, year) or abbrevs (d, etc).-
daysintNumber of days back to include (news topic only).7
include_answerboolInclude LLM-generated answer.false
include_raw_contentboolInclude cleaned HTML content of search results.false
include_imagesboolInclude image search results.false
include_image_descriptionsboolInclude descriptive text for images.false
include_domainsarrayList of domains to include.-
exclude_domainsarrayList of domains to exclude.-

Extract Arguments (extract_args)

FieldTypeDescriptionDefault
urlsstringURL(s) to extract content from. Separated by commas/newlines for multiple.(Required)
include_imagesboolInclude images from extracted content.false
extract_depthstringDepth of the extraction process: basic or advanced.basic

Environment

Requires TAVILY_API_KEY to be set in the environment or in a .env file in the project root.

Example

bash
.venv/bin/python .myaaw/skills/tavily/scripts/tavily.py '{"action": "search", "search_args": {"query": "AI Agents"}}'