● Deploy anywhereGet API key

Home / Docs / Chatwoot

Plugsky with Chatwoot: an OpenAI-compatible model for a self-hosted support desk

Short answer. A self-hosted Chatwoot desk can call Plugsky in two places: an Agent Bot that receives each conversation by webhook, or Captain configured with an OpenAI-compatible endpoint in Super Admin. The Agent Bot route works today with a small relay. Captain's chat path is configurable, but its knowledge search expects 1536-dimension embeddings and Plugsky returns 2048, so vector search is not a drop-in replacement.

What works, what needs work, and what does not work today.
CapabilityStatusWhat it means for you
Agent Bot repliesWorks todayA webhook relay receives the conversation and returns a Plugsky completion. No Chatwoot licence needed.
Chatwoot webhooksWorks todayConversation and message events can be forwarded to your own service for logging, routing or summarisation.
Captain chat repliesConfigurableSuper Admin accepts an OpenAI-compatible base URL and key. Model IDs must be ones Plugsky serves.
Captain knowledge searchBlockedChatwoot expects 1536-dimension embeddings; plugsky-embed returns 2048. Keep your existing embedding provider.
Managed Chatwoot hostingNot offeredPlugsky does not host, upgrade or support Chatwoot instances.

What Chatwoot needs from a model provider

Chatwoot is a Rails application with a Vue front end, backed by Postgres, Redis and Sidekiq. The AI paths add two requirements: an HTTP endpoint that speaks the OpenAI chat-completions shape, and — for Captain's knowledge base — an embedding endpoint whose vector length matches the column already defined in its database.

Plugsky satisfies the first requirement. The gateway accepts POST /v1/chat/completions at https://plugsky.com/v1 and https://api.plugsky.com/v1, with the same request and response fields as OpenAI, including streaming and tool calls. The second requirement is where the embedding dimension matters, and it is the reason this page separates the two paths rather than claiming a single switch.

The Agent Bot route — works today

An Agent Bot is a Chatwoot feature in the MIT core. You create a bot, give it a webhook URL, and Chatwoot posts each incoming message to that URL. Your relay calls Plugsky and then posts the reply back through Chatwoot's messages API. Chatwoot ignores the webhook response body. The relay is the only piece you have to run; it can be a Cloudflare Worker, a small Node service or a serverless function.

  1. Create the bot. In Chatwoot, open Settings → Integrations → Agent Bots and add a bot. Chatwoot shows a webhook URL field and an access token.
  2. Point it at your relay. The relay must be public HTTPS. It receives the message payload, extracts the latest human message and the conversation history, and calls Plugsky.
  3. Call Plugsky from the relay. Send the conversation to https://plugsky.com/v1/chat/completions with your workspace key and a model such as plugsky-lite.
  4. Post the reply through the Agent Bot API. POST /api/v1/accounts/{account_id}/conversations/{conversation_id}/messages with content, message_type: "outgoing" and the bot access token. Do not return {"content": "..."} from the webhook; Chatwoot ignores it.
  5. Decide when the bot stays silent. Acknowledge the webhook with 200 and do not post a message when a human agent has taken over. A bot that answers every message will talk over your staff.
// Minimal relay shape (Cloudflare Worker)
// Chatwoot's webhook timeout is 5s. Ack first, then do the model call.
export default {
  async fetch(req, env, ctx) {
    const body = await req.json();
    if (body.event !== "message_created" || body.message_type !== "incoming") {
      return new Response("ignored", { status: 200 });
    }
    ctx.waitUntil((async () => {
      const text = body.content || "";
      const r = await fetch("https://plugsky.com/v1/chat/completions", {
        method: "POST",
        headers: {
          "Authorization": `Bearer ${env.PLUGSKY_KEY}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify({
          model: "plugsky-lite",
          messages: [
            { role: "system", content: "Answer support questions in two sentences. If unsure, say a human will follow up." },
            { role: "user", content: text }
          ],
          max_tokens: 220
        })
      });
      const data = await r.json();
      const content = data.choices?.[0]?.message?.content || "";
      if (!content) return;
      await fetch(
        `${env.CHATWOOT_URL}/api/v1/accounts/${body.account.id}/conversations/${body.conversation.id}/messages`,
        {
          method: "POST",
          headers: {
            "Authorization": `Bearer ${env.CHATWOOT_BOT_TOKEN}`,
            "Content-Type": "application/json"
          },
          body: JSON.stringify({
            content,
            message_type: "outgoing",
            private: false,
            source_id: `plugsky:${body.id}`
          })
        }
      );
    })());
    return new Response("ok", { status: 200 });
  }
};

Three operational notes. First, the relay must be idempotent: Chatwoot can retry a webhook, and a duplicate reply in a live conversation is worse than a slow one; store the message id and skip a second delivery. Second, the webhook response is not the reply — only the messages API creates a visible message. Third, cap the history you send. A support conversation that resends the whole transcript on every turn is the most common way a cheap model becomes an expensive one.

Model presets for a support desk

Starting points, not benchmarks. Measure on your own transcripts before changing a default.
JobModelWhy
First reply and routingplugsky-liteShort answers, classification and intent detection at the lowest cost per turn
Complex or long threadsplugsky-proMore context and steadier instruction-following when a conversation spans many messages
Summarise a conversationplugsky-proOne call per closed conversation; cheap relative to the transcript it replaces
Translate a replyplugsky-translateDedicated translation model rather than a general chat model
Embeddingsplugsky-embed (2048)Usable for your own index; not compatible with Chatwoot's 1536-dimension column

Cost, using published limits

A support bot's cost is driven by turns, not by seats. Take a desk with 1,000 conversations a month and an average of six bot turns per conversation: 6,000 requests, each with roughly 2,000 tokens of history and a 200-token answer. That is about 13.2 million tokens a month — comfortably inside Hobby's 2 million tokens per day, and well inside Starter.

Published plan limits, checked 22 November 2026.
PlanPriceRequests/dayTokens/dayFits the example?
Hobby$8/mo1,0002,000,000Yes — 200 requests and 440k tokens a day
Starter$20/mo2,0005,000,000Yes, with headroom for a second desk
Builder$60/moNo daily capNo daily capFor several desks or heavy tool use

Concurrency and RPM still apply on every plan. A bot that fans out one call per message in a busy inbox will hit concurrency before it hits tokens, so queue replies rather than firing them in parallel.

The Captain route — configurable, with one remaining blocker

Captain is Chatwoot's AI agent, and it is not part of the Community Edition: it requires a self-hosted Premium or Enterprise licence. On those plans, Super Admin exposes an OpenAI key and an optional base URL. Set the base URL to https://plugsky.com/v1, the key to a Plugsky workspace key, and the model to an ID that Plugsky serves.

Model names are not a blocker. Chatwoot validates IDs such as gpt-6-luna and gpt-5.2; Plugsky resolves those aliases to plugsky-pro, and GET /v1/models/{id} returns a model object for them, so the validation call succeeds. The remaining blocker is embeddings: Captain's knowledge search writes 1536-dimension vectors, while plugsky-embed returns 2048. Point embeddings at your existing provider and use Plugsky for generation only.

If that constraint is acceptable, Captain's replies run on Plugsky without changing the rest of your desk. If it is not, the Agent Bot route is the supported path today.

What this guide does not claim

Checklist before you switch a live inbox

  1. Test the relay against a private inbox with three real transcripts, including one angry customer and one refund request.
  2. Confirm the bot stays silent when a human assigns the conversation to themselves.
  3. Set max_tokens so a reply cannot become a paragraph.
  4. Log the Plugsky request ID for every bot reply, so a bad answer can be traced to a request.
  5. Decide the escalation phrase that hands the conversation to a person, and test that it works.

Questions

Does Plugsky host Chatwoot for me?

No. This is a configuration guide for a Chatwoot installation you already run. Plugsky provides the model endpoint; Chatwoot, its database and its channels remain yours.

Does Captain work with Plugsky today?

Captain's chat replies can use an OpenAI-compatible endpoint, so the chat path is configurable. Captain's knowledge search expects 1536-dimension embeddings, and Plugsky's embedding model returns 2048, so vector search is not a drop-in replacement today.

Do I need a Chatwoot licence?

Captain and other enterprise features are not in the Community Edition. A self-hosted Premium or Enterprise subscription from Chatwoot is required for Captain; the MIT core does not include it.

Which Plugsky model should a support desk use?

Start with plugsky-lite for first replies and routing, and escalate to plugsky-pro when a conversation needs longer context or a more careful answer. Measure on your own transcripts before changing the default.

Is this an official Chatwoot integration?

No. Chatwoot is a third-party trademark and Plugsky is not affiliated with it. This page documents a configuration that both products support.

Sources

Related

Need the model endpoint?

Plugsky serves 39 OpenAI-compatible models. The free tier is enough to test a relay. Hobby and Starter have daily request and token caps; Builder and Scale remove the daily cap but keep concurrency and RPM limits.

Get an API key See plan limits