llm-tools-searxng
skill
SearXNG tool plugin for https://llm.datasette.io/
README.md
llm-tools-searxng
A tool to search the web using SearXNG search engines.
Installation
Install this plugin in the same environment as LLM.
llm install llm-tools-searxng
Configuration
By default, the tool does not have a default SearXNG URL set. You can configure it in one of two ways:
Using environment variables
export SEARXNG_URL=https://your-searxng-instance.com
export SEARXNG_METHOD=GET # or POST (default)
Using LLM's built-in key management
llm keys set searxng_url --value https://your-searxng-instance.com
Note: Public SearXNG instances typically don't allow API access or JSON output.
Usage
Simple search function
Use the searxng_search function for basic web searches:
llm --tool searxng_search "latest developments in AI" --tools-debug
With LLM chat
This plugin works well with llm chat:
llm chat --tool searxng_search --tools-debug
Python API usage
import llm
from llm_tools_searxng import SearXNG, searxng_search
# Using the simple function
model = llm.get_model("gpt-4.1-mini")
result = model.chain(
"What are the latest developments in renewable energy?",
tools=[searxng_search]
).text()
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-tools-searxng
uv sync --all-extras
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
uv run python -m pytest
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found