Back to Copilotkit

defaultSlackContext

showcase/shell-docs/src/content/reference/bot/slack/defaultSlackContext.mdx

1.60.11.5 KB
Original Source

Overview

defaultSlackContext is the list of Slack-specific ContextEntry values the package ships, meant to be spread into createBot({ context }). It is not auto-applied — you spread it explicitly. Each entry is also exported individually:

EntryTeaches the agent
slackTaggingContextHow to @-mention people: resolve via the lookup_slack_user tool and paste the returned <@U…> mention verbatim
slackFormattingContextWhat formatting survives in Slack — Markdown is translated to mrkdwn for it (see markdownToMrkdwn)
slackConversationModelContextThe Slack conversation model — channels, threads, and DMs, and how the bot participates in each

Usage

ts
import { defaultSlackContext } from "@copilotkit/bot-slack";

const bot = createBot({
  // …
  context: [...defaultSlackContext, ...myAppContext],
});

Context entries are folded into the agent's system context on every thread.runAgent(); per-run additions go through runAgent({ context }).