A comprehensive demo showcasing how to integrate SearxNG with LangChain in a production-ready environment. This demo includes Docker containerization, Nginx reverse proxy, rate limiting, and proper security configurations.
- Docker and Docker Compose
- Python 3.11+ (for local development)
- OpenAI API key
uv
package manager (for local development)
-
Clone the repository:
git clone https://github.com/yourusername/searxng-langchain-demo.git cd searxng-langchain-demo
-
Configure environment variables:
cp .env.example .env # Edit .env with your OpenAI API key and other settings
-
Start the services:
docker compose up -d
The services will be available at:
- SearxNG web and api: http://127.0.0.1:8080
- Searxng health check: http://127.0.0.1:8080/healthz
- Nginx (main entry point): http://127.0.0.1:8080
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Create virtual environment:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
uv pip install -e .
-
Replace the .env.example with your actual environment variables:
cp .env.example .env # Edit .env with your OpenAI API key and other settings
- The demo includes a simple LangChain flow that uses SearxNG as a search tool.