1 minute read

Overview

Proposed Architecture

  • Local Deep Researcher

  • SearXNG

  • n8n

Components

Local Deep Researcher

SearXNG

Logs

Setup

$ cd ~/public_git/
$ git clone https://github.com/langchain-ai/local-deep-researcher.git
$ cd local-deep-researcher/
$ cp .env.example .env

$ uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev

(When debugging in the home network:)
$ uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --host 0.0.0.0

We have seen

(similar issue: https://community.openai.com/t/error-making-localhost-plugin-http-call-typeerror-failed-to-fetch/225524/2

Setup (SearXNG)

$ mkdir -p ~/tmp/searxng/my-instance
$ cd ~/tmp/searxng/my-instance

(with modifying some)
$ docker run --rm \
             -d -p ${PORT}:8080 \
             -v "${PWD}/searxng:/etc/searxng" \
             -e "BASE_URL=http://localhost:$PORT/" \
             -e "INSTANCE_NAME=my-instance" \
             searxng/searxng

Referring SearXNGをDockerに載せてSearch API経由で検索する - https://zenn.dev/jun_philos/articles/28f137edc98cf3

(edit ls ~/tmp/searxng/my-instance/searxng/settings.yml)
$ fgrep -n3 formats: ~/tmp/searxng/my-instance/searxng/settings.yml
74-    recaptcha_SearxEngineCaptcha: 604800
75-
76-  # remove format to deny access, use lower case.
77:  # formats: [html, csv, json, rss]
78:  formats:
79-    - html
80-    - json
81-

for other configurations, searxng/searxng-docker: The docker-compose files for setting up a SearXNG instance with docker. - https://github.com/searxng/searxng-docker or other resources may help.

Setup(Integrate with n8n)

n8n-Based Chain

References


https://github.com/langchain-ai/local-deep-researcher based

https://docs.searxng.org/own-instance.html

https://riq0h.jp/2023/08/20/091355/

https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearxng/#running-a-searxng-instance

https://note.com/life_chatgpt/n/n3e873a2cc00e

r

ref

Updated: