Motivation
The agent cannot search the web. For current events, documentation lookups, or finding information beyond its training data, the agent is completely blind. WebFetchTool handles fetching specific URLs, but the agent also needs the ability to discover URLs via search.
What the tool should do
Search the web using a query and return structured results (title, URL, snippet).
Reference implementations
opencode (TypeScript)
- Providers: Exa, Parallel (via MCP JSON-RPC)
- Parameters: query, numResults (max 20), livecrawl, type (auto/fast/deep)
- 25 second timeout per provider
hermes-agent (Python)
- Providers: Tavily, Exa, Parallel, Firecrawl, SearXNG, Brave Free, DuckDuckGo, xAI
- Auto-detected from config/env vars
- Parameters: query, limit (default 5, max 100)
openclaw (TypeScript)
- Providers: Brave, Perplexity, DuckDuckGo, Google, xAI/Grok, SearXNG, Moonshot/Kimi, MiniMax, Ollama
- Parameters: query, count, country, language, freshness, date_after, date_before, domain_filter
Requirements
- Pluggable providers - Support multiple search backends, configured at build/runtime
- Recommended default - DuckDuckGo (free, no API key) as the default
- Structured results - Return list of {title, url, snippet}
- Result count - Configurable (default 5, max 20)
- Timeout - Configurable (default 15s)
- SSRF protection - Same as WebFetchTool
Suggested location
client/runtime/src/main/java/dev/omatheusmesmo/qlawkus/tool/web/WebSearchTool.java
Config properties
qlawkus.web.search.enabled (boolean, default true)
qlawkus.web.search.provider (string: duckduckgo | brave | tavily | exa)
qlawkus.web.search.api-key (string, optional - not needed for DuckDuckGo)
qlawkus.web.search.max-results (int, default 5)
qlawkus.web.search.timeout (Duration, default 15s)
Motivation
The agent cannot search the web. For current events, documentation lookups, or finding information beyond its training data, the agent is completely blind. WebFetchTool handles fetching specific URLs, but the agent also needs the ability to discover URLs via search.
What the tool should do
Search the web using a query and return structured results (title, URL, snippet).
Reference implementations
opencode (TypeScript)
hermes-agent (Python)
openclaw (TypeScript)
Requirements
Suggested location
client/runtime/src/main/java/dev/omatheusmesmo/qlawkus/tool/web/WebSearchTool.javaConfig properties
qlawkus.web.search.enabled(boolean, default true)qlawkus.web.search.provider(string: duckduckgo | brave | tavily | exa)qlawkus.web.search.api-key(string, optional - not needed for DuckDuckGo)qlawkus.web.search.max-results(int, default 5)qlawkus.web.search.timeout(Duration, default 15s)