Repository navigation
Using LibreChat's "Agents" via API? #16685
|
I am in the process of building my AI server and plan to use LibreChat as the frontend to it. One of the features I find interesting is the "Agents" - although I think it's naming is bit of a miss, I get what it is ment to be. And, assigning skills and settings to it, I wonder if I can attach a coding agent like Charmbracelet's Crush or alike to talk directly to that for more "classic" TUI usage outside the browser. Basically, can I connect Crush to LibreChat, to then use one of the "Agents" I created with it's skills and MCPs preset? That way I can avoid needing to duplicate skills and MCP servers everywhere... Thanks! |
Replies: 1 comment 1 reply
|
Yes, LibreChat exposes agents through an OpenAI-compatible API ("remote agents"). From
The agent runs server-side with its own instructions, skills and MCP servers, so you do not duplicate them in the client. To set it up:
One caveat: tools the agent calls run inside LibreChat, while Crush's own local tools (file edits, shell) are separate, so you get the agent's MCPs plus Crush's local abilities, not one merged toolset. |
Yes, LibreChat exposes agents through an OpenAI-compatible API ("remote agents"). From
api/server/routes/agents/openai.js:POST /api/agents/v1/chat/completionswith"model": "<agent id>"(streaming supported)GET /api/agents/v1/modelslists the agents you can useThe agent runs server-side with its own instructions, skills and MCP servers, so you do not duplicate them in the client.
To set it up:
librechat.yaml(off by default in the example config):/api/api-keysfeature, which also requires the remote-agentsusepermission).