deerflow2/backend/packages/harness/deerflow/community
wanxsb 44ab21fc44
feat(community): add Serper web search provider (#2630)
* feat(community): add Serper web search provider

Add a new community search provider backed by the Serper Google Search
API (https://serper.dev). Serper returns real-time Google results via a
simple JSON API and requires only an API key — no extra Python package.

Changes:
- backend/packages/harness/deerflow/community/serper/__init__.py
- backend/packages/harness/deerflow/community/serper/tools.py
  Implements web_search_tool using httpx (already a project dependency).
  API key is read from config.yaml `api_key` field or SERPER_API_KEY env var.
  Follows the same interface / output shape as the existing ddg_search provider.
  Exposes max_results parameter (default 5) with config override logic.
- backend/tests/test_serper_tools.py
  Unit tests covering API key resolution, config overrides, HTTP errors,
  empty results, and parameter passing.
- config.example.yaml: add commented-out Serper example alongside other providers
- .env.example: add SERPER_API_KEY placeholder

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix the lint error

* Fix the lint error

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-05-02 16:22:35 +08:00
..
aio_sandbox fix(sandbox): pass no_change_timeout to exec_command to prevent 120s premature termination (#2685) 2026-05-01 22:27:02 +08:00
ddg_search Implement DuckDuckGo search (#1432) 2026-03-27 09:20:22 +08:00
exa feat(community): add Exa search as community tool provider (#1357) 2026-04-08 17:13:39 +08:00
firecrawl feat(dx): Setup Wizard + doctor command — closes #2030 (#2034) 2026-04-10 17:43:39 +08:00
image_search refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
infoquest feat(harness): integration ACP agent tool (#1344) 2026-03-26 14:20:18 +08:00
jina_ai fix(jina): log transient failures at WARNING without traceback (#2484) (#2485) 2026-04-24 16:00:14 +08:00
serper feat(community): add Serper web search provider (#2630) 2026-05-02 16:22:35 +08:00
tavily refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00