[GH-ISSUE #2195] [FEAT]: Update workspace agent skills through API #1430

Open
opened 2026-02-22 18:24:45 -05:00 by yindo · 4 comments
Owner

Originally created by @aka-collab on GitHub (Aug 29, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2195

Originally assigned to: @timothycarambat on GitHub.

What would you like to see?

Loving the fact that we can now use agents through API calls. Now that it's implemented, it would be useful to update agent settings through it as well. In my case specifically, I want to be able to add SQL connections through the API as I want to include the SQL feature in every new workspace I create through the API.

Of course, we'd also need to be able to set the agent's LLM provider since that's needed to enable agents in a new workspace in the first place. Apologies if this feature is already in development.

Originally created by @aka-collab on GitHub (Aug 29, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2195 Originally assigned to: @timothycarambat on GitHub. ### What would you like to see? Loving the fact that we can now use agents through API calls. Now that it's implemented, it would be useful to update agent settings through it as well. In my case specifically, I want to be able to add SQL connections through the API as I want to include the SQL feature in every new workspace I create through the API. Of course, we'd also need to be able to set the agent's LLM provider since that's needed to enable agents in a new workspace in the first place. Apologies if this feature is already in development.
yindo added the enhancementfeature request labels 2026-02-22 18:24:45 -05:00
Author
Owner

@aka-collab commented on GitHub (Aug 29, 2024):

Oops sorry, I just realized that the SQL connection is already global to all workspace agents. It still remains however that when a new workspace is created, the LLM provider has to be selected first before agents are enabled on it, and I don't believe I see a way to do that in the API documentation.

@aka-collab commented on GitHub (Aug 29, 2024): Oops sorry, I just realized that the SQL connection is already global to all workspace agents. It still remains however that when a new workspace is created, the LLM provider has to be selected first before agents are enabled on it, and I don't believe I see a way to do that in the API documentation.
Author
Owner

@PulzWave commented on GitHub (Dec 15, 2024):

I would like to be able to set the "Prompt", "Query mode refusal response" and "Document similarity threshold"" settings via de API.

You can create workspaces via the API but cannot alter these settings.

For my use case, I create workspaces programmatically based on a set of URL's. Which is totally possible via the API. But the above settings aren't.

@PulzWave commented on GitHub (Dec 15, 2024): I would like to be able to set the "Prompt", "Query mode refusal response" and "Document similarity threshold"" settings via de API. You can create workspaces via the API but cannot alter these settings. For my use case, I create workspaces programmatically based on a set of URL's. Which is totally possible via the API. But the above settings aren't.
Author
Owner

@timothycarambat commented on GitHub (Dec 15, 2024):

You can actually do this right now:
https://github.com/Mintplex-Labs/anything-llm/blob/827c3f46780573170eff63aee407a172a920ec6e/server/endpoints/workspaces.js#L82

Any of these fields are valid for updating via API:

"name",
    "slug",
    "vectorTag",
    "openAiTemp",
    "openAiHistory",
    "lastUpdatedAt",
    "openAiPrompt",
    "similarityThreshold",
    "chatProvider",
    "chatModel",
    "topN",
    "chatMode",
    "pfpFilename",
    "agentProvider",
    "agentModel",
    "queryRefusalResponse",

@aka-collab - you want these for the workspace agent settings (agentProvider and agentModel), but yeah updating the agent stuff if not supported through this endpoint

@PulzWave
similarityThreshold=> document threshold
queryRefusalResponse=> refusal response
openAiPrompt => prompt (openAI is just a legacy term, but the field is the prompt)

@timothycarambat commented on GitHub (Dec 15, 2024): You can actually do this right now: https://github.com/Mintplex-Labs/anything-llm/blob/827c3f46780573170eff63aee407a172a920ec6e/server/endpoints/workspaces.js#L82 Any of these fields are valid for updating via API: ``` "name", "slug", "vectorTag", "openAiTemp", "openAiHistory", "lastUpdatedAt", "openAiPrompt", "similarityThreshold", "chatProvider", "chatModel", "topN", "chatMode", "pfpFilename", "agentProvider", "agentModel", "queryRefusalResponse", ``` @aka-collab - you want these for the workspace agent settings (`agentProvider` and `agentModel`), but yeah updating the agent stuff if not supported through this endpoint @PulzWave `similarityThreshold`=> document threshold `queryRefusalResponse`=> refusal response `openAiPrompt` => prompt (openAI is just a legacy term, but the field is the prompt)
Author
Owner

@PulzWave commented on GitHub (Dec 16, 2024):

@timothycarambat thanks a bunch! I guess the API docs at this endpoint could use an update. At least, I assume the example request should be exhaustive in possibilities:

http://localhost:3001/api/docs/#/Workspaces/post_v1_workspace_new

[EDIT]
The workspace/new API endpoint ignores additional settings. I've created a separate issue for it (#2840)

workspace/update API endpoints works great though.

@PulzWave commented on GitHub (Dec 16, 2024): @timothycarambat thanks a bunch! I guess the API docs at this endpoint could use an update. At least, I assume the example request should be exhaustive in possibilities: http://localhost:3001/api/docs/#/Workspaces/post_v1_workspace_new [EDIT] The workspace/new API endpoint ignores additional settings. I've created a separate issue for it (#2840) workspace/update API endpoints works great though.
yindo changed title from [FEAT]: Update workspace agent skills through API to [GH-ISSUE #2195] [FEAT]: Update workspace agent skills through API 2026-06-05 14:40:44 -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#1430