AI is currently in beta. Assistant replies go out to customers, so test on a low-volume inbox first.
Providers
Libredesk talks to any OpenAI-compatible endpoint: OpenAI, Anthropic, OpenRouter, Groq, Together AI, Azure, LiteLLM, or a local Ollama. Pick a preset to pre-fill the base URL and model, then edit anything you want. There are two providers to configure:1
Configure completion
Go to Admin → AI → Providers. Pick a preset, paste your API key, and save.
2
Configure embedding
Fill in the embedding provider on the same page. Dimensions must match the model’s output size (1536 for
text-embedding-3-small, 3072 for text-embedding-3-large, 768 for nomic-embed-text).3
Test the connection
Hit Test connection on each. Libredesk sends a real request and reports what the provider said, including a dimensions mismatch.
Completion fields
Changing the embedding model or dimensions re-embeds existing snippets automatically.
Snippets
Snippets are the knowledge base. The assistant and copilot search them to answer questions. One library, shared by every assistant. Write each snippet as a self-contained answer, not a fragment. A snippet titled “Refund policy” with the full policy in the body works; a single line pulled out of a longer page does not. You can add snippets three ways:- Manually - New snippet, title and content.
- Import from URL - Libredesk fetches the page, keeps the readable content, and adds it as a snippet you can edit afterwards.
- Suggestions - mined from resolved conversations, see below.
Learn from resolved conversations
Turn on Learn from resolved conversations under Admin → AI → Suggestions. Resolved conversations where a human agent gave a reusable answer are mined into FAQ suggestions. Each suggestion shows the question, the drafted answer, and a link to the conversation it came from. Approving one adds it to snippets. Rejecting one drops it. Nothing reaches the assistant until you approve it.Assistants
An assistant is a persona with its own name, avatar, tone, instructions, and set of tools. Create as many as you need: one for billing, one for order status. Assistants show up alongside your agents as assignees. A conversation gets an AI reply only when it is assigned to an assistant, so route work to one with an automation rule (or assign it by hand to try it out). The assistant replies on both email and live chat, and only on open conversations - never snoozed or resolved ones.Settings
Handoff
The assistant hands the conversation to a human, unassigns itself, and posts an activity message when it:- decides it cannot help
- hits its max turns
- errors out or times out
- sees someone other than the contact reply on the thread
Test and Performance
The assistant edit page has two extra tabs:- Test - send a sample customer message and see the reply it would draft, plus which snippets it used. Nothing is saved or sent.
- Performance - conversations, replies, resolution rate, handoff rate, reopen rate, replies per conversation, and CSAT for that assistant.
Tools
Tools let an assistant call your own APIs while replying, to look up an order, check a subscription, or cancel something. Create them under Admin → AI → Tools, then grant them per assistant.Parameters example
GET the arguments go on the query string. On POST they are the JSON body.
Identity headers
Libredesk adds these headers to every tool request, server-side. The model never sees them and cannot change them.Require verified contact
An email address a customer types into a chat proves nothing. With Require verified contact on, the assistant emails a one-time code to the contact and asks them to paste it back before the tool can run. Codes expire in 10 minutes and both sends and attempts are capped. Turn it off only if your endpoint authenticates the customer itself. Once it is off, anyone who can reach the chat widget can trigger that tool for that contact.Writing a custom tool
The tool config above is the easy half. The endpoint it calls is where the work is, and three rules cover most of it:- Check your own secret first. Configure a header like
X-Api-Keyon the tool and reject any request that does not carry it. Your endpoint is on the internet; the tool config is the only thing that proves the call came from Libredesk. - Take the customer’s identity from the headers, never from the arguments. Libredesk injects the headers server-side and the model cannot see or change them. Anything in the request body was written by the model, from what the customer typed, so treat it as untrusted input. If the model asks for
account_id=99999, look up the account that belongs to the contact in the header and ignore the number. - Gate sensitive data on
X-Libredesk-Contact-Verified. A visitor can claim any email address in chat. That header istrueonly after the contact proved the address with a one-time code, so require it before returning anything you would not show a stranger.
500 usually ends in a handoff.
The repo ships a runnable version of this at scripts/tools-server. Run it with go run ./scripts/tools-server, point a tool at http://localhost:7070/account, and it logs every header and argument it receives.
For your agents
These need only the completion provider, and work whether or not you use assistants.- Copilot - a panel in the conversation sidebar. Ask it anything about the conversation; it searches your snippets and the contact’s history. Insert its answer into the reply box or add it as a private note. Rename it under Admin → General.
- Drafted replies - describe what you want to say in the reply box and let AI write the reply.
- Rewrite prompts - fix grammar and spelling, and the other prompts in the reply box AI menu.
- Summarize conversation - drops an AI summary into the conversation as a private note.
- Tag suggestions - suggests tags from your existing tag list.
Limits
Assistant worker and run limits live inconfig.toml:

