Skip to content

feat: Add SearXNG self-hosted web search backend#2572

Closed
bhovig wants to merge 1 commit into
NousResearch:mainfrom
bhovig:searxng-integration
Closed

feat: Add SearXNG self-hosted web search backend#2572
bhovig wants to merge 1 commit into
NousResearch:mainfrom
bhovig:searxng-integration

Conversation

@bhovig

@bhovig bhovig commented Mar 23, 2026

Copy link
Copy Markdown

What This Does

Adds SearXNG as a self-hosted, privacy-respecting web search backend for Hermes Agent.

Motivation

Many users want self-hosted search infrastructure with:

  • No API keys required
  • No rate limits or per-search costs
  • Full data sovereignty and privacy
  • Aggregation from multiple search engines (Google, Bing, DuckDuckGo, etc.)

Changes

  • tools/web_tools.py (+54 lines): SearXNG client implementation

    • _get_searxng_url() - Reads SEARXNG_URL from env
    • _searxng_search() - Searches via SearXNG API
    • Backend selection logic updated
    • Dispatch added to web_search_tool
  • website/docs/user-guide/configuration.md (+29 lines): Documentation

    • Added to optional API keys table
    • Setup instructions with Docker example
    • Configuration guide

Testing

✅ Tested and working with self-hosted SearXNG instance at https://searxng.duckbill-eagle.ts.net/
✅ Auto-detects SEARXNG_URL environment variable
✅ Returns results in standard format compatible with existing tools
✅ Fallback to other backends if SearXNG unavailable

Setup

# Add to ~/.hermes/.env
SEARXNG_URL=https://searxng.example.com/

# No config.yaml changes needed - auto-detects!

Implementation Notes

  • Follows existing patterns (Tavily, Parallel backends)
  • No breaking changes - purely additive
  • Clean separation of concerns
  • Proper error handling and logging
  • Well-documented with examples

- Add SearXNG client functions (_get_searxng_url, _searxng_search)
- Update backend selection logic to support 'searxng' backend
- Add SearXNG dispatch to web_search_tool
- Support SEARXNG_URL environment variable for instance configuration
- Normalize SearXNG results to standard web search format
- Add documentation with setup instructions and Docker example
- Enable self-hosted, privacy-respecting web searches with no API costs

Closes: Self-hosted search infrastructure for users wanting data sovereignty
@bhovig bhovig force-pushed the searxng-integration branch from a935573 to 18d14f9 Compare April 3, 2026 05:12
kshitijk4poor pushed a commit that referenced this pull request Apr 17, 2026
Adds SearXNG (https://docs.searxng.org) as a self-hosted, privacy-first
web search backend alongside Firecrawl, Tavily, Exa, and Parallel.

SearXNG is a meta-search engine that aggregates results from 70+ search
engines. No API key needed -- just set SEARXNG_URL to your instance.

Changes:
- tools/web_tools.py: _get_searxng_url(), _searxng_search(), search
  dispatch, extract falls back to Firecrawl (SearXNG is search-only)
- hermes_cli/tools_config.py: SearXNG provider in web tool picker
- hermes_cli/config.py: SEARXNG_URL env var, diagnostics, set command
- tests/tools/test_web_tools_searxng.py: 15 tests
- optional-skills/research/searxng-search/: agent-guided skill
- Docs: configuration.md, environment-variables.md, skills catalogs

Based on #6071 by @gnanam1990, #8106 by @cro, #2572 by @bhovig,
#2710 and #9961 by @StreamOfRon, #7258 by @coldxiangyu163
@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Merged via PR #11562 which consolidates SearXNG integration from multiple community PRs. Your config/env var approach informed the final implementation. Thank you for the contribution!

venyon2k pushed a commit to venyon2k/hermes-agent that referenced this pull request May 3, 2026
Adds SearXNG (https://docs.searxng.org) as a self-hosted, privacy-first
web search backend alongside Firecrawl, Tavily, Exa, and Parallel.

SearXNG is a meta-search engine that aggregates results from 70+ search
engines. No API key needed -- just set SEARXNG_URL to your instance.

Changes:
- tools/web_tools.py: _get_searxng_url(), _searxng_search(), search
  dispatch, extract falls back to Firecrawl (SearXNG is search-only)
- hermes_cli/tools_config.py: SearXNG provider in web tool picker
- hermes_cli/config.py: SEARXNG_URL env var, diagnostics, set command
- tests/tools/test_web_tools_searxng.py: 15 tests
- optional-skills/research/searxng-search/: agent-guided skill
- Docs: configuration.md, environment-variables.md, skills catalogs

Based on NousResearch#6071 by @gnanam1990, NousResearch#8106 by @cro, NousResearch#2572 by @bhovig,
BestJoester pushed a commit to BestJoester/hermes-agent that referenced this pull request May 8, 2026
Adds SearXNG (https://docs.searxng.org) as a self-hosted, privacy-first
web search backend alongside Firecrawl, Tavily, Exa, and Parallel.

SearXNG is a meta-search engine that aggregates results from 70+ search
engines. No API key needed -- just set SEARXNG_URL to your instance.

Changes:
- tools/web_tools.py: _get_searxng_url(), _searxng_search(), search
  dispatch, extract falls back to Firecrawl (SearXNG is search-only)
- hermes_cli/tools_config.py: SearXNG provider in web tool picker
- hermes_cli/config.py: SEARXNG_URL env var, diagnostics, set command
- tests/tools/test_web_tools_searxng.py: 15 tests
- optional-skills/research/searxng-search/: agent-guided skill
- Docs: configuration.md, environment-variables.md, skills catalogs

Based on NousResearch#6071 by @gnanam1990, NousResearch#8106 by @cro, NousResearch#2572 by @bhovig,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants