Skip to content

Slack Integration

AI Intern connects directly to your team Slack workspace. Developers can trigger coding tasks, inspect plans, and grant approval directly in thread conversations.

The Slack integration is powered by the Orchestrator Worker and Durable Objects:

  1. Inbound Webhook: Slack sends event notifications (app_mention or direct message) to POST /api/slack/events.
  2. Signature Verification: The Worker validates the X-Slack-Signature and timestamp using your configured SLACK_SIGNING_SECRET.
  3. Task Coordination: The Captain agent parses the prompt, identifies referenced GitHub repositories, and formulates a plan.
  4. Interactive Card: The agent posts an interactive Block Kit card with Approve Run and Reject buttons.
  5. Execution Feedback: While the sandbox container runs, streaming status updates keep the team informed in the Slack thread.
  1. Create a Slack App Navigate to api.slack.com/apps and create a new application in your workspace.

  2. Configure Bot Token Scopes Under OAuth & Permissions, add the following Bot Token Scopes:

    • chat:write (post messages and replies)
    • app_mentions:read (listen for @AI Intern mentions)
    • channels:history (read thread context)
  3. Enable Event Subscriptions Set the Request URL to your Cloudflare Worker endpoint:

    https://your-worker.workers.dev/api/slack/events

    Subscribe to bot events: app_mention.

  4. Enable Interactivity Under Interactivity & Shortcuts, enable interactivity and set the Request URL:

    https://your-worker.workers.dev/api/slack/interactive
  5. Store Secrets with Wrangler Set the secrets in your Cloudflare environment:

    Terminal window
    pnpm wrangler secret put SLACK_BOT_TOKEN
    pnpm wrangler secret put SLACK_SIGNING_SECRET

In any public or private channel where the bot is invited:

Developer: @AI Intern fix the typo in README.md and add pnpm instructions

AI Intern: 📋 Delegation Plan Prepared

  • Target: princepal9120/ai-intern (main branch)
  • Action: Update README.md
  • Test Command: pnpm test

[ Approve Run ] [ Reject ]

Once approved, AI Intern spins up an isolated sandbox container, runs the changes, and posts the resulting GitHub PR link directly in the thread.