feat(tools): add web_search_tool for internet search

Add native web search capability that works regardless of LLM tool-calling
support. This is particularly useful for GLM models via Z.AI that don't
reliably support standard tool calling formats.

Features:
- DuckDuckGo provider (free, no API key required)
- Brave Search provider (optional, requires API key)
- Configurable max results and timeout
- Enabled by default

Configuration (config.toml):
  [web_search]
  enabled = true
  provider = "duckduckgo"
  max_results = 5

The tool allows agents to search the web for current information without
requiring proper tool calling support from the LLM.

Also includes CI workflow fix for first-interaction action inputs.
This commit is contained in:
adisusilayasa 2026-02-18 14:40:46 +08:00 committed by Chummy
parent f3bdff1d69
commit 1757add64a
9 changed files with 394 additions and 4 deletions

View file

@ -81,3 +81,16 @@ PROVIDER=openrouter
#
# Common models: glm-5, glm-4.7, glm-4-plus, glm-4-flash
# See docs/zai-glm-setup.md for detailed configuration.
# ── Web Search ────────────────────────────────────────────────
# Web search tool for finding information on the internet.
# Enabled by default with DuckDuckGo (free, no API key required).
#
# WEB_SEARCH_ENABLED=true
# WEB_SEARCH_PROVIDER=duckduckgo
# WEB_SEARCH_MAX_RESULTS=5
# WEB_SEARCH_TIMEOUT_SECS=15
#
# Optional: Brave Search (requires API key from https://brave.com/search/api)
# WEB_SEARCH_PROVIDER=brave
# BRAVE_API_KEY=your-brave-search-api-key