mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
Closes the remaining gaps from PR #11562 that weren't covered by the core SearXNG integration landed in #20823. - optional-skills/research/searxng-search/ — installable skill with SKILL.md (curl-based usage, category support, Python example) and searxng.sh helper script for health checks and instance queries - website/docs/user-guide/configuration.md — SearXNG added to the Web Search Backends section (5 backends, backend table, per-capability split config example, correct search-only note) - website/docs/reference/environment-variables.md — SEARXNG_URL row - website/docs/reference/optional-skills-catalog.md — searxng-search entry The core SearXNG code, OPTIONAL_ENV_VARS, hermes tools picker, and tests were already on main via #20823. This commit is purely additive docs + the optional skill scaffold. Credits from #11562 salvage: @w4rum — original _searxng_search structure @nathansdev — tools_config.py integration @moyomartin — category support and result formatting @0xMihai — config/env var approach @nicobailon — skill and documentation structure @searxng-fan — error handling patterns @local-first — self-hosted-first philosophy and docs
22 lines
524 B
Bash
Executable file
22 lines
524 B
Bash
Executable file
#!/bin/bash
|
|
# Usage: ./searxng.sh <query> [max_results] [engines]
|
|
# Example: ./searxng.sh "python async" 10 "google,bing"
|
|
|
|
QUERY="${1:-}"
|
|
MAX="${2:-5}"
|
|
ENGINES="${3:-google,bing}"
|
|
|
|
if [ -z "$SEARXNG_URL" ]; then
|
|
echo "Error: SEARXNG_URL is not set"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$QUERY" ]; then
|
|
echo "Usage: $0 <query> [max_results] [engines]"
|
|
exit 1
|
|
fi
|
|
|
|
ENCODED_QUERY=$(echo "$QUERY" | sed 's/ /+/g')
|
|
|
|
curl -s --max-time 10 \
|
|
"${SEARXNG_URL}/search?q=${ENCODED_QUERY}&format=json&limit=${MAX}&engines=${ENGINES}"
|