[GH-ISSUE #2349] [FEAT]: Question about connection an API to AnythingLLM #1533

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

Originally created by @sonnt-dna on GitHub (Sep 22, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2349

What would you like to see?

I would like to know if Anything LLM supports a feature that allows integration with external APIs, specifically Dify API. I already have the API URL and API key from Dify, and I want to use this API to handle all chat interactions instead of the default LLM model in Anything LLM. Specifically, I'm looking for the following:

API Integration: The ability to input the Dify API URL and API key into the system and establish a connection between Anything LLM and Dify's services.

Redirect Requests: I want all incoming queries from the current chat interface to be automatically sent to the Dify API, and the responses from Dify should seamlessly display in the chat interface.

Security: The integration should ensure the API key is securely stored and protected.

Configurable: The admin interface should provide an option to enable/disable the use of the Dify API and easily update the API URL and key when needed.

Logging and Monitoring: There should be a logging mechanism to track the requests sent to the Dify API and the responses received for monitoring and troubleshooting.

Does Anything LLM support such a feature or is there a way to integrate an external API like Dify for chat interactions?

Originally created by @sonnt-dna on GitHub (Sep 22, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2349 ### What would you like to see? I would like to know if Anything LLM supports a feature that allows integration with external APIs, specifically Dify API. I already have the API URL and API key from Dify, and I want to use this API to handle all chat interactions instead of the default LLM model in Anything LLM. Specifically, I'm looking for the following: API Integration: The ability to input the Dify API URL and API key into the system and establish a connection between Anything LLM and Dify's services. Redirect Requests: I want all incoming queries from the current chat interface to be automatically sent to the Dify API, and the responses from Dify should seamlessly display in the chat interface. Security: The integration should ensure the API key is securely stored and protected. Configurable: The admin interface should provide an option to enable/disable the use of the Dify API and easily update the API URL and key when needed. Logging and Monitoring: There should be a logging mechanism to track the requests sent to the Dify API and the responses received for monitoring and troubleshooting. Does Anything LLM support such a feature or is there a way to integrate an external API like Dify for chat interactions?
yindo added the enhancementIntegration Requestfeature request labels 2026-02-22 18:25:17 -05:00
yindo closed this issue 2026-02-22 18:25:17 -05:00
Author
Owner

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

I am not intimately familiar with DIfy, but if the endpoint is the same request/response format as OpenAI you can use the OpenAI Generic Connector in our "LLM Preference" selection and use the correct base URL and params and you should be able to use Dify as your LLM.

Everything except Logging and Monitoring will be present, that is a separate piece of work we are looking to add and is on the roadmp

@timothycarambat commented on GitHub (Sep 23, 2024): I am not intimately familiar with DIfy, but if the endpoint is the same request/response format as OpenAI you can use the `OpenAI Generic Connector` in our "LLM Preference" selection and use the correct base URL and params and you should be able to use Dify as your LLM. Everything except `Logging and Monitoring` will be present, that is a separate piece of work we are looking to add and is on the [roadmp](https://docs.anythingllm.com/roadmap)
Author
Owner

@Reekin commented on GitHub (Nov 1, 2024):

@timothycarambat
Sadly dify's api format is not the same as OpenAI

I love anythingLLM's chat interfaces, but regarding agent, I prefer dify's workflow style.
I think it's a waste for this project to chase an agent-configure like dify, so it may be better and easier to support dify api?

@Reekin commented on GitHub (Nov 1, 2024): @timothycarambat Sadly dify's api format is not the same as OpenAI I love anythingLLM's chat interfaces, but regarding agent, I prefer dify's workflow style. I think it's a waste for this project to chase an agent-configure like dify, so it may be better and easier to support dify api?
Author
Owner

@timothycarambat commented on GitHub (Nov 1, 2024):

think it's a waste for this project to chase an agent-configure like dify, so it may be better and easier to support dify API?

You can do this already. Just make a custom agent that calls the Dify endpoint

@timothycarambat commented on GitHub (Nov 1, 2024): > think it's a waste for this project to chase an agent-configure like dify, so it may be better and easier to support dify API? You can do this already. [Just make a custom agent that calls the Dify endpoint](https://docs.anythingllm.com/agent/custom/introduction)
Author
Owner

@Reekin commented on GitHub (Nov 2, 2024):

@timothycarambat

You can do this already

But using agent means I should add "@agent" in my every prompt , right? That's not convenient.
So maybe the approach is to enable a "default agent" in a workspace which takes over all prompts by default instead of waiting for a mention?

@Reekin commented on GitHub (Nov 2, 2024): @timothycarambat > You can do this already But using agent means I should add "@agent" in my every prompt , right? That's not convenient. So maybe the approach is to enable a "default agent" in a workspace which takes over all prompts by default instead of waiting for a mention?
Author
Owner

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

@Reekin the reason @agent is a separate flow from just regular chat is that it can lead to much more latency per request and token consumption and since agent skills are not yet scoped per workspace this can lead to hallucination calls invoking skills that are unrelated to a prompt causing side effects.

So we have it to where if you want to run an agent skill, you do so intentionally to prevent user foot-gunning during a prompt response flow. Ideally, in the future it is all in one for a prompt and the decision is made based on the user prompt

@timothycarambat commented on GitHub (Nov 4, 2024): @Reekin the reason `@agent` is a separate flow from just regular chat is that it can lead to much more latency per request and token consumption and since agent skills are not yet scoped per workspace this can lead to hallucination calls invoking skills that are unrelated to a prompt causing side effects. So we have it to where if you want to run an agent skill, you do so intentionally to prevent user foot-gunning during a prompt response flow. Ideally, in the future it is all in one for a prompt and the decision is made based on the user prompt
yindo changed title from [FEAT]: Question about connection an API to AnythingLLM to [GH-ISSUE #2349] [FEAT]: Question about connection an API to AnythingLLM 2026-06-05 14:41:16 -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#1533