Discourse Chatbot 🤖

:information_source: Summary The Original AI Chatbot for Discourse
:hammer_and_wrench: Repository Link GitHub - merefield/discourse-chatbot: An AI bot with RAG capability for Topics, Chat & Customer Support in Discourse, currently powered by OpenAI · GitHub
:open_book: Install Guide How to install plugins in Discourse
:heart: Sponsorship Please consider becoming an ongoing sponsor of my open source work at a level that suits your or your organisation’s resources and needs to ensure this plugin gets the maintenance it deserves and continues to work for your site in the future.

Enjoying this plugin? Please :star: it on GitHub ! :pray:

:information_source: As this is an independently contributed plugin, please make support, bug, ux, and feature requests here in this topic. NB This plugin is not available on Discourse.org hosting. You can install it if you are self-hosted and possibly if you are on third party hosting (but check with your provider).

The original AI Chatbot for Discourse

Chatbot brings configurable AI conversations to Topics, Personal Messages, Chat channels, and Chat threads. Give the bot a character that suits your community, decide which groups may use it, and choose different models and tools for low-, medium-, and high-trust users.

It can:

  • answer normally from the current conversation;
  • search selected forum content with semantic or hybrid search;
  • search Wikipedia, current news, and the web;
  • crawl remote pages and retrieve end-of-day market data;
  • perform reliable expression-based calculations;
  • see uploaded images and optionally read PDFs;
  • generate and edit images;
  • collect outstanding editable User Fields in private conversations;
  • escalate private Chat conversations to configured staff groups;
  • respond automatically to new Topics in selected Categories; and
  • accept additional tools supplied by other plugins.

For a practical support workflow, see Building a technical support chatbot.

With local forum search enabled, the bot can ground answers in your community’s content:

For simpler conversations, expose fewer or no tools to reduce calls, latency, and cost:

Provider support

Choose providers independently for replies, embeddings, vision, and image generation. Each capability reuses the API key belonging to its selected provider.

Capability OpenAI Anthropic Google Gemini xAI
LLM replies and tools :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Embeddings :white_check_mark: :white_check_mark: :white_check_mark:
Vision :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Image generation :white_check_mark: :white_check_mark: :white_check_mark:
Image editing GPT Image models :white_check_mark:
PDF conversation input :white_check_mark:

If no custom URL is set, Chatbot uses its built-in official endpoint for the selected provider. Custom model names and URLs support Azure OpenAI, Ollama, proxies, and other services that implement a supported provider’s API shape.

Provider-specific model dropdowns are shown only when that provider is active. The reply model can differ by trust level, while embeddings, vision, and image generation each have their own provider and model selector.

Read the full provider and custom-endpoint guide.

Access, quotas, and tools

Nobody has access until you assign groups to Chatbot’s low-, medium-, or high-trust group settings. Users inherit the quota, model, and tool allowlist of their highest matching Chatbot trust level. Quotas can be measured by queries or tokens.

Built-in tools are selected independently for each trust level. Credentials and supporting settings still control runtime availability, so selecting a web tool without its API key does not expose it.

Read about access and quotas and trust-level tools.

Local forum search and privacy

:biohazard: Please understand the embedding scope before enabling local forum search.

The default benchmark_user strategy embeds content visible to a suitable user at the configured trust level. The categories strategy embeds content from explicitly selected Categories. Semantic search is optimised for speed and does not repeat a visibility check for every person asking the bot, so matching content may be shared outside its original audience if the scope includes restricted content.

Private Messages are never embedded. Keep the benchmark trust level low, avoid private Categories unless their contents may be disclosed to every Chatbot user, and remove local_forum_search from trust levels that should not use it.

The selected providers may receive conversation content, uploads, embedded search matches, and tool results. Review their retention and data-use terms, and disclose this processing in your forum’s terms and privacy notice.

Read the full embeddings, scope, and privacy guide.

Quick start

  1. Install the plugin using the normal self-hosted plugin procedure.
  2. Select chatbot_llm_provider, enter that provider’s API key, and choose models for each trust level.
  3. Add groups to the low-, medium-, or high-trust access settings and configure quotas.
  4. Choose the built-in tools available to each trust level.
  5. If you enable local_forum_search, configure its embedding provider and carefully review its scope.
  6. Mention the bot, reply to it, use the quick-access button, or configure a Category auto-response prompt.

Quick OpenAI example

  1. Create an OpenAI API key and ensure API billing is enabled.
  2. Set chatbot_llm_provider to OpenAI and paste the key into chatbot_open_ai_token.
  3. Leave the custom URL blank, choose an OpenAI model for each trust level you intend to use, and add your test group to the matching Chatbot access setting.
  4. Mention the bot in an allowed Topic, Personal Message, or Chat to test it.

The repository README is the source of truth for prerequisites, every major setting group, provider-specific behavior, custom endpoints, embedding maintenance, prompt customization, debugging, extension development, and uninstalling:

:books: Open the complete README

Selected UI features

Categories can welcome a new Topic and ask the bot to search for relevant community content:

The optional quick-access button can open a direct Chat or Personal Message with the bot:

The User Fields tool can collect supported empty fields privately:

User Fields collection

Support and sponsorship

Please report support requests, bugs, UX feedback, and feature ideas in this Meta topic. Include the provider, model name, relevant settings, HTTP status and provider response body, while removing API keys and private content.

This work depends on community support. If the plugin is valuable to your site, please sponsor its ongoing maintenance.

Project sponsors

Sponsor Level Website
Surety Silver Plus suretyhome.com

Disclaimer

LLMs can produce convincing but incorrect output. Test the plugin against your community’s needs, understand the privacy and cost implications, and apply appropriate moderation. Generated-output terms differ by provider and jurisdiction; review the terms for every provider you enable.

104 Likes
Building a technical support chatbot
Answer feature
Webhooks on chat messages?
How to check what prevents rake migrate?
Weekly Summary of AI topics
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Interact with discourse from Python?
Sidekiq not working
Locations Plugin :earth_africa:
Lessons from Colossal Caves
Issue after Rebuilding Discourse on Digital Ocean Droplet
Locations Plugin :earth_africa:
I have error when upgrade new version of discourse
I have error when upgrade new version of discourse
Site down after upgrade via SSH - how to fix?
2023: The Year in Review
Character count when writing description
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Is there an option to use Discourse Chat as a customer service type of chat?
Configure AI Chatbot for Trust Level 0 Access
Creating bot on discourse
AI Helper Plugin
Copy custom file in discourse container while build
Voice to text integration
Allow specifiy user different from guardian.user in chat services such as Chat::CreateMessage
How to add a ChatGPT trained AI to discourse?
Cannot get the js in my component to compile SyntaxError: Private field must be used in an enclosing class
Allow ChatBot to read PDFs so it can join in a group discussion
How to create a custom ChatGPT based bot?
Discourse and Coveo
Link for new DM / personal chat message with pre-filled information
UX IPhone issues
How to respond to automatic topics with AI
Comparison between discourse-ai AI Bot and merefield/discourse-chatbot
Allow multiple ‘new topic’ drafts
I have error when upgrade the latest discourse
Two different answers from gpt4o - one right, one wrong.. !?
Is the shortcut to start AI conversation a user setting or not?
Setting Form Templates with a tag
Recommendation: chatbot to support discussion in threads
Photography Mentor Bot
Grouped Site Settings under Headings in Plugins
Update Not Completed and Discourse not opening
Recommendation: chatbot to support discussion in threads
Discourse AI Topic Summary :robot:
Discourse AI Topic Summary :robot:
Hubot Adapter for Discourse
Hubot Adapter for Discourse
Verbose log
Making the case for a hard cap feature on user group AI usage for AI bots and AI Helper
LLMs and the impact on customer support
2024: The Year in Review
How to respond to automatic topics with AI
What User Information is Exposed to LLMs in Discourse AI
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Configure AI Chatbot for Trust Level 0 Access
Auto responder using AI
Locations Plugin :earth_africa:
Discourse AI Topic Summary :robot:
Discourse Chat Bridge (Telegram)
AI personas integration of the chat plugin: It would be great if site users could chat with AI personas
What's the best way to store data with a plugin?
Locations Plugin :earth_africa:
Locations Plugin :earth_africa:
Is there any built-in chatbot or conversational assistant available in Discourse?
ChatGPT Assistant Integration
Create posts with AI
Multisite vs multiple containers
Training a model on a site's posts?
How are we all feeling about ChatGPT and other LLMs and how they'll impact forums?
GPT-4 with vision available
Use AI to request summary and others things from topic
Upgrading from /admin/upgrade takes *very* long
Embed additional explainer text in Form Template
We need prompt chains: Allow custom AI persona tools to access LangChain.js and/or longer execution time
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)
Configure AI Chatbot for Trust Level 0 Access
Enabling AI Bot in Chat
When I start a conversation with the AI, it gives two answers to my question
Balancing Costs and Functionality in AI-Powered Forums
Advice on a support bot for a technical support forum (Discourse AI vs Discourse Chatbot)