FabricFabricHarness
EcosystemChannels

Slack

Dispatch signed Slack events to a persistent agent and reply in-thread.

Create the channel:

.fabricharness/channels/slack.ts
import { createSlackChannel } from '@fabric-harness/channels/slack';

export const channel = createSlackChannel({
  signingSecret: process.env.SLACK_SIGNING_SECRET!,
  agent: 'assistant',
});

Bind the outbound tool to the addressed Slack thread:

.fabricharness/agents/assistant.ts
import { defineAgent } from '@fabric-harness/sdk';
import { parseSlackConversationKey, replyInSlackThread } from '@fabric-harness/channels/slack';

export default defineAgent(({ id }) => ({
  instructions: 'Answer the Slack thread concisely.',
  tools: [replyInSlackThread(parseSlackConversationKey(id), {
    botToken: process.env.SLACK_BOT_TOKEN!,
  })],
}));

Configure the Slack Event Subscriptions request URL as /channels/slack/events and subscribe to app_mention or threaded message events. The adapter verifies Slack's signature, uses event_id for deduplication, and keys the persistent instance by thread.

Required secrets are SLACK_SIGNING_SECRET and SLACK_BOT_TOKEN. The complete project is under examples/with-slack-channel.