AI

Bring your own OpenAI-compatible model for live chat answers, reply drafts and summaries, and build the knowledge base it answers from.

The AI assistant is optional and uses a model you bring. It answers live chat first, drafts replies for agents, writes case summaries, and learns from your website, past mail and resolved cases. It answers only from your knowledge, never promises refunds or compensation, and hands refunds, disputes and anything it is unsure about to your team.

Connect a model

Any API that speaks the OpenAI chat completions format works: OpenAI, Gemini, Qwen (DashScope), OpenRouter or a local server.

Per workspace

Open AI assistant in the sidebar. Under Model, fill in:

Field Example
Base URL https://api.openai.com/v1. The buttons above the fields fill in OpenAI, Gemini, DashScope or OpenRouter.
Model gpt-5-mini
API key Stored encrypted. When a key is saved, leave the field empty to keep it.
Embedding model (optional) text-embedding-3-small. Must return 1024 dimensions. Turns on semantic search.

Click Save model, then Test connection. The test asks the model to reply “OK” and shows “Connected to ” or the error.

Changing these settings needs the “Rename the workspace” permission (admins have it).

Server-wide

On a self-hosted server you can set one model for every workspace that has not set its own:

AI_BASE_URL=https://api.openai.com/v1
AI_API_KEY=YOUR_KEY
AI_MODEL=gpt-5-mini
AI_EMBEDDING_MODEL=text-embedding-3-small   # optional, 1024 dimensions

All three of AI_BASE_URL, AI_API_KEY and AI_MODEL must be set. A workspace’s own model, when saved, takes precedence; the page then notes that the server already provides one.

Without any model, the page says “No AI model is connected yet, so the AI is idle.” and the AI features below do nothing.

Answer live chat first

Turn on Answer live chat first on the AI assistant page. After each buyer message in live chat, the AI replies, unless a person is already involved. It stays quiet when:

  • the case is assigned to someone;
  • the case is tagged needs-human (handed off);
  • a teammate has replied in the conversation;
  • the case is closed;
  • a newer buyer message arrived meanwhile (that one gets its own turn).

Before calling the model, Rebutdesk checks the buyer’s last message for two kinds of requests and hands off right away without a model call:

  • asking for a person (“human”, “real person”, “live agent”, “talk to someone”, and the common Chinese phrases);
  • money back or disputes (“refund”, “money back”, “reimburse”, “cancel my order”, “chargeback”, “dispute”, “claim with my bank”, and the common Chinese phrases).

The buyer then gets: “Thanks for your message. I’m passing this to a person on our team, who will reply here as soon as possible.”

Otherwise the model gets your company facts, up to 6 matching knowledge passages and the last 20 messages, with these rules: answer only from the facts and knowledge, never promise or grant refunds, returns, discounts, compensation, exceptions or delivery dates, hand off when unsure or when the buyer is upset, reply in the buyer’s language in at most 4 short sentences, and never invent links, emails or phone numbers.

Hand-off

When the AI hands off, the case gets the tag needs-human, appears in the Needs a person view, and the timeline shows why (“handed this to a person: refund or cancellation request”). The AI does not answer on that case again. A hand-off also happens when the model call fails (“the assistant is unavailable”) or returns nothing usable. If no model is configured at all, the AI stays silent and the chat simply waits for your team.

Reply drafts

On a case, Draft with AI puts a reply in the reply box, replacing what is there, for you to edit before sending. It uses the conversation, your company facts and matching knowledge. Where it does not know something, it writes [check: what to confirm] instead of guessing, and it does not promise refunds, compensation or dates unless your facts state them. It signs with your first name. Drafting needs the “Reply to buyers” permission.

Summaries

Summarize with AI adds a 2 to 4 line summary to the case timeline: what the buyer wants, what was said or promised, and what is still open. It needs at least two messages in the case and the “Add internal notes” permission.

Promises

The AI never makes promises, but your team does. In the Promises section next to the timeline, Add a promise records a refund, replacement, call back or follow-up with a due time. When the due time passes and the promise is not marked kept, the case gets the tag overdue-promise and a timeline entry. Refunding a payment from the case marks pending refund promises as kept. Promise events are also sent as webhooks (commitment.created, commitment.overdue).

Knowledge base

The AI answers from the knowledge base, which you see under Knowledge in the sidebar. Sources:

Source How it gets there
Website Setup, Your website, Read my website. Rebutdesk reads up to 100 public pages of the site, starting with the sitemap and putting shipping, returns, refund, FAQ and policy pages first. It respects robots.txt and identifies as RebutdeskBot/1.0. It skips cart, checkout, account and login pages. Read again on the Knowledge page reads it again.
Company facts Setup, Check your company facts. After reading your website, the AI drafts these fields for you to check and save: what you sell, shipping, returns, refunds, support hours, support email, tone, and anything the AI must know or never say. Saved facts are always part of the AI’s context.
Email import An .mbox file uploaded in Setup, Support email. Conversations with a team reply become general questions and answers. See Email.
Learned from conversations When Learn from resolved conversations is on, a case that is resolved or closed is read about a minute later, and up to 3 general questions and answers are kept, without names, addresses, order numbers or one-off exceptions. Only conversations where a teammate answered are used.
Written articles Write an article on the Knowledge page.

Reading a website, drafting facts and learning run as background jobs. Drafting facts and learning need a model; reading the website does not.

On the Knowledge page you can open each document, Exclude it so the AI ignores it (and Include it again), and Remove a whole source. Test a buyer question searches the knowledge base the way the AI does; “Nothing found. The AI would hand this question to your team.” means the AI has nothing to answer from.

Knowledge search always uses PostgreSQL full-text search. With an embedding model and pgvector, it also uses vector similarity and merges both rankings.

Semantic search needs both:

  • pgvector on the database server when migrations first run. The migration creates the vector extension and a 1024-dimension embedding column only if the extension is available at that moment. The compose setup uses the pgvector/pgvector:pg17 image, so it has it.
  • An embedding model that returns 1024 dimensions: the workspace’s Embedding model (optional), or AI_EMBEDDING_MODEL on the server. Examples from the console: text-embedding-3-small on OpenAI, text-embedding-v4 on Qwen.

Vectors are stored with the name of the model that made them, and vectors from different models are never mixed. When you change the embedding model, the background job re-embeds existing passages. If the embedding provider fails, search falls back to keywords and the missing vectors are filled in later.

The AI page says “Semantic search is on.” when an embedding model is configured. It does not check that the database has pgvector; without the column, search stays keyword only.

Next: Plugins