Skip to main content
This example builds claudetag: mention @claudetag in a Slack channel and the agent works in the thread. It posts a checklist of what it is doing, edited in place, with a Stop button; then its answer; then any files it made. Anyone in the thread steers it by replying. Each channel has its own agent, with its own sandbox and memory, created from the template you map that channel to; each thread is a session of it. It is one Node service built on Slack Bolt for JavaScript and @paddockai/server, in examples/claudetag of the paddock repository, with its Slack app manifest, a Dockerfile, and Kubernetes manifests. The Slack tokens stay in the service, and the agent never talks to Slack.

How it maps Slack onto paddock

paddock is the only state the service keeps: it finds a channel’s agent and a thread’s session with a metadata filter, so it needs no database. It remembers recent threads in memory, so a reply in a thread it is not in costs no lookup.

Run it

  1. In the repository, build the SDK and install the example:
  2. At api.slack.com/apps, create an app From a manifest with the example’s manifest.yaml, install it to your workspace, and copy the bot token (xoxb-…). Under App-Level Tokens, create a token with connections:write (xapp-…) for Socket Mode.
  3. Copy .env.example to .env and set SLACK_BOT_TOKEN, SLACK_APP_TOKEN, and PADDOCK_API_KEY. Without a key, the service uses the CLI’s login.
  4. pnpm dev, then in a channel /invite @claudetag and mention it.
Socket Mode needs no public URL. In production, set SLACK_MODE=http with SLACK_SIGNING_SECRET: the service serves Slack’s Events API at POST /slack/events, verifies every request’s signature, answers the URL verification challenge, and acknowledges within Slack’s 3 seconds. Run one instance.

Map channels to templates

A channel’s agent comes from the built-in claude-code-native unless you map the channel to a template of your own in claudetag.yaml:
claudetag.yaml
agentSetup adds MCP servers and environment variables to every agent created from a template, with ${VAR} read from the service’s environment, so no template document carries a token. From Slack, /claudetag status shows the channel’s agent, and /claudetag template github-pr@2 gives the channel a new agent from that template for the threads started next. An agent never changes template, so a new mapping always means a new agent; threads already started keep theirs.

A template that opens pull requests

The example’s templates/github-pr.yaml is Claude Code with a system prompt for turning a request into a pull request. Its system prompt replaces Claude Code’s own, so it states the whole job:
templates/github-pr.yaml
Create it with paddock templates create -f templates/github-pr.yaml, set GITHUB_TOKEN to a fine-grained token with read and write access to the repositories’ contents and pull requests, map a channel to github-pr with the agentSetup above, and restart the service. Then: @claudetag in acme/web, make the footer year dynamic and open a PR.

Deploy

The example’s Dockerfile builds from the repository root, and deploy/k8s runs it as one replica with its tokens in a Secret and claudetag.yaml in a ConfigMap. The example’s README covers both, and the script that deploys it to paddock’s own test cluster.