-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Ability to select an agent as the default for new chats #5000
Comments
You can do this using a modelSpec https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/model_specs You can set a specific agent as "endpoint" and even make it as default. |
@dvejsada thanks for the suggestion! I gave it a try, but I couldn't figure out how to get it to select the agent I built in the agent builder. Additionally, all of the other endpoints disappeared. It seems like I'd have to manually set up model specs for everything I wanted to be able to use if I took this approach. Additionally, my agent uses some custom actions, which don't appear to be configurable from the model specs. I'd like to be able to select an agent that I built with the agent builder as the default. |
@acehoss I'm planning on implementing something similar to ChatGPT with the way they allow pinning GPTs: Open to feedback, presets would also solve this. |
@danny-avila That sounds even better than presets, the main thing I'd like is one-click activation of an agent. This would allow one-click activation of various agents, which is more powerful than default activation of one agent. 💯 |
How did you manage to create an agent when modelSpecs were active? Changing the selection to "Agents" to show the Agent Builder was not possible once a modelSpec was configured. The menu entry "Agents" was there, but I could not select it. Without a modelSpec everything worked fine. I am already running the latest development build. My environment:
My librechat.yaml: interface:
endpointsMenu: true
endpoints:
azureOpenAI:
...
modelSpecs:
list:
- name: "yourcompany-gpt"
preset:
default: true
endpoint: "azureOpenAI" |
You can do modelSpec with endpoint "agents", which will allow you to create/edit agents. Once you have your agent created, just add the agent_id to keep the modelSpec endpoint for specific agent only (if preferred). |
what do you mean by "add the agent_id", where do we get that id from and how do we add that Id in the model spec I cant find it in the docs also can I make that agent as default like we do with other models? |
I too am attempting to create a modelSpec that uses the endpoint "agents" and allows for creating/editing agents. Here is my librechat.yaml as an example: # librechat.yaml
endpoints:
# Example existing custom endpoint
custom:
- name: "<redacted>"
...
models:
default: ["claude-3.5-haiku", ...]
agents:
disableBuilder: false
modelSpecs:
enforce: false
prioritize: true
list:
# Example modelSpec based on custom endpoint
- name: "<redacted>"
...
# Is the following correct?
- name: "agents"
label: "Agents"
preset:
endpoint: "agents"
model: "claude-3.5-haiku"
Currently I see both modelSpecs visible in the dropdown select menu, but I can't create/edit agents (agent builder is not visible). When I use endpoints only (instead of modelSpecs), I do see the agent builder. |
I can confirm that forcing modelSpecs to use the "agents" endpoint will make the Agents Builder not appear therefore making the endpoint not usable if no Assistant ID is hardcoded in the configs. |
@Balzabu @mbiskach That is default behavior for using modelSpecs. You need to override the default interface settings as mentioned in the docs: https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/model_specs#overview https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/interface |
Hello @danny-avila, thanks for your fast reply and happy beginning of this new year. I will update this comment when possible. Edit: I can confirm this does work as intended. librechat.yaml
interface:
endpointsMenu: true # Ensure the endpoints menu is visible
modelSelect: true # Enable model selection
parameters: true # Show configurable parameters
sidePanel: true # Ensure the side panel is displayed
presets: true # Enable presets
agentBuilder: true # Explicitly enable the agent builder
modelSpecs:
enforce: true
prioritize: true
list:
- name: "lorem-ipsum"
label: "Lorem Ipsum"
description: "Lorem Ipsum"
preset:
default: true
endpoint: "agents" |
@danny-avila I added interface:
agents: true
agentBuilder: true
The rest of the librechat.yaml continues from above |
Hello, did you have the chance to apply the configuration I used last time? With the one I specified it is working fine. In my case I had to disable Cloudflare Caching and rebuild with docker compose in order to see the Builder in the sidebar. |
This minimal librechat config works for me. interface:
endpointsMenu: false
modelSelect: false
parameters: true # 👉 Must be enabled, else there is no agent builder!
agents: true
modelSpecs:
list:
- name: "Agents"
label: "Agents"
preset:
endpoint: "agents"
# Optionally set a default agent, get the id from mongodb > "LibreChat" database > "agents" table
# agent_id: "agent_NqhNPxoUp9coJ4BFZIEF3" |
For what it's worth, I've added URL query params for using agents via links to your instance: I've also extensively updated model specs documentation for correct usage: you should simply use the following when configuring agents via specs: preset:
endpoint: "agents"
agent_id: "agent_someUniqueId" |
@danny-avila thank you for the updates! |
@mbiskach I recently changed this so that you don't need https://www.librechat.ai/docs/configuration/librechat_yaml/object_structure/agents#disablebuilder |
@danny-avila You think we can have the uploaded image for an agent appear in the modelSpec list? |
You can do this by setting "iconURL" in the modelSpec. |
What features would you like to see added?
Maybe agents could appear in the preset list, allowing them to be selected as the default for new chats? Or some other way? But when starting a new chat, I'd like for an agent to be preselected.
More details
I have an agent made with the agent builder that I use for 95% of conversations, and every time I start a new chat I need to @ the agent in the chat box to select it.
Which components are impacted by your request?
No response
Pictures
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: