Discourse AI - AI bot

:bookmark: This guide explains how to enable and configure the AI bot feature of the Discourse AI plugin.

:person_raising_hand: Required user level: Administrator

The smart chatbot can answer all questions about your Discourse community and more. The AI Bot has the power to search through your current Discourse instance and beyond with agent support to answer any type of questions you might have.

Features

  • Ability to pick the specific AI Bot agent you want to interact with
  • Flexibility to select the Large Language Model (LLM) provider
  • Multiple people can interact with the AI Bot at the same time within the same message
  • AI-generated titles for private messages (PMs) with the AI Bot
  • Replies are generated continuously through streaming and can be stopped
  • Enable the bot for a specific subset of users or groups
  • Quick access to AI bot via :robot: icon
  • View interactions for debugging purposes
  • Copy and share AI bot conversations

Agents

:information_source: An AI bot that tries to do everything will eventually fail due to forgetting context and LLM limitations. Thatโ€™s why we have implemented agents to help you get a better experience by delivering the best possible answers.

Full guide to AI agents available here. You can create custom AI agents for the bot that are tailored to your needs.

Depending on the help you need, there are several pre-defined default agents to choose from

  • Forum Helper: General purpose AI bot capable of performing various tasks. Can search your current Discourse instance and use that information to build responses
    • i.e - What are the top posts for AI?
  • SQL Helper: AI Bot specialized in helping craft SQL queries on this Discourse Instance (aware of your current DB schema)
    • i.e - Write me a query to find all the AI bot messages by a specific customer/user
  • Artist: AI Bot specialized in generating images. Requires a configured image generation tool
    • i.e - Draw me a picture of a cat
  • Designer: AI Bot specialized in generating and editing images
  • Settings Explorer: AI Bot specialized in helping explore Discourse site settings. (aware of Discourse source code)
    • i.e - How do I enable Discourse AI on my Discourse site?
  • Web Researcher: AI Bot with Google access and the ability to browse web pages to research information for you. Needs a Google Custom Search API key.
    • i.e - How many legs does a dinosaur have?
  • Creative: AI Bot without any external integrations
    • i.e - Come up with 5 ideas to improve community engagement
  • GitHub Helper: AI Bot specializing in researching GitHub repositories
    • i.e - What does LINK_TO_PR do?
  • Discourse Helper: AI Bot specialized in helping with Discourse related tasks, searches meta.discourse.org
  • Forum Researcher: AI Bot specialized in deep research for the forum
  • Web Artifact Creator: AI Bot specialized in creating interactive web artifacts

Enabling AI Bot

Prerequisites

You must configure at least one Large Language Model (LLM) from a provider.

To get started you can configure them through the Discourse AI - Large Language Model (LLM) settings page.

Optionally, configure the following to get extra features:

  • Image generation tool โ†’ Generate images (used by Artist and Designer agents)
  • Google Custom Search โ†’ Search the internet for answers through Google

Configuration

  1. Go to Admin settingsโ†’ Plugins โ†’ AI โ†’ Settings tab and make sure its enabled (discourse ai enabled)
  2. Checkmark ai bot enabled to enable AI Bot
  3. Checkmark ai bot add to header to enable quick access via the :robot: icon at the top right
  4. We recommend picking the group of users through ai bot allowed groups to allow specific access to the AI Bot.
  5. Use the ai bot enabled llms setting to select which LLMs should be available for AI bot conversations.

Monitoring discussions

In some cases, you may want to monitor bot discussions so you can improve the performance of your bots.

If you plan to do so, we recommend enabling the ai_bot_enable_chat_warning, this will show a warning to users explaining that conversations are monitored.

Then as an administrator, add a link to your sidebar:

https://discourse.example.com/u/BOT_NAME/messages

BOT_NAME is the username of the bot you wish to monitor.

Technical FAQ

Why am I seeing bot users being added to my site?

  • These users are necessary for AI Bot to function. They donโ€™t do anything in the background and are only used when interacting with the bot.

Where do I edit agents?

  • Head to discourse.example.com/admin/plugins/discourse-ai/ai-agents where you can control which agents are enabled and who gets access to each one.

Is the AI Bot trained on my community data?

Caveats

  • The AI bot is an area of much experimentation and is changing rapidly
  • The AI bot does not always provide 100% accurate results, so make sure to check any output carefully
  • We recommend enabling the bot for specific user groups to help control costs, as third-party providers charge on a per-usage basis

Last edited by @Lilly 2025-07-16T19:12:06Z

Last checked by @hugh 2024-08-06T01:48:26Z

Check documentPerform check on document:
42 Likes