SuperAPI AI Directory

tavily-search-free

Coding & development

View repository

Updated 10-16 00:04

About this skill

Tavily Search Skill

This skill utilizes the Tavily Search API, providing clean, real-time web search results optimized for LLMs and RAG pipelines.

Execution Environment

Path Type Path Base Directory
Skill Directory ~/.pi/agent/skills/tavily-search-free/ Fixed Location
Main Script ~/.pi/agent/skills/tavily-search-free/scripts/tavily_search.py Skill Directory
Usage pi Automatically invoked or manually executed No manual execution required

Installation

cd ~/.pi/agent/skills/tavily-search-free
pip install tavily-python python-dotenv

API Key Configuration

Requires TAVILY_API_KEY. The key is already preconfigured in .env .

Usage

Method 1: Automatically invoked via pi (recommended)

pi will automatically invoke this skill to perform web searches, with no need to manually execute commands.

Method 2: Manual Execution

# 从技能目录执行
cd ~/.pi/agent/skills/tavily-search-free
python3 scripts/tavily_search.py --query "<query>" [--max-results <N>] [--search-depth <basic|advanced>]

# 或使用完整路径
cd /path/to/your/project
python3 ~/.pi/agent/skily-search-free/scripts/tavily_search.py --query "<query>"

Parameter Description

Parameter Required Default Value Description
--query Yes - Search query content
--search-depth No basic Search depth:basic or advanced(higher quality but slower)
--max-results No 10 Maximum number of returned results

Examples

# 基本搜索
python3 ~/.pi/agent/skilly-search-free/scripts/tavily_search.py --query "latest AI trends"

# 深度搜索(高级)
python3 ~/.pi/agent/skilly-search-free/scripts/tavily_search.py --query "autonomous research agents comparison" --search-depth advanced

Output Format

The script outputs in JSON format, containing a results array; each result contains:

  • url: Result link
  • title: Title
  • content: Content summary

Path Description

  • Script Location:~/.pi/agent/skills/tavily-search-free/scripts/tavily_search.py
  • Configuration Location:~/.pi/agent/skills/tavily-search-free/.env
  • Dependency Installation: Must be executed in the skill directory pip install
  • Project Context: Search results are based on the query content and are unrelated to the local project