#13334: add local SearxNG integration for free unlimited web search
docs
docker
agents
Cluster:
Web Search Provider Integrations
## 🚀 Description
This PR integrates a self-hosted **SearxNG** instance into the local development environment via Docker Compose. This provides the AI agent with "free and unlimited" web search capabilities, removing the dependency on paid external APIs (like Brave or Perplexity) and enhancing privacy.
## 🛠️ Changes
- **Infrastructure**:
- Added `searxng` service to [docker-compose.yml](cci:7://file:///c:/one/openclaw/docker-compose.yml:0:0-0:0) (exposed on port `8080`).
- Added `redis` service (required dependency for SearxNG).
- Updated `openclaw-gateway` and `openclaw-cli` services to build from local source (`build: .`) to ensure compatibility with the local network stack.
- **Documentation**:
- Added [docs/searxng_guide.md](cci:7://file:///c:/one/openclaw/docs/searxng_guide.md:0:0-0:0) detailing architecture, setup, and troubleshooting.
- **Configuration**:
- Added [config/config.json](cci:7://file:///c:/one/openclaw/config/config.json:0:0-0:0) with default settings pointing to the local SearxNG instance (`http://searxng:8080`).
## 🧪 Testing
- [x] Ran `docker-compose up -d --build` successfully.
- [x] Verified `searxng` container is running and accessible at `http://localhost:8080`.
- [x] Verified `redis` container is running.
- [x] Verified `openclaw-gateway` can resolve the `searxng` host internally.
## 📝 Checklist
- [x] I have updated the documentation accordingly.
- [x] My changes generate no new warnings.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `searxng` web search provider to the `web_search` tool (including config schema updates and unit tests), and introduces local Docker Compose services intended to run a self-hosted SearxNG instance (plus Redis) for development.
Key integration points:
- `src/agents/tools/web-search.ts` now supports `provider: "searxng"` and calls a `/search?format=json` endpoint on the configured `tools.web.search.searxng.baseUrl`.
- `src/config/zod-schema.agent-runtime.ts` extends `ToolsWebSearchSchema` to allow `provider: "searxng"` and a `searxng.baseUrl` config block.
- `docker-compose.yml` adds `searxng` and `redis` services.
Must-fix issues before merge:
- The SearxNG cache key does not include `count`, so cached results can be returned with the wrong size when callers vary `count` for the same query/baseUrl.
- The Docker Compose Redis service is not wired into SearxNG (no dependency/config), so the documented architecture doesn’t match what will actually run.
- `config/config.json` appears to be a repo-local config file that is not loaded by the runtime config loader, so it is likely unused and confusing.
- The new test includes misleading comments about schema strictness that no longer apply after the schema update.
<h3>Confidence Score: 3/5</h3>
- This PR is close, but has a few correctness/integration issues to address before merging.
- The SearxNG provider implementation is generally straightforward, but the cache key omission for `count` can return incorrect results, and the Docker Compose stack adds Redis without wiring it into SearxNG (mismatch with docs/intent). There is also a repo-local config file that is likely unused by the actual config loader and may confuse users.
- src/agents/tools/web-search.ts, docker-compose.yml, config/config.json, src/config/config.web-search-provider.test.ts
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#22626: feat(search): add support for SearXNG as a search provider
by sarveshgandhi · 2026-02-21
84.4%
#13665: feat(web-search): add SearXNG as a search provider
by sfo2001 · 2026-02-10
83.4%
#16895: feat(web-search): add SearXNG as a search provider
by rustyorb · 2026-02-15
82.7%
#12304: feat: add DeSearch as web_search provider
by tatjr13 · 2026-02-09
76.9%
#13814: feat(web-search): add ZAI Search (zsearch) provider
by strelov1 · 2026-02-11
76.7%
#13370: Tools: rewrite Grok parser, add Tavily provider, multi-provider con...
by a-anand-91119 · 2026-02-10
75.9%
#11553: feat(docker): add sandbox browser service and documentation
by dangphdh · 2026-02-08
74.9%
#22505: Feature/clean grok search base url
by vacuityv · 2026-02-21
74.6%
#14788: feat: Add DuckDuckGo search provider with Tor support
by emadomedher · 2026-02-12
74.0%
#9337: fix: correct GLM MCP web-search-prime API parameter name and respon...
by shoa-lin · 2026-02-05
74.0%