[GH-ISSUE #31] Agent is not returning Google Programmable Search Engine Results #18

Closed
opened 2026-02-23 17:17:30 -05:00 by yindo · 6 comments
Owner

Originally created by @stewfarq on GitHub (May 23, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anythingllm-docs/issues/31

I have configured the Google Programmable Search Engine (https://programmablesearchengine.google.com/controlpanel) to obtain a new Search Engine ID. I have then scrolled down this page to the Programmatic access section and used the Get started button of the "Custom Search JSON API" to get the API key.

However, when following your web tutorial at https://www.youtube.com/watch?v=4UFrVvy7VlA (10:45) and using"@agent Can you scrape..." The agent is invoked and swaps over to chat, but then immediately the agent ends without scraping/returning its response as shown in this video.

Is there a log file to check what the error is? e.g. have I configured Google PSE correctly to initiate a web scrape request/response?

I have tried this with Anything 1.5.5 and with LM Studio 0.2.23 and Ollama 0.1.32 with llama3:8b-instruct-q8-0 model.

Originally created by @stewfarq on GitHub (May 23, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anythingllm-docs/issues/31 I have configured the Google Programmable Search Engine (https://programmablesearchengine.google.com/controlpanel) to obtain a new Search Engine ID. I have then scrolled down this page to the Programmatic access section and used the Get started button of the "Custom Search JSON API" to get the API key. However, when following your web tutorial at https://www.youtube.com/watch?v=4UFrVvy7VlA (10:45) and using"@agent Can you scrape..." The agent is invoked and swaps over to chat, but then immediately the agent ends without scraping/returning its response as shown in this video. Is there a log file to check what the error is? e.g. have I configured Google PSE correctly to initiate a web scrape request/response? I have tried this with Anything 1.5.5 and with LM Studio 0.2.23 and Ollama 0.1.32 with llama3:8b-instruct-q8-0 model.
yindo closed this issue 2026-02-23 17:17:31 -05:00
Author
Owner

@timothycarambat commented on GitHub (May 23, 2024):

Does the chat start and then just says agent session ended?

@timothycarambat commented on GitHub (May 23, 2024): Does the chat start and then just says `agent session ended`?
Author
Owner

@stewfarq commented on GitHub (May 23, 2024):

yes @timothycarambat

@stewfarq commented on GitHub (May 23, 2024): yes @timothycarambat
Author
Owner

@stewfarq commented on GitHub (May 23, 2024):

On page https://developers.google.com/custom-search/v1/introduction, this is where I Get a Key. It asks me to Create a New Project and then gives me the API key. Is this the correct process to get the correct Custom Search API key for AnythingLLM?

This API key invokes an HTTP Request with "GET https://customsearch.googleapis.com/customsearch/v1".

@stewfarq commented on GitHub (May 23, 2024): On page https://developers.google.com/custom-search/v1/introduction, this is where I Get a Key. It asks me to Create a New Project and then gives me the API key. Is this the correct process to get the correct Custom Search API key for AnythingLLM? This API key invokes an HTTP Request with "GET https://customsearch.googleapis.com/customsearch/v1".
Author
Owner

@timothycarambat commented on GitHub (May 23, 2024):

@stewfarq Yes, I do not think your issue is an invalid GoogleSearch credential. You did not fill out the issue template using a preset so I have very little context on how you are using AnythingLLM (Docker, Local, Desktop) so I cannot provide much assistance until I know those details - that is why we have those templates!

@timothycarambat commented on GitHub (May 23, 2024): @stewfarq Yes, I do not think your issue is an invalid GoogleSearch credential. You did not fill out the issue template using a preset so I have very little context on how you are using AnythingLLM (Docker, Local, Desktop) so I cannot provide much assistance until I know those details - that is why we have those templates!
Author
Owner

@stewfarq commented on GitHub (May 25, 2024):

@timothycarambat - apologies, I have not raised an issue before within github. I cannot see where the issue template is within github. Is there a URL?
I installed and use AnythingLLM on a Windows11 Pro desktop installed as a desktop application. I installed Ollama and LM Studio also as local Windows applications (without Docker). I am a UK user and use and registered with Google as a googlemail.com user.

@stewfarq commented on GitHub (May 25, 2024): @timothycarambat - apologies, I have not raised an issue before within github. I cannot see where the issue template is within github. Is there a URL? I installed and use AnythingLLM on a Windows11 Pro desktop installed as a desktop application. I installed Ollama and LM Studio also as local Windows applications (without Docker). I am a UK user and use and registered with Google as a googlemail.com user.
Author
Owner

@timothycarambat commented on GitHub (May 25, 2024):

@stewfarq I just realized this issue is on the wrong repo! It should be on https://github.com/Mintplex-Labs/anything-llm

In general, the reason that you agent may not call a function directly is due to just how agents work. Some LLMs that are less adept at tool calling can refuse to call a tool even when given instructions with explicit examples. This is why we recommend 8-bit quantized models when using OSS LLM, because they tend to be better at instruction-following.

That being said, Im going to close the issue on this repo, but we can continue the conversation in this thread. There is a way to run the application in debug mode on Windows - which will tell you what the error is most likely.

First, make sure you are on latest version (1.5.5)
Next, you can open Powershell and run C:\Users\usr\AppData\Local\Programs\anythingllm-desktop\AnythingLLMDesktop.exe

This will start the app as normal, but that terminal window will start printing out logs. Try to invoke an @agent chat and an error log should print into the window.

@timothycarambat commented on GitHub (May 25, 2024): @stewfarq I just realized this issue is on the wrong repo! It should be on https://github.com/Mintplex-Labs/anything-llm In general, the reason that you agent may not call a function directly is due to just how agents work. Some LLMs that are less adept at tool calling can refuse to call a tool even when given instructions with explicit examples. This is why we recommend `8-bit quantized` models when using OSS LLM, because they tend to be better at instruction-following. That being said, Im going to close the issue on this repo, but we can continue the conversation in this thread. There is a way to run the application in debug mode on Windows - which will tell you what the error is most likely. First, make sure you are on latest version (1.5.5) Next, you can open Powershell and run `C:\Users\usr\AppData\Local\Programs\anythingllm-desktop\AnythingLLMDesktop.exe` This will start the app as normal, but that terminal window will start printing out logs. Try to invoke an `@agent` chat and an error log should print into the window.
yindo changed title from Agent is not returning Google Programmable Search Engine Results to [GH-ISSUE #31] Agent is not returning Google Programmable Search Engine Results 2026-06-05 15:21:53 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anythingllm-docs#18