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
| Name | Purpose |
|---|---|
slackPostMessage | Post to a channel or DM (supports threading + blocks) |
slackSearch | search.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 forsearch). - Create a Slack app → OAuth & Permissions → install to workspace.
Related
- Integrations overview · discord — sibling.
- Recipes: discord-bot (mirror for Discord).