agentskit.js
ToolsIntegrations

slack

Slack Web API — post messages, search history. For notifier bots + conversational search over a workspace.

import { slack } from '@agentskit/tools'

const runtime = createRuntime({
  adapter,
  tools: [...slack({ token: process.env.SLACK_BOT_TOKEN! })],
})

Sub-tools

NamePurpose
slackPostMessagePost to a channel or DM (supports threading + blocks)
slackSearchsearch.messages — query your workspace history

Bundled: slack(config).

Config

type SlackConfig = {
  token: string         // Bot token (xoxb-...) or user token (xoxp-...)
  defaultChannel?: string
  fetch?: typeof fetch
}

Example — daily digest bot

const runtime = createRuntime({
  adapter,
  tools: [
    ...slack({ token, defaultChannel: 'C012345' }),
    ...github({ token: process.env.GITHUB_TOKEN! }),
  ],
})

await runtime.run('Summarize yesterday\'s merged PRs and post to #eng-updates')

Scopes

  • Bot tokens need: chat:write, channels:history, search:read (user-token-only for search).
  • Create a Slack app → OAuth & Permissions → install to workspace.
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page