Slackエージェントの構築は簡単になる
VercelはSlackエージェント構築を簡素化する「Slack agent skill」を発表し、Claude CodeなどのコーディングAIエージェントと連携して、OAuth設定からデプロイまでを自動化するワークフローを提供している。
キーポイント
Slackエージェント構築の複雑性の解消
従来のSlackアプリ開発に必要なAPIコンソール設定、OAuthスコープ、Webhookハンドラ、インフラストラクチャの調整といった複雑な手順を、Vercelのスキルによって一元化し簡素化する。
コーディングエージェントとの統合
Claude Code、OpenCode、Cursor、GitHub CopilotなどのAIコーディングエージェントと連携し、自然言語での指示からカスタム実装計画の生成、コード生成、デプロイまでを単一セッションで完了させる。
5段階の自動化ワークフロー
プロジェクト設定、Slackアプリ作成(マニフェスト自動生成)、環境変数設定、ローカルテスト、本番デプロイという5つの段階をwizardが案内し、開発者の手動介入を最小限に抑える。
高度なエージェント機能の実装
マルチターン会話、人間の承認による安全アクションの制御、リアルタイムストリーミング応答、チャネル/スレッドの読み取りといった高度な機能をテンプレートとして提供している。
ツールによるシステム連携
チャンネルの操作に加え、顧客情報の検索やデータベース照会など、カスタムツールを通じて外部システムと連携可能。
Workflow DevKitによる耐久性と効率化
会話の中断・再開や失敗時の自動リトライをサポートし、承認待ちなどの待機時間中はCPU課金が発生しないためコスト効率が高い。
AI Gatewayと拡張機能
単一APIキーで複数プロバイダーのモデルを利用でき、障害時の自動切り替えが可能。また、サンドボックス機能により安全にユーザー提供スクリプトを実行できる。
影響分析・編集コメントを表示
影響分析
本記事は、AIエージェントの実装における「インフラ・設定の壁」を低減する具体的なソリューションを示している。特に、Slackという普及したプラットフォーム上でエージェントを動作させる際の認証やイベントハンドリングといった定型作業を自動化することで、開発者の生産性を大幅に向上させる可能性がある。これはAIエージェントの普及において、技術的な障壁を取り除く重要な一歩である。
編集コメント
Vercelが提供するこのスキルは、Slack上でのエージェント開発における定型作業の負担を軽減する実用的なツールである。ただし、これはあくまで構築支援であり、エージェント自体の知能やロジックは利用者が選択するLLMに依存するため、セキュリティ監査と適切な権限管理が依然として重要である。
タイトル: Slackエージェントの構築をシンプルに
Slackは、すでにチームが働く場所です。メッセージ、スレッド、ボタン、イベントを備え、エージェントにとって自然なインターフェースを提供するため、新しいUIやオンボーディングフローを一から考案する必要はありません。しかし、「Slackエージェントが欲しい」という思いから、実際に稼働するデプロイメントに至るまでには、多くのシステムにまたがる調整が必要になります:
Slack APIコンソールでのアプリ作成
OAuthスコープとイベントサブスクリプションの設定
Webhookハンドラーと署名検証の実装
Slackの3秒応答ウィンドウに対応できるインフラへのデプロイ
それぞれの要素には個別のドキュメントがあり、それらすべてが連携して動作しなければなりません。
Claude Code、OpenCode、Cursor、GitHub Copilotといったコーディングエージェントは、まさにこの種の調整作業に最適です。ドキュメントを読み、依存関係を推論し、数秒でコードを生成できるからです。私たちはこの特性を活かすためにSlackエージェントスキルを構築しました。これは当社のSlackエージェントテンプレートを基盤としており、お好みのコーディングエージェントと連携します。わずか1回のセッションで、アイデアからVercel上にデプロイされたSlackエージェントまでを実現し、可能なステップは自動化し、自動化できない場合にはクリックすべき場所を正確に示します。
スキルウィザードで、アイデアからデプロイまで
スキルをインストールし、ウィザードを実行します:
次に、お使いのエージェントでこのスキルを実行します。Claude Codeの場合の例:
ウィザードはまず、どのようなエージェントを構築したいかを尋ねます。例えば、「社内ドキュメントから質問に答えるサポートエージェント」や「毎朝チームから進捗報告を収集するスタンドアップボット」などと答えるでしょう。あなたの回答に基づき、ユースケースに合わせたカスタム実装計画を生成します。コードが書かれる前に、この計画を確認・承認します。
その後、以下の5つのステージを進みます:
- プロジェクトセットアップ: LLMプロバイダーを選択すると、エージェントがSlackエージェントテンプレートからプロジェクトのスキャフォールディングを行います。
- Slackアプリ作成: エージェントがアプリ名、説明、ボット表示設定を用いて
manifest.jsonをカスタマイズし、Slackのコンソールを開いてアプリの作成とワークスペースへのインストールを案内します。OAuthスコープ、イベントサブスクリプション、スラッシュコマンドはテンプレートから事前設定済みです。 - 環境設定: エージェントが署名シークレット、ボットトークン、およびプロジェクトに必要なAPIキーの設定を案内します。
- ローカルテスト: エージェントが開発サーバーを起動し、Slackに接続します。これにより、本番環境に影響を与える前に、ボットにメッセージを送信し、リアルタイムで応答を確認できます。
- 本番デプロイ: エージェントがVercelへのデプロイと環境変数の設定を案内します。ここからは、すべてのgitプッシュが新しいデプロイメントをトリガーします。
このスキルが提供するもの
Slackエージェントスキルは、以下の能力を持つエージェントを提供します:
- メッセージやスレッドをまたいだマルチターン会話の維持
- 機密性の高いアクションの実行前の、人間による承認のための一時停止
- Slackへのリアルタイムのレスポンスストリーミング
- チャンネルやスレッドの自主的な読み取り
あなたのエージェントは、ツールを通じてSlackや他のシステムと対話します。ツールとは、アクションを実行したり情報を取得したりするために呼び出せる関数です。テンプレートには以下のツールが同梱されています:
- チャンネルメッセージの読み取り
- スレッドコンテキストの取得
- チャンネルへの参加(人間の承認付き)
- 名前、トピック、目的によるチャンネルの検索
また、コーディングエージェントに指示して、自社システムに接続するカスタムツールを追加することもできます。エージェントに顧客レコードを検索させたり、サポートチケットを作成させたり、データベースをクエリさせたりしたいですか?それらはそれぞれ、エージェントが呼び出すタイミングと方法を理解するツールとなります。
Workflow DevKitがエージェントに持続性をもたらします。Slackエージェントは、多くのメッセージにわたって会話を維持したり、誰かがリクエストを承認するのを何時間も待ったりする必要がよくあります。Workflow DevKitにより、エージェントは会話の途中で中断し、外部入力を待ち、中断した場所から正確に再開できます。ツール呼び出しは失敗時に自動的に再試行され、レスポンスはリアルタイムでSlackにストリーミングされます。
Human-in-the-loop(人間の介在) が組み込まれています。エージェントがチャンネルへの参加などの機密アクションを実行する必要がある場合、「承認」と「拒否」ボタン付きのメッセージを投稿して中断します。課金はアクティブなCPU時間に対してのみ発生するため、承認に数日かかっても、待機中はコストがかかりません。このパターンは、メッセージ送信、データ変更、外部API呼び出しなど、承認を必要とするあらゆるアクションに適用できます。
AI Gatewayにより、単一のAPIキーで全ての主要プロバイダーから数百のモデルにエージェントがアクセス可能になります。モデル切り替えは1行の変更で済み、プロバイダーがダウンした場合でもAI Gatewayが自動的に別のプロバイダーにルーティングするため、エージェントは稼働し続けます。
さらに深く知る
エージェントが稼働したら、それを拡張し、より深く理解するための方法がいくつかあります。
当社のVercel Academy「Slackエージェント」コースは、Slackアプリの作成・設定から、イベントとインタラクティブメッセージの処理、AI SDKを使ったエージェント構築、本番環境へのデプロイまで、ライフサイクル全体をカバーしています。
Vercelプレビューデプロイメントを使えば、本番環境に反映する前に変更をテストできます。Slackボットの場合、SlackのWebhook検証がエンドポイントに到達できるよう、デプロイメント保護をバイパスする必要があるかもしれません。設定方法については、テストガイドで説明しています。
Vercel Sandboxesにより、エージェントは隔離された環境でコードを実行できるようになります。これにより、スプレッドシートの分析、チャートの生成、データ変換といったユーザー提供のスクリプトを、自社のインフラを危険にさらすことなく実行できます。
今すぐ始めましょう
このすべての体験は、コーディングエージェントとの1回のセッションで完了します。
Slack Agent Skill
Slack Agent Template
Vercel Academy: Slack Agents
Read more
原文を表示
Slack is already where teams work. It provides a natural interface for agents, with messages, threads, buttons, and events, so you don't need to invent a new UI or onboarding flow. Getting from "I want a Slack agent" to a running deployment, though, means coordinating across a lot of systems:
Creating an app in the Slack API console
Configuring OAuth scopes and event subscriptions
Writing webhook handlers and signature verification
Deploying to infrastructure that can handle Slack's 3-second response window
Each piece has its own docs, and they all need to work together.
Coding agents like Claude Code, OpenCode, Cursor, and GitHub Copilot are well suited for exactly this kind of coordination because they can read docs, reason through dependencies, and generate code in seconds. We built the Slack agent skill to take advantage of that. It builds on our Slack Agent Template, works with the coding agent of your choice, and takes you from idea to a deployed Slack agent on Vercel in a single session, automating steps when possible and showing you exactly what to click when it can't.
From idea to deployed agent with the skill wizard
Install the skill and run the wizard:
Then run the skill in your agent. For example, with Claude Code:
The wizard starts by asking what kind of agent you want to build. You might say "a support agent that answers questions from our internal docs," or "a standup bot that collects updates from the team every morning." Based on your answer, it generates a custom implementation plan tailored to your use case. You review and approve the plan before any code is written.
From there, you move through five stages:
Project setup: You choose your LLM provider, and the agent scaffolds your project from our Slack Agent Template.
Slack app creation: The agent customizes your manifest.json with your app name, description, and bot display settings, then opens Slack's console and walks you through creating the app and installing it to your workspace. OAuth scopes, event subscriptions, and slash commands come pre-configured from the template.
Environment configuration: The agent walks you through setting up your signing secret, bot token, and any API keys your project needs.
Local testing: The agent starts your dev server and connects it to Slack so you can message your bot and see it respond in real time before anything touches production.
Production deployment: The agent walks you through deploying to Vercel and setting up your environment variables. From this point, every git push triggers a new deployment.
What the skill gives you
The Slack agent skill gives you an agent that can:
Hold multi-turn conversations across messages and threads
Pause for human approval before taking sensitive actions
Stream responses to Slack in real time
Read channels and threads on its own
Your agent interacts with Slack and your systems through tools, functions it can call to take actions or retrieve information. The template ships with tools for:
Reading channel messages
Fetching thread context
Joining channels (with human approval)
Searching channels by name, topic, or purpose
You can also tell your coding agent to add custom tools that connect to your own systems. Want the agent to look up a customer record, create a support ticket, or query a database? Each of those becomes a tool the agent knows when and how to call.
Workflow DevKit is what makes the agent durable. A Slack agent often needs to hold a conversation across many messages, or wait hours for someone to approve a request. Workflow DevKit lets the agent suspend mid-conversation, wait for external input, and pick back up exactly where it left off. Tool calls are automatically retried on failure, and responses stream back to Slack in real time.
Human-in-the-loop is built in. When the agent needs to perform a sensitive action like joining a channel, it posts a message with Approve and Reject buttons and suspends. You're only billed for active CPU time, so waiting costs nothing, even if approval takes days. This pattern extends to any action requiring approval, from sending messages to modifying data to calling external APIs.
AI Gateway gives your agent access to hundreds of models from every major provider through a single API key. Switching models is a one-line change, and if a provider goes down, AI Gateway automatically routes to another so your agent stays up.
Going deeper
Once your agent is live, there are a few ways to extend it and understand it better.
Our Vercel Academy Slack Agents course covers the entire lifecycle, from creating and configuring a Slack app to handling events and interactive messages, building agents with the AI SDK, and deploying to production.
Vercel preview deployments let you test changes before they reach production. For Slack bots, this may require bypassing deployment protection so Slack's webhook verification can reach your endpoint. Our testing guide explains how to set this up.
Vercel Sandboxes let your agent execute code in isolated environments, so it can run user-provided scripts like analyzing a spreadsheet, generating a chart, or transforming data without risking your infrastructure.
Get started
The whole experience fits in one session with your coding agent.
Slack Agent Skill
Slack Agent Template
Vercel Academy: Slack Agents
Read more
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み