[GH-ISSUE #5355] [BUG]: AnythingLLM Agent web search returns unrelated “query” results when using SearXNG #5040

Closed
opened 2026-06-05 14:51:40 -04:00 by yindo · 6 comments
Owner

Originally created by @PikkonMG on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5355

How are you running AnythingLLM?

Docker (local)

What happened?

I’m running AnythingLLM with SearXNG for web search. When using @agent to search for current news, the results returned inside AnythingLLM are incorrect and unrelated.

For example, I asked:

@agent search the web for Iran news from today and summarize the top 5 developments

The agent shows it is searching for:

Iran news today

But the sources returned are things like:

dictionary definitions of “query”
Wikipedia page for “query”
programming-related pages

I tested the same query directly against SearXNG

curl "http:///search?q=iran+news+today&format=json" and it returns normal Iran-news results, and searching in the SearXNG UI also works. That strongly suggests the issue is not SearXNG itself, but the AnythingLLM @agent web-browsing pipeline after the query is sent.

In short:

  • SearXNG query works
  • SearXNG results are relevant
  • AnythingLLM surfaces unrelated “query” pages

So this looks like an AnythingLLM web-browsing integration/parsing bug rather than a bad SearXNG setup.

Image

Are there known steps to reproduce?

No response

Originally created by @PikkonMG on GitHub (Apr 5, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5355 ### How are you running AnythingLLM? Docker (local) ### What happened? I’m running AnythingLLM with SearXNG for web search. When using @agent to search for current news, the results returned inside AnythingLLM are incorrect and unrelated. For example, I asked: @agent search the web for Iran news from today and summarize the top 5 developments The agent shows it is searching for: Iran news today But the sources returned are things like: dictionary definitions of “query” Wikipedia page for “query” programming-related pages I tested the same query directly against SearXNG curl "http://<searxng>/search?q=iran+news+today&format=json" and it returns normal Iran-news results, and searching in the SearXNG UI also works. That strongly suggests the issue is not SearXNG itself, but the AnythingLLM `@agent` web-browsing pipeline after the query is sent. In short: * SearXNG query works * SearXNG results are relevant * AnythingLLM surfaces unrelated “query” pages So this looks like an AnythingLLM web-browsing integration/parsing bug rather than a bad SearXNG setup. <img width="2897" height="1935" alt="Image" src="https://github.com/user-attachments/assets/86c28632-da51-45b3-970a-57488605eee2" /> ### Are there known steps to reproduce? _No response_
yindo added the possible bugneeds info / can't replicate labels 2026-06-05 14:51:40 -04:00
yindo closed this issue 2026-06-05 14:51:40 -04:00
Author
Owner

@timothycarambat commented on GitHub (Apr 6, 2026):

Interesting, it is like it search the term "Query" instead of the context?

<!-- gh-comment-id:4193116662 --> @timothycarambat commented on GitHub (Apr 6, 2026): Interesting, it is like it search the term "Query" instead of the context?
Author
Owner

@PikkonMG commented on GitHub (Apr 6, 2026):

Yep that's what it's appears to be doing

<!-- gh-comment-id:4193152829 --> @PikkonMG commented on GitHub (Apr 6, 2026): Yep that's what it's appears to be doing
Author
Owner

@timothycarambat commented on GitHub (Apr 6, 2026):

Just pulled latest SearXNG and enabled json in the formats in the YAML.

Using Ollama with native tool calling
Image

Forcefully disabled native tool calling to debug if the legacy tool call wrapper was causing this issue:
Image

Do you see anything specific in the logs? You should see a log like

 [AgentHandler] [debug]: @agent is attempting to call `web-browsing` tool {
[0]   "query": "Iran news top 5 articles summary"
[0] }

query is passed in here from the handler so I cannot replicate this right now

<!-- gh-comment-id:4193213353 --> @timothycarambat commented on GitHub (Apr 6, 2026): Just pulled latest SearXNG and enabled `json` in the formats in the YAML. Using Ollama with native tool calling <img width="1727" height="867" alt="Image" src="https://github.com/user-attachments/assets/9ac277fd-8b8d-4236-87a4-a692789847be" /> Forcefully disabled native tool calling to debug if the legacy tool call wrapper was causing this issue: <img width="1715" height="858" alt="Image" src="https://github.com/user-attachments/assets/5ea26f48-1365-4414-a239-55b1f875941a" /> Do you see anything specific in the logs? You should see a log like ``` [AgentHandler] [debug]: @agent is attempting to call `web-browsing` tool { [0] "query": "Iran news top 5 articles summary" [0] } ``` query is passed in [here](http://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/plugins/web-browsing.js) from the [handler](https://github.com/Mintplex-Labs/anything-llm/blob/master/server/utils/agents/aibitat/plugins/web-browsing.js#L51) so I cannot replicate this right now
Author
Owner

@timothycarambat commented on GitHub (Apr 6, 2026):

Additional Questions:

  • How are you running gemma 4?
  • What docker tag are you on or is this a custom build image on your fork?
  • I just pulled our latest and got the same results as well with SearXNG running in another container on host connected via docker.host.internal:PORT
<!-- gh-comment-id:4193235741 --> @timothycarambat commented on GitHub (Apr 6, 2026): Additional Questions: - How are you running gemma 4? - What docker tag are you on or is this a custom build image on your fork? - I just pulled our `latest` and got the same results as well with SearXNG running in another container on host connected via `docker.host.internal:PORT`
Author
Owner

@PikkonMG commented on GitHub (Apr 6, 2026):

Running via ollama and anythingllm latest tag with docker via unraid ca template I can post logs when I get home

<!-- gh-comment-id:4193251468 --> @PikkonMG commented on GitHub (Apr 6, 2026): Running via ollama and anythingllm latest tag with docker via unraid ca template I can post logs when I get home
Author
Owner

@PikkonMG commented on GitHub (Apr 6, 2026):

Got it fixed was user error. One thing to note 2 other tools I use Open WebUI and Nexus will have like 5-8 search results with llink and anythingllm might have 30-60 depending on what I search with same terms. Probably nothing though

<!-- gh-comment-id:4194777642 --> @PikkonMG commented on GitHub (Apr 6, 2026): Got it fixed was user error. One thing to note 2 other tools I use Open WebUI and Nexus will have like 5-8 search results with llink and anythingllm might have 30-60 depending on what I search with same terms. Probably nothing though
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5040