defaultSlackContext
The Slack context entries the adapter ships ā tagging procedure, Markdown-vs-mrkdwn guidance, and the thread/DM conversation model.
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:
| Entry | Teaches the agent |
|---|---|
slackTaggingContext | How to @-mention people: resolve via the lookup_slack_user tool and paste the returned <@Uā¦> mention verbatim |
slackFormattingContext | What formatting survives in Slack ā Markdown is translated to mrkdwn for it (see markdownToMrkdwn) |
slackConversationModelContext | The Slack conversation model ā channels, threads, and DMs, and how the bot participates in each |
Usage
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 }).
Related
- defaultSlackTools ā the companion tool the tagging procedure relies on
- createBot ā the
contextoption - slack() ā the adapter