Slack agent

BYOA (Bring Your Own Agent) to Slack.

Based on the Vercel Slackbot Agent Guide, adapted for Val Town.

Models

This template uses Claude Sonnet 4.6 directly in lib/generate-response.ts, which requires setting an ANTHROPIC_API_KEY environment variable. Alternatively, you could use a gateway to switch between models easily, like the Vercel AI Gateway or the Kilo Gateway.

Tools

This agent comes with the following tools:

  1. Anthropic web search
  2. Val Town MCP server

You should of course edit and add your own tools! That's the whole point of BYOA :)

Version pinning

This val uses pinned imports (latest package version as of 2/19/26) to avoid breaking changes:

  1. @slack/web-api@7.14.1
  2. hono@4.12.0
  3. ai@6.0.92
  4. @ai-sdk/anthropic@3.0.45
  5. @ai-sdk/mcp@1.0.21