Updated on 2026-07-25 GMT+08:00

Slack

CodeArts Agent Space provides IM access capabilities for multiple platforms, supporting the reuse of agent capabilities across these platforms alongside unified configuration management.

This section describes how to connect CodeArts Agent Space to Slack, allowing you to quickly integrate capabilities and enable collaborative workflows.

Constraints

Table 1 Constraints

Category

Description

Function

A Slack bot can connect to only one CodeArts Agent Space.

Procedure

Table 2 Connecting CodeArts Agent Space to Slack

No.

Operation Platform

Step

Description

1

Slack developer console

Step 1: Preparations

Before connecting CodeArts Agent Space to a Slack bot, perform the following operations:

  1. Create a Slack application.
  2. Obtain the application token.
  3. Obtain the bot token.
  1. Subscribe to events.
  2. Enable messages.
  3. Obtain the key.

2

CodeArts Agent Space

Step 2: CodeArts Agent Space Configuration

In CodeArts Agent Space, register a Slack bot to receive and reply to messages.

3

Slack client

CodeArts Agent Space

Step 3: Remote Control from Slack

Use the Slack bot to deliver tasks to CodeArts Agent Space.

Step 1: Preparations

  1. Create a Slack application.

    1. Sign in to the Slack developer console and click Create New App. The Create an app page is displayed.
    2. Select From scratch, set App Name, select a workspace, and click Create App.

      App Name is the bot name.

  2. Enable Socket Mode and obtain the application token.

    1. Go to the Socket Mode page and toggle on Enable Socket Mode under Connect using Socket Mode.
    2. Enter a token name and click Generate.
      Copy the application token as prompted. Keep the token secure. It can be copied only once. This token will be used when you connect to the Slack bot in CodeArts Agent Space.
      Figure 1 Copying a token

  3. Obtain the bot token.

    1. Go to the OAuth & Permissions page, click Add an OAuth Scope in Scopes > Bot Token Scopes, and add the following permissions:
      • app_mentions:read
      • channels:history
      • chat:write
      • groups:history
      • im:history
      • im:read
      • im:write
      • mpim:history
      • users:read
    2. In OAuth Tokens, click Install to All FOR AI and click Allow to obtain the bot token.
      Keep the bot token secure. This token will be used when you connect to the Slack bot in CodeArts Agent Space.
      Figure 2 Bot token

  4. Enable event subscription.

    1. Go to the Event Subscriptions page and toggle on Enable Events.
    2. After the function is enabled, click Add Bot User Event in Subscriptions to bot events.
    3. Add the following events and click Save Changes.
      • message.im
      • app_mention

  5. Enable the function of sending messages to the bot.

    Go to the App Home page, enable Messages Tab, and select

    Allow users to send Slash commands and messages from the messages tab.

  6. Obtain the key.

    Go to the Basic Information page and obtain the client secret from App Credentials. The client secret will be used when you connect to the Slack bot in CodeArts Agent Space.

  7. Customize slash commands.

    Go to the Slash Commands page and click Create New Command to create slash commands in Figure 3.

    Figure 3 Custom slash commands
    Table 3 Custom slash commands

    Command

    Description

    /stop

    Stops the current session.

    /help

    Checks available commands.

    /new

    Initiates a new chat.

    When a new chat is created, CodeArts Agent Space automatically saves the original chat to the history list. After this, you will enter a new chat environment and cannot return to the previous chat.

    /models

    Checks and switches models.

    (Only CodeArts Agent Space built-in models)

Step 2: CodeArts Agent Space Configuration

  1. Access CodeArts Agent Space by referring to Enabling CodeArts Agent Space.
  2. In CodeArts Agent Space, click Select Project Folder, choose Open Project, and open a folder.

    Figure 4 Opening a folder

  3. Click in the upper right corner of CodeArts Agent Space to open the settings page.
  4. Choose IM Integration and click Configure next to Slack. The Register Slack Channel page is displayed.
  5. Enter the Slack bot credentials (Client ID/Client Secret) obtained in 6 and click Register.

    Set Bot Token to Bot User OAuth Token obtained in 3, App-Level Token to the token obtained in 2, and Signing Secret to Client Secret obtained in 6.
    Figure 5 Registering the Slack bot

    Wait until the registration is complete. When the status changes from Connecting to Connected, the Slack bot is successfully registered.

Step 3: Remote Control from Slack

  1. Log in to the Slack client. In Apps & Agents, click the bot added in 1.
  2. Describe the task to the Slack bot and send it to submit the task.

    The bot automatically receives feedback from CodeArts Agent Space. You can use slash commands customized in 7 on the Slack client to trigger corresponding functions more effectively.

  3. Confirm the task requirements and key information based on the feedback and complete the task creation.
  4. Check the task execution result.

    • Slack bot: The Slack bot receives a completion message from CodeArts Agent Space, indicating that the task execution is complete and providing the location of the deliverables.
    • CodeArts Agent Space: IN IM > Slack, you can check the task execution process and result in real time. Click in the upper right corner of the chat window to view the generated deliverables in the task artifact list.