Create a Slack AI agent that can chat with users in Slack DMs
Install the CLI
Login to Magma
Use the Slack DM Template
magma init
command is how you create a new Magma agent project. If you provide the -t
flag, it will use the template you specify. Here, we’re using the slack-dm
template.Save the Agent
cd
into the project directory and run:Update the Slack manifest.json
magma save
will return your AGENT_ID
which you will need to update the settings.event_subscriptions.request_url
. The manifest.json
file can be found inside of your slack agent container.manifest.json
file in your project root contains all the necessary Slack app configurations. You only need to update two values.Required Changes
AGENT_NAME
in the display_information
sectionAGENT_ID
in the settings.event_subscriptions.request_url
sectionWhat these values mean
AGENT_NAME
is what users will see when they interact with your botAGENT_ID
is used to route Slack events to your specific Magma agentCreate New App
Select Workspace
Upload Manifest
manifest.json
Review and Create
Install to Workspace
Get Bot Token
Bot User OAuth Token
Set Environment Variable
.env
file:AGENT_ID
in the manifest.json.cmd+t
(Mac) or ctrl+t
(Windows) to quickly search for your bot in Slack!magma logs
to view your agent’s logs and debug the problem.