Experimenting with a Self-Hosted Deep Research Agent (n8n + SearXNG + Gemini 2.0)

I tried replicating this n8n deep research template but made some modifications to cut costs and improve flexibility:

  • Cheaper Model: Used Gemini-2.0-Flash-Thinking-Exp instead of OpenAI o3.
  • Self-Hosted Search: Integrated SearXNG to enable an “Academic” search function.

Info of my setup: Blog post

You can try the demo yourself here: Research form

Outputs & Observations

Conclusion

This is still an ongoing experiment, mainly focused on switching to a cheaper model while maintaining research quality. Not everything is fact-checked yet, and there are formatting issues to fix.

Would love to hear your thoughts! Let’s discuss.


EDITED: I encountered numerous rate limit errors with this experimental deep research tool yesterday. To address this, I attempted to add more Gemini API keys for load balancing, hoping it would help mitigate the issue.

1 Like

Hi @TAN_YONG_SHENG great project!
I’m curious, you’re talking about Self-Hosted Search with SearXNG, were you able to implement it and if yes how did you do it? (I’m running a searxng instance)
Are you using a community node like n8n-nodes-searxng?
I thought it was not working, I did try as well.
I would greatly appreciate more details!
Thank you for keeping me posted :+1:t2:

Hi @headset907, thanks for your compliment. No, I just use http node to send request to my localhost searxng instance.

For example,

curl -X GET "http://localhost:8080/search?q=heart+disease&format=json"

Here is the set up of my searxng instance: https://www.tanyongsheng.com/note/setting-up-searxng-on-windows-localhost-your-private-customizable-search-engine/

1 Like

ah ok I understand, that’s great! thanks a lot man!