Building a bot

Everything in this section is code you write against one neutral API. None of it is platform-specific: the same handlers run on Slack, Google Chat and Microsoft Teams, and Capabilities is how they cope with the differences.

The usual order of reading:

  1. Sending messages — composing a reply with the fluent builder.
  2. Handling events — the five things a bot can be told about.
  3. Capabilities — checking a feature exists before using it.
  4. Mentions and direct messages — reaching a particular person.
  5. AI and tools — letting a model answer, and call your code.
  6. The knowledge base — where the answers come from.
  7. The knowledge-base website — the same answers, published for people.
  8. Recording what people ask — the questions, counted, where you can read them.

A bot is a defineBot({ … }) object of optional handlers and a createBotRuntime({ bot, platforms }) default export. There is nothing else to wire.

← The bot-scaffolding skillSending messages →