[GH-ISSUE #2420] [BUG]: Once an agent is called, the session never answers another chat. #1571

Closed
opened 2026-02-22 18:25:28 -05:00 by yindo · 6 comments
Owner

Originally created by @gcleaves on GitHub (Oct 4, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2420

How are you running AnythingLLM?

AnythingLLM desktop v1.6.7 Mac M1

What happened?

If I type @agent and then a prompt, AnythingLLM never answers me again. I must quit the app.

  • Mac M1
  • AnythingLLM provider
  • Llama 3.1 8B
  • Workspace Agent model: llama3.1:latest
  • Agent skill: only default

Are there known steps to reproduce?

  • Start new thread. Say "hello" just to ensure the LLM responds.
  • type @agent list-documents
    • system responds with Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early.
  • Type anything at all. No response, ever.
  • Type /exit
    • system responds with Agent session complete.
  • Type anything at all. No response, ever.
  • Quit app
  • Start new thread. Say "hello" just to ensure the LLM responds.
  • etc.
Originally created by @gcleaves on GitHub (Oct 4, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2420 ### How are you running AnythingLLM? AnythingLLM desktop v1.6.7 Mac M1 ### What happened? If I type @agent and then a prompt, AnythingLLM never answers me again. I must quit the app. - Mac M1 - AnythingLLM provider - Llama 3.1 8B - Workspace Agent model: llama3.1:latest - Agent skill: only default ### Are there known steps to reproduce? - Start new thread. Say "hello" just to ensure the LLM responds. - type `@agent list-documents` - system responds with `Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early.` - Type anything at all. No response, ever. - Type `/exit` - system responds with `Agent session complete.` - Type anything at all. No response, ever. - Quit app - Start new thread. Say "hello" just to ensure the LLM responds. - etc.
yindo added the possible bug label 2026-02-22 18:25:28 -05:00
yindo closed this issue 2026-02-22 18:25:28 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 4, 2024):

Cannot replicate this on an M1
Can you pull logs? https://docs.anythingllm.com/installation-desktop/debug

Closing until we can replicate as this almost always is client side and not a code related bug

@timothycarambat commented on GitHub (Oct 4, 2024): Cannot replicate this on an M1 Can you pull logs? https://docs.anythingllm.com/installation-desktop/debug Closing until we can replicate as this almost _always_ is client side and not a code related bug
Author
Owner

@gcleaves commented on GitHub (Oct 5, 2024):

Here are the logs. While I certainly agree it could be a client side problem, any help would be appreciated. What am I doing wrong?

image
[backend] info: [TELEMETRY SENT] {"event":"sent_chat","distinctId":"e099eb43-d0ed-4913-9dbd-04d4ddae3d03","properties":{"multiUserMode":false,"LLMSelection":"anythingllm_ollama","Embedder":"native","VectorDbSelection":"lancedb","multiModal":false,"TTSSelection":"native","runtime":"desktop"}}
[backend] info: [Event Logged] - sent_chat
[backend] info: [AgentHandler] Start 2256fb7a-e852-45dc-b250-ab4229eb38a0::anythingllm_ollama:mistral:latest
[backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"e099eb43-d0ed-4913-9dbd-04d4ddae3d03","properties":{"runtime":"desktop"}}
[backend] info: [AgentHandler] Attached websocket plugin to Agent cluster
[backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster
[backend] info: [AgentHandler] Attaching user and default agent to Agent cluster.
[backend] info: [AgentHandler] Attached rag-memory plugin to Agent cluster
[backend] info: [AgentHandler] Attached document-summarizer plugin to Agent cluster
[backend] info: [AgentHandler] Attached web-scraping plugin to Agent cluster
[backend] info: [AgentLLM - mistral:latest] Invalid function tool call: Missing name or arguments in function call..
[backend] info: [AgentLLM - mistral:latest] Will assume chat completion without tool call inputs.

Then after a long period:

[backend] error: fetch failed TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11457:11)
    at async post (/Applications/AnythingLLM.app/Contents/Resources/backend/node_modules/ollama/dist/shared/ollama.9c897541.cjs:114:20)
    at async Ollama.processStreamableRequest (/Applications/AnythingLLM.app/Contents/Resources/backend/node_modules/ollama/dist/shared/ollama.9c897541.cjs:253:22)
    at async Ma.complete (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:3861)
    at async Va.handleExecution (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:241:406)
    at async Va.reply (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:241:274)
    at async Va.chat (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:22147)
    at async Va.start (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:21581)
    at async /Applications/AnythingLLM.app/Contents/Resources/backend/server.js:264:17940
[backend] info: [AgentHandler] End 2256fb7a-e852-45dc-b250-ab4229eb38a0::anythingllm_ollama:mistral:latest

There were no concerning logs during the application launch, only INFO level output.

Thanks!

@gcleaves commented on GitHub (Oct 5, 2024): Here are the logs. While I certainly agree it could be a client side problem, any help would be appreciated. What am I doing wrong? <img width="636" alt="image" src="https://github.com/user-attachments/assets/d09e7c47-006a-4026-a976-64803e3a1740"> ``` [backend] info: [TELEMETRY SENT] {"event":"sent_chat","distinctId":"e099eb43-d0ed-4913-9dbd-04d4ddae3d03","properties":{"multiUserMode":false,"LLMSelection":"anythingllm_ollama","Embedder":"native","VectorDbSelection":"lancedb","multiModal":false,"TTSSelection":"native","runtime":"desktop"}} [backend] info: [Event Logged] - sent_chat [backend] info: [AgentHandler] Start 2256fb7a-e852-45dc-b250-ab4229eb38a0::anythingllm_ollama:mistral:latest [backend] info: [TELEMETRY SENT] {"event":"agent_chat_started","distinctId":"e099eb43-d0ed-4913-9dbd-04d4ddae3d03","properties":{"runtime":"desktop"}} [backend] info: [AgentHandler] Attached websocket plugin to Agent cluster [backend] info: [AgentHandler] Attached chat-history plugin to Agent cluster [backend] info: [AgentHandler] Attaching user and default agent to Agent cluster. [backend] info: [AgentHandler] Attached rag-memory plugin to Agent cluster [backend] info: [AgentHandler] Attached document-summarizer plugin to Agent cluster [backend] info: [AgentHandler] Attached web-scraping plugin to Agent cluster [backend] info: [AgentLLM - mistral:latest] Invalid function tool call: Missing name or arguments in function call.. [backend] info: [AgentLLM - mistral:latest] Will assume chat completion without tool call inputs. ``` Then after a long period: ``` [backend] error: fetch failed TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11457:11) at async post (/Applications/AnythingLLM.app/Contents/Resources/backend/node_modules/ollama/dist/shared/ollama.9c897541.cjs:114:20) at async Ollama.processStreamableRequest (/Applications/AnythingLLM.app/Contents/Resources/backend/node_modules/ollama/dist/shared/ollama.9c897541.cjs:253:22) at async Ma.complete (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:3861) at async Va.handleExecution (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:241:406) at async Va.reply (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:241:274) at async Va.chat (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:22147) at async Va.start (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:222:21581) at async /Applications/AnythingLLM.app/Contents/Resources/backend/server.js:264:17940 [backend] info: [AgentHandler] End 2256fb7a-e852-45dc-b250-ab4229eb38a0::anythingllm_ollama:mistral:latest ``` There were no concerning logs during the application launch, only INFO level output. Thanks!
Author
Owner

@timothycarambat commented on GitHub (Oct 7, 2024):

Then after a long period:

How long? It sounds like the ollama client is timing out or running OOM. What is your RAM on the M1 machine? The Mistral 7B model is not massive but you could have insufficient ram for the models you have tried thus far.

I know there are 8GB RAM M1 Macbooks floating around in the market and they are no match for these LLMS that are 5-7B in size.

@timothycarambat commented on GitHub (Oct 7, 2024): > Then after a long period: How long? It sounds like the ollama client is timing out or running OOM. What is your RAM on the M1 machine? The Mistral 7B model is not _massive_ but you could have insufficient ram for the models you have tried thus far. I know there are 8GB RAM M1 Macbooks floating around in the market and they are no match for these LLMS that are 5-7B in size.
Author
Owner

@gcleaves commented on GitHub (Oct 8, 2024):

My Mac has 16GB of RAM. The timeout occurs after about 2 minutes. I'll keep poking around to see if I discover anything and report back. Thanks for following up.

@gcleaves commented on GitHub (Oct 8, 2024): My Mac has 16GB of RAM. The timeout occurs after about 2 minutes. I'll keep poking around to see if I discover anything and report back. Thanks for following up.
Author
Owner

@timothycarambat commented on GitHub (Oct 9, 2024):

When you send an agent chat you should be seeing some /POST requests in the ollama server - do you see anything at all? Might be help to see what is going on in Ollama causing such a delay. Generating the requests and such is usually very fast and we spend the most time waiting on LLM responses

@timothycarambat commented on GitHub (Oct 9, 2024): When you send an agent chat you should be seeing some `/POST` requests in the ollama server - do you see anything at all? Might be help to see what is going on in Ollama causing such a delay. Generating the requests and such is usually very fast and we spend the most time waiting on LLM responses
Author
Owner

@sprathod369 commented on GitHub (Oct 17, 2024):

I have the exact same issue reported by @gcleaves. I'm running the latest 1.2.3 version of anythingllm using docker. I also have ollama running as docker on the same VM. I'm using the following model llama3.1:8b-instruct-q8_0 and mistral:7b-instruct-q8_0. My machine is Ubuntu 22x with 4CPU, 16GB RAM config.
@timothycarambat - It seems this agent issue is ad-hoc and I'm not sure why it has stopped working suddenly. Is there a better lightweight local LLM model you recommend that can work seamlessly to test agents?
The following are the subset of my docker logs for reference

[backend] info: [AgentHandler] Attached save-file-to-browser plugin to Agent cluster
[backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster
[backend] info: [AgentLLM - mistral:7b-instruct-q8_0] Invalid function tool call: Missing name or arguments in function call..
[backend] info: [AgentLLM - mistral:7b-instruct-q8_0] Will assume chat completion without tool call inputs.
[backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"e8da662b-8ee7-42b2-b469-85077ee8c2c0","properties":{"runtime":"docker"}} 
@sprathod369 commented on GitHub (Oct 17, 2024): I have the exact same issue reported by @gcleaves. I'm running the latest 1.2.3 version of anythingllm using docker. I also have ollama running as docker on the same VM. I'm using the following model llama3.1:8b-instruct-q8_0 and mistral:7b-instruct-q8_0. My machine is Ubuntu 22x with 4CPU, 16GB RAM config. @timothycarambat - It seems this agent issue is ad-hoc and I'm not sure why it has stopped working suddenly. Is there a better lightweight local LLM model you recommend that can work seamlessly to test agents? The following are the subset of my docker logs for reference ``` [backend] info: [AgentHandler] Attached save-file-to-browser plugin to Agent cluster [backend] info: [AgentHandler] Attached create-chart plugin to Agent cluster [backend] info: [AgentLLM - mistral:7b-instruct-q8_0] Invalid function tool call: Missing name or arguments in function call.. [backend] info: [AgentLLM - mistral:7b-instruct-q8_0] Will assume chat completion without tool call inputs. [backend] info: [TELEMETRY SENT] {"event":"agent_chat_sent","distinctId":"e8da662b-8ee7-42b2-b469-85077ee8c2c0","properties":{"runtime":"docker"}} ```
yindo changed title from [BUG]: Once an agent is called, the session never answers another chat. to [GH-ISSUE #2420] [BUG]: Once an agent is called, the session never answers another chat. 2026-06-05 14:41:29 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1571