Build a Custom Slack Agent Quickly With the CLI (Full Transcript)

Learn to scaffold, configure, extend, and deploy a personalized Slack agent using the Slack CLI and the generated agent.js file.
Download Transcript (DOCX)
Transcription editor
Slack School Create Agents with Slack CLI
Added on 10/29/2026
Speakers
add Add new speaker

[00:00:00] Speaker 1: Do you want to see how easy it is to create an agent in Slack? Watch this. Hello, and welcome back to Slack School. My name is Mike Reynolds. I'm your host. I'm part of the Slack team here at Salesforce. And today we are going to look at exactly how easy it is to create your very own agent in Slack. Of course, we're going to be using the CLI or the command line interface to do this. So if you haven't already set that up, be sure to check out our episode where we explain how. Let's get after it. Now there are a lot of reasons why you'd want to create your very own agent. I think one of the biggest is to be able to have a counterpart that either helps you write code or helps you review the code from a particular angle. I've talked about this before where you might have, you know, let's say I want a specific agent that's going to be able to help me with doing QA work or understanding InfoSec policies or making sure that my build is going to be audited well when it comes time for my annual SOCKS audit. These are all agents that can have a persona which will help guide them to do exactly what you want. The idea that you just have a coding agent or something along those lines is kind of short-sighted. We can do a whole lot more than that. And that's why you need to be able to create your own agents. So let's take a look at how we'll do this. Of course, I've already got my Slack CLI installed and set up again. So I'm assuming that. And what we're going to do is we're going to start out by logging in. We're not going to get much done if we're not authenticated. So I'm going to go ahead and copy my line here. We'll open up anywhere in Slack, paste that in there. We're going to confirm. I'm going to copy my challenge code, come back into VS Code, and we'll paste that challenge code in. And now I'm properly authenticated. It's asking me if I want to update. Yeah, I'd love to do an update. Let's do that real quick. It's always nice to be able to update all of those things as you continue using it. I'm going to type clear just to kind of get that out of the way. So now I've logged in and I'm ready to create an agent. So all of our Slack CLI commands are going to start with Slack. So I want to go with Slack create because I'm going to create something. And I'm just going to say agent because I'm creating an agent. Now here's the thing. We can start with a starter agent or a support agent, and we've got some nuanced differences in the agent.js file. We'll look at that in a second. I'm just going to use this starter agent. And we can choose either JavaScript based or Python based. Again, these are just starters. You could always build your own. I'm just going to leave it at JavaScript. And do I want to use Cloud or do I want to go OpenAI? Again, we've got more flexibility than that. This is just what comes out of the box. I'm just going to choose Cloud. We need to give the app a name. How about ... So you'll notice a bunch of things are going to happen. What Slack's CLI is going to do for you here is create essentially the boilerplate code that is going to get you way, way, way down the road as opposed to doing this all from scratch. So up here, I now have a new folder. It's got everything I said I wanted to use Cloud, so it's got everything that Cloud needs as well as this agent.js file, the listeners, which are going to get all of the different events or actions that we have. It's going to ship with a feedback process. There's a couple of different things in here. The ability to do messages or the app being mentioned or the app home being opened. Those are the basic entry points of working with an agent. You're either app mentioning it or going directly to the home page of the app and then doing something there. All of that comes right out of the box. The most important file is your agent.js file. Most of what your agent does and is is going to live right here, and so we're going to spend a little bit of time looking at that file. Again, you've got some basics information in here. We'll start with this top line here, line five. It just says, hey, here's what you're supposed to do. Again, if I were trying to build a QA agent, I would want to tailor this quite a bit for that specific QA example. Similarly, you can give it information about its personality, some response guidelines like is this really what you want? Do I really only want three sentences at a time out of you or am I willing to have quite a bit more? Rules around formatting. You will notice these are escaped. These apostrophes are escaped and that's good. I want to continue doing that. It's also got guidance on how to interact with emojis, the Slack MCP server because we really want to be leveraging all of Slack's MCP capabilities here, as well as a lot of other things around like here are the emojis that I want you to use and when to use them. If you've got business processes that are anchored off of emojis, this is a great thing to include here. And then as we go a little bit farther down, you're going to start to get some information about what this agent can actually do. I'm going to highlight this line. This is the allowed tools. Right now, the only tool that this agent can use is an emoji reaction. So I'm going to have to write some code to be able to extend the agent's capabilities into other spaces. Now honestly, that's it. That's all it takes to create this agent. What I would typically do from here is add in the extra capabilities and features that I want my agent to be able to have. If I wanted to add capabilities or add tools like I have with my at Jolly Roger agent, which you can see at in this episode, you can see at in this episode, you can see in this episode, that one. We've written other tools that the agent can then use. If you have specific functions, you're going to have to code those on your own. You can always ask your local Slack bot for tips on how to do that or examples because Slack bot's pretty good at that kind of thing. Or you can use another general coding agent. Well there you have it. Creating an agent with Slack is really easy. All we've got to do once we've set up the Slack CLI is log in with Slack login, then Slack create agent. The single command, we've got a couple of choices about what type of agent and what underlying LLM we're going to use. But after that, we're off to the races. We can always deploy our agent by typing Slack deploy. The CLI makes it really easy to do this. All we've got to do is configure that agent.js file and maybe a couple others with the needed things for the extra functions that we want our agent to be able to do. And of course the most important part, connect it to our LLM. And we do that by passing over a token. Jump into the community at slackcommunity.com and let me know what you thought of the episode. You can go to our channel Slack School in the Slack community workspace and say hi or connect with other people who are on their learning journeys. Don't forget to like and subscribe and we'll see you next time. Oh, hey, I believe in you, you got this. All of the LLMs are using MCP and if they're not, they will be soon. I don't even know why I would say that. Of course they're using MCP. Who's not using MCP?

ai AI Insights
Arow Summary
Mike Reynolds demonstrates how to quickly scaffold a custom Slack agent using the Slack CLI. After authenticating with `slack login`, developers run `slack create agent`, select a starter or support template, choose JavaScript or Python, and select an LLM provider such as Claude or OpenAI. The CLI generates boilerplate files, including listeners and an `agent.js` configuration file. Developers customize the agent’s purpose, persona, response rules, emoji behavior, MCP guidance, and allowed tools in `agent.js`, then add custom code for additional capabilities. The agent can be deployed with `slack deploy` and connected to its LLM using a token.
Arow Title
How to Create a Custom Slack Agent with the CLI
Arow Keywords
Slack CLI Remove
Slack agent Remove
agent.js Remove
MCP Remove
Claude Remove
OpenAI Remove
JavaScript Remove
Python Remove
custom tools Remove
Slack deploy Remove
Arow Key Takeaways
  • Authenticate the Slack CLI first with `slack login`.
  • Create a starter project using `slack create agent` and choose a template, language, and LLM provider.
  • The generated project includes listeners and entry points for mentions, messages, app home, and feedback.
  • Customize the agent’s role, personality, response guidelines, formatting, emoji behavior, MCP usage, and permissions in `agent.js`.
  • The starter agent initially has limited tools, such as emoji reactions; additional tools and functions require custom code.
  • Deploy the finished agent with `slack deploy` and provide an LLM token to connect the model.
Arow Sentiments
Positive: The speaker is enthusiastic, encouraging, and confident about how approachable custom Slack agent development is.
Arow Enter your query
{{ secondsToHumanTime(time) }}
Back
Forward
{{ Math.round(speed * 100) / 100 }}x
{{ secondsToHumanTime(duration) }}
close
New speaker
Add speaker
close
Edit speaker
Save changes
close
Share Transcript