[GH-ISSUE #3544] [BUG]: The flows using the API are not working. #2286

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

Originally created by @DavidGil-dagg on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3544

What happened?

I have created a flow that works perfectly in the anythingllm interface, but when I try to send the same prompt via the localhost:3001 chat workspace API, my flow doesn't work and the AI responds: 'Unfortunately, I had trouble carrying out the operation. flow trigger in API dont work?

Originally created by @DavidGil-dagg on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3544 ### What happened? I have created a flow that works perfectly in the anythingllm interface, but when I try to send the same prompt via the localhost:3001 chat workspace API, my flow doesn't work and the AI responds: 'Unfortunately, I had trouble carrying out the operation. flow trigger in API dont work?
yindo added the possible bug label 2026-02-22 18:28:59 -05:00
yindo closed this issue 2026-02-22 18:29:00 -05:00
Author
Owner

@timothycarambat commented on GitHub (Mar 26, 2025):

Does the UI show the flow had an error? It would show in the status box if the flow began an execution and failed to do so. Please attach a screenshot of a "failure" that you are experiencing and we can go from there.

@timothycarambat commented on GitHub (Mar 26, 2025): Does the UI show the flow had an error? It would show in the status box if the flow began an execution and failed to do so. Please attach a screenshot of a "failure" that you are experiencing and we can go from there.
Author
Owner

@DavidGil-dagg commented on GitHub (Mar 26, 2025):

My flow working in anything llm:

Image

Image

I used the same prompt, the same workspace via API and the flow did not activate.

@DavidGil-dagg commented on GitHub (Mar 26, 2025): My flow working in anything llm: ![Image](https://github.com/user-attachments/assets/c49d6550-b921-456e-86fa-077e0544e80c) ![Image](https://github.com/user-attachments/assets/04be487d-5e98-4505-986a-258a2569f6bf) I used the same prompt, the same workspace via API and the flow did not activate.
Author
Owner

@DavidGil-dagg commented on GitHub (Mar 26, 2025):

Same prompt in API

Image

@DavidGil-dagg commented on GitHub (Mar 26, 2025): Same prompt in API ![Image](https://github.com/user-attachments/assets/c6b05d55-be2c-4d89-8af0-0b8d4db67855)
Author
Owner

@DavidGil-dagg commented on GitHub (Mar 26, 2025):

Result, the flow did not work, for the answer anything use the web search
{
"id": "ee94bb94-aa07-462e-9422-44b62e1f4d9e",
"type": "textResponse",
"sources": [],
"close": true,
"error": null,
"textResponse": "### Market Sizing for Selected Industries in Latin America\n\n#### Overview\nThis market sizing analysis focuses on the countries Chile, Argentina, Peru, Colombia, Ecuador, Mexico, and Panama for industries with businesses having between 300 and 1000 employees and generating $12,000,000 in revenue. The industries analyzed include:\n\n- Retail Fashion (NAICS 448)\n- Footwear (NAICS 4482)\n- Pharmaceuticals (NAICS 3254, 44611)\n- Beauty Products (NAICS 8121, 44612)\n- Oil (NAICS 211120)\n- Electronics (NAICS 44314)\n- Department Stores (NAICS 452)\n\n---\n\n#### Market Estimates by Industry\n\n1. Retail Fashion (NAICS 448)\n - The retail fashion market in Latin America has shown significant growth, with leading nations being Brazil, Argentina, Chile, and Colombia. The competitive landscape is strengthening as consumer demand increases.\n\n2. Footwear (NAICS 4482)\n - The footwear segment accounts for a notable portion of the retail market size and is driven by both domestic consumption and export opportunities. Growth in this sector is expected due to increasing demand for diverse, comfortable, and fashionable options.\n\n3. Pharmaceuticals (NAICS 3254, 44611)\n - The pharmaceuticals sector is projected to grow as healthcare access improves across the region. The industry is heavily influenced by regulatory changes, innovation, and the results of continued investment in healthcare infrastructure.\n\n4. Beauty Products (NAICS 8121, 44612)\n - The beauty industry in Latin America has a strong growth trajectory, fueled by an increasing interest in personal care and wellness. The demand for skincare, cosmetics, and related products is driving further market expansion.\n\n5. Oil (NAICS 211120)\n - With regions rich in oil reserves, the oil industry remains vital for countries like Ecuador and Colombia. Fluctuating global oil prices can affect revenue and investment in this sector.\n\n6. Electronics (NAICS 44314)\n - The electronics market is growing due to the increasing digitalization and consumer electronics uptake. There's a shift towards smart devices and innovations in technology.\n\n7. Department Stores (NAICS 452)\n - Department stores are adapting to changes in consumer shopping behavior by enhancing their online presence and improving customer experience within physical locations. Growth is expected with innovations in retail strategies.\n\n---\n\n#### Conclusion\nThe combined market for the highlighted industries in the selected Latin American countries presents significant opportunities, especially for companies that can capitalize on current consumer trends and demographic shifts. As businesses in these industries aim for growth, understanding market dynamics and consumer preferences will be essential for strategic planning.\n\nIf you need detailed statistics, forecasts, or further insights into a specific market segment, feel free to ask!",
"thoughts": [
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Using DuckDuckGo to search for "market sizing Chile Argentina Peru Colombia Ecuador Mexico Panama industries Retail Fashion Footwear..."",
"@agent: I found 10 results - reviewing the results now. (~1,904 tokens)",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Found 4 additional piece of context to help answer this question.",
"@agent: Using DuckDuckGo to search for "Market sizing for Retail Fashion, Footwear, Pharma, Beauty, Oil, Electronics, Department Stores in C..."",
"@agent: I found 10 results - reviewing the results now. (~2,017 tokens)"
]
}

@DavidGil-dagg commented on GitHub (Mar 26, 2025): Result, the flow did not work, for the answer anything use the web search { "id": "ee94bb94-aa07-462e-9422-44b62e1f4d9e", "type": "textResponse", "sources": [], "close": true, "error": null, "textResponse": "### Market Sizing for Selected Industries in Latin America\n\n#### Overview\nThis market sizing analysis focuses on the countries **Chile, Argentina, Peru, Colombia, Ecuador, Mexico, and Panama** for industries with businesses having between **300 and 1000 employees** and generating **$12,000,000** in revenue. The industries analyzed include:\n\n- **Retail Fashion (NAICS 448)**\n- **Footwear (NAICS 4482)**\n- **Pharmaceuticals (NAICS 3254, 44611)**\n- **Beauty Products (NAICS 8121, 44612)**\n- **Oil (NAICS 211120)**\n- **Electronics (NAICS 44314)**\n- **Department Stores (NAICS 452)**\n\n---\n\n#### Market Estimates by Industry\n\n1. **Retail Fashion (NAICS 448)**\n - The retail fashion market in Latin America has shown significant growth, with leading nations being Brazil, Argentina, Chile, and Colombia. The competitive landscape is strengthening as consumer demand increases.\n\n2. **Footwear (NAICS 4482)**\n - The footwear segment accounts for a notable portion of the retail market size and is driven by both domestic consumption and export opportunities. Growth in this sector is expected due to increasing demand for diverse, comfortable, and fashionable options.\n\n3. **Pharmaceuticals (NAICS 3254, 44611)**\n - The pharmaceuticals sector is projected to grow as healthcare access improves across the region. The industry is heavily influenced by regulatory changes, innovation, and the results of continued investment in healthcare infrastructure.\n\n4. **Beauty Products (NAICS 8121, 44612)**\n - The beauty industry in Latin America has a strong growth trajectory, fueled by an increasing interest in personal care and wellness. The demand for skincare, cosmetics, and related products is driving further market expansion.\n\n5. **Oil (NAICS 211120)**\n - With regions rich in oil reserves, the oil industry remains vital for countries like Ecuador and Colombia. Fluctuating global oil prices can affect revenue and investment in this sector.\n\n6. **Electronics (NAICS 44314)**\n - The electronics market is growing due to the increasing digitalization and consumer electronics uptake. There's a shift towards smart devices and innovations in technology.\n\n7. **Department Stores (NAICS 452)**\n - Department stores are adapting to changes in consumer shopping behavior by enhancing their online presence and improving customer experience within physical locations. Growth is expected with innovations in retail strategies.\n\n---\n\n#### Conclusion\nThe combined market for the highlighted industries in the selected Latin American countries presents significant opportunities, especially for companies that can capitalize on current consumer trends and demographic shifts. As businesses in these industries aim for growth, understanding market dynamics and consumer preferences will be essential for strategic planning.\n\nIf you need detailed statistics, forecasts, or further insights into a specific market segment, feel free to ask!", "thoughts": [ "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Using DuckDuckGo to search for \"market sizing Chile Argentina Peru Colombia Ecuador Mexico Panama industries Retail Fashion Footwear...\"", "@agent: I found 10 results - reviewing the results now. (~1,904 tokens)", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Found 4 additional piece of context to help answer this question.", "@agent: Using DuckDuckGo to search for \"Market sizing for Retail Fashion, Footwear, Pharma, Beauty, Oil, Electronics, Department Stores in C...\"", "@agent: I found 10 results - reviewing the results now. (~2,017 tokens)" ] }
Author
Owner

@DavidGil-dagg commented on GitHub (Mar 26, 2025):

@timothycarambat

@DavidGil-dagg commented on GitHub (Mar 26, 2025): @timothycarambat
Author
Owner

@timothycarambat commented on GitHub (Mar 26, 2025):

Are you on AnythingLLM Desktop or Docker? You can check the backend logs to see what specific tools get loaded every @agent session. That API call seems to be running the RAG memory + Web search tools and avoiding the flow.

This could be related the the APIChatHandler being Ephemeral, since API sessions cannot stay open for agents since it is REST - which is the root cause of flows not being available here most likely.

@timothycarambat commented on GitHub (Mar 26, 2025): Are you on AnythingLLM Desktop or Docker? You can check the `backend` logs to see what specific tools get loaded every `@agent` session. That API call seems to be running the RAG memory + Web search tools and avoiding the flow. This could be related the the APIChatHandler being Ephemeral, since API sessions cannot stay open for agents since it is REST - which is the root cause of flows not being available here most likely.
Author
Owner

@timothycarambat commented on GitHub (Mar 26, 2025):

Confirmed that is the case, patched https://github.com/Mintplex-Labs/anything-llm/pull/3545

@timothycarambat commented on GitHub (Mar 26, 2025): Confirmed that is the case, patched https://github.com/Mintplex-Labs/anything-llm/pull/3545
Author
Owner

@DavidGil-dagg commented on GitHub (Mar 26, 2025):

I use AnythingLLM Desktop.

I tried removing the other skills but nothing.

Image

This is the last log:
{"level":"info","message":"\u001b[32m[Event Logged]\u001b[0m - api_sent_chat","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Start cb83c310-7836-44cb-8fdf-f05bb1240f1c::openai:gpt-4o-mini","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached httpSocket plugin to Agent cluster","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attaching user and default agent to Agent cluster.","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached rag-memory plugin to Agent cluster","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached document-summarizer plugin to Agent cluster","service":"backend"}
{"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached web-scraping plugin to Agent cluster","service":"backend"}
My flow:

Image

@DavidGil-dagg commented on GitHub (Mar 26, 2025): I use AnythingLLM Desktop. I tried removing the other skills but nothing. ![Image](https://github.com/user-attachments/assets/108e1e77-12d5-42aa-909e-19fc40f7f41e) This is the last log: {"level":"info","message":"\u001b[32m[Event Logged]\u001b[0m - api_sent_chat","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Start cb83c310-7836-44cb-8fdf-f05bb1240f1c::openai:gpt-4o-mini","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached httpSocket plugin to Agent cluster","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attaching user and default agent to Agent cluster.","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached rag-memory plugin to Agent cluster","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached document-summarizer plugin to Agent cluster","service":"backend"} {"level":"info","message":"\u001b[36m[EphemeralAgentHandler]\u001b[0m Attached web-scraping plugin to Agent cluster","service":"backend"} My flow: ![Image](https://github.com/user-attachments/assets/63a5bcaf-91d1-4c79-a4c7-0126e942618b)
yindo changed title from [BUG]: The flows using the API are not working. to [GH-ISSUE #3544] [BUG]: The flows using the API are not working. 2026-06-05 14:45:39 -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#2286