Skip to main content

Quickstart: creating a Slack agent

This quickstart will show you how to create an AI-powered Slack support agent (Casey) using the Slack CLI and the Bolt frameworks.

With Casey, users can:

  • choose from common issue categories via App Home, provide info via a modal, and Casey will start a DM thread with a resolution.
  • describe IT issues via Direct Message and Casey responds in-thread, maintaining context across follow-ups.
  • App mention @Casey in any channel to get help without leaving the conversation.

Casey can be set up to handle password resets, support tickets, and knowledge searches. It'll always put an 👀 reaction on your issue and a ✅ when the issue is resolved.

You can expand it with additional functionality as well using any of three popular agent frameworks: the Claude SDK, OpenAI SDK, and Pydantic AI Framework.

Intrigued? Grab your tools by following the three steps below.

1

Install the Slack CLI

Download the command-line tool for developing Slack apps.

curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash
2

Connect to your workspace

Log in and authenticate with your Slack workspace.

slack login
3

Use Casey as a template

Create a project using the Support Agent sample app

slack create agent

You now have the Slack CLI and the support agent sample app ready for use. Open up the app in your editor of choice and let's explore what the agent can actually do.


Choosing your framework

Casey is framework-agnostic, or at least framework-indecisive. You can use any of the three following AI agent frameworks:

We'll be using the Claude Agent SDK as an example, but Casey is equally built for all three frameworks.

cd claude-agent-sdk

Setting up your environment

  1. Create an .env file from .env.sample
cp .env.sample .env
  1. Add your credentials to .env:
ANTHROPIC_API_KEY=super-secret-anthropic-key

Running the app

There's a Slack CLI command for that!

slack run

Using Casey

Now that Casey is running, let's try using it!

Try asking Casey a question like "What's GitHub's current status?" Casey will react 👀 while processing. (Remember, Casey is using mocked data. You'll want to add your own tools to fetch accurate data.)

Once Casey provides a solution, let it know! It'll add a ✅ reaction to mark the ticket as resolved.


Onward

That's what Casey is right now; but Casey can be yours! Here are some next steps to build out an agent of your very own.

→ Casey can be configured to use the Slack MCP Server. Check out Developing a sample app with the Slack MCP Server for more info on doing so.

✨ Curious about how Casey does what it does? Read Adding agent features with Bolt for Python or Adding agent features with Bolt for JavaScript.

✨ If you'd like a more blank canvas to paint upon, the Bolt Python starter agent and the Bolt JavaScript starter agent are made for you.