What Wingman is

Wingman is a TypeScript SDK for building bots that live in a company's chat system. You write handlers against one neutral API; Wingman translates them to whichever platform the customer runs.

A Wingman bot is an ordinary Cloudflare Worker. It receives webhooks from the chat platform, decides what to do, and replies. There is no server to run and no queue to operate.

The pieces

Package What it gives you
@wingman/core The neutral message model, event taxonomy, Conversation facade and the Worker runtime.
@wingman/ai Env-configured LLM client, a tool registry, and the tool-calling loop.
@wingman/knowledge-base Markdown documents, the search/read tools the model calls, and the mapping to the website they are published as.
@wingman/platform-slack The Slack integration.

The shape of a bot

import { createBotRuntime, defineBot, isAddressedToBot } from "@wingman/core";
import { slackPlatform } from "@wingman/platform-slack";

const bot = defineBot({
  name: "support",
  async onMessage(event, conversation) {
    if (!isAddressedToBot(event)) return;
    await conversation.reply(`You said: ${event.message.text}`);
  },
});

export default createBotRuntime({ bot, platforms: [slackPlatform] });

That is a complete, deployable bot.

Why one neutral layer

Chat platforms disagree about almost everything: Slack has threads and ephemeral messages, an email channel has neither, and every one of them has its own rich text dialect. Wingman exposes the full feature set and lets a bot ask conversation.canSendButtons before using one, rather than reducing every platform to plain text. See Capabilities.

The knowledge base is also this website

A bot answers from a set of Markdown documents in its own repository. Those same documents are generated into a static documentation site that the bot's Worker serves — the page you are reading is one of them — so an answer in chat can end with a link to the whole article. One deployment is both the bot and its documentation. See The knowledge-base website.

The bot is on this page too, in the chat panel. Try it: What can you do? — its answer is the menu these documents declare.

Related: Getting started, Sending messages, Handling events.

Getting started →