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
@Caseyin 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.
Install the Slack CLI
Download the command-line tool for developing Slack apps.
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bashConnect to your workspace
Log in and authenticate with your Slack workspace.
slack loginUse Casey as a template
Create a project using the Support Agent sample app
slack create agentYou 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
- Bolt for Python
- Bolt for JavaScript
Casey is framework-agnostic, or at least framework-indecisive. You can use any of the three following AI agent frameworks:
- Claude Agent SDK, within the
claude-agent-sdk/folder. - OpenAI Agents SDK within the
openai-agents-sdk/folder. - Pydantic AI within the
pydantic-ai/folder.
We'll be using the Claude Agent SDK as an example, but Casey is equally built for all three frameworks.
Casey is framework-agnostic, or at least framework-indecisive. You can use any of the two following AI agent frameworks:
- Claude Agent SDK, within the
claude-agent-sdk/folder. - OpenAI Agents SDK within the
openai-agents-sdk/folder.
We'll be using the Claude Agent SDK as an example, but Casey is equally built for both frameworks.
cd claude-agent-sdk
Setting up your environment
- Create an
.envfile from.env.sample
cp .env.sample .env
- 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.