Skip to content

Slack

Your agent answers as a Slack app. People send it direct messages, or mention it in a channel it has joined.

  • A workspace role that can edit Agents
  • Permission to create and install apps in your Slack workspace
  1. Go to api.slack.com/apps and create a new app from scratch in your Slack workspace.

  2. In OAuth & Permissions, add these bot token scopes:

    Scope Why the agent needs it
    chat:write Post, update and remove its messages
    app_mentions:read Receive messages that mention it
    im:history Receive direct messages
    users:read and users:read.email Match the sender to a VirtuAI user by email
    files:write Share files the agent creates
    files:read Receive files people send the agent (they go into its working directory)
  3. Install the app to your Slack workspace, and copy the Bot User OAuth Token. It starts with xoxb-.

  4. In Basic Information, copy the Signing Secret.

  5. In Socket Mode, make sure Enable Socket Mode is off. VirtuAI receives Slack events over HTTPS at the agent’s URLs; with Socket Mode on, Slack sends them over a WebSocket instead and the Request URL fields below aren’t used.

  6. In App Home, under Show Tabs, turn on Messages Tab and tick Allow users to send Slash commands and messages from the messages tab. Without it, people can’t open a direct message with the app.

  1. Open the agent and select its Channels tab. On the canvas, select the agent, or its Slack node, to open the same tabs.

  2. Turn on Slack. Until it’s connected, the card reads Needs a bot token.

  3. Paste the Bot token (it starts with xoxb-) and the Signing secret, and select Connect. VirtuAI checks the token with Slack, then saves both. The card then reads Connected to your Slack workspace.

  4. Optionally, change the Waiting message. The default is ⏳ Working on your request...

Both values are encrypted when they’re saved and are never shown again. To replace one, paste the new value and select Connect again. If Slack refuses the token, nothing is saved and the card says why. If the signing secret doesn’t look like Slack’s (32 hexadecimal characters), the card says it was saved but every request would be refused: copy it again from Basic Information.

The Slack connection and the Slack switch apply at once, also to the published version of an agent with versioning. Disconnect removes the token and the signing secret, and VirtuAI refuses Slack’s requests until you connect again. Turning Slack off removes its token and settings from the agent, after you confirm.

Under Request URLs, the card lists three URLs to paste into your Slack app: Event Subscriptions, Slash Commands and Interactivity & Shortcuts (the approval buttons). They’re also under Integration URLs at the bottom of the tab:

https://<your-virtuai-host>/slack/events/<agent-id>
https://<your-virtuai-host>/slack/commands/<agent-id>
https://<your-virtuai-host>/slack/interactivity/<agent-id>
  1. In your Slack app, open Event Subscriptions and turn events on. Paste the events URL as the Request URL. Slack checks it right away and should show it as verified. The check only passes once the agent is connected with its Bot token and Signing secret, so do step 2 first.

  2. Under Subscribe to bot events, add app_mention and message.im, then save.

  3. Open Slash Commands and create the commands you want from the table below. Use the commands URL as the Request URL for each one.

  4. Open Interactivity & Shortcuts, turn Interactivity on, paste the interactivity URL as the Request URL, and save. This is required for approvals: without it, the approval buttons do nothing.

  5. Reinstall the app if Slack asks you to.

Every request from Slack, including the Request URL check, is verified against the Signing Secret. Requests that fail the check, and requests for an agent that has no Slack configuration saved, are rejected with 403.

VirtuAI reads the command’s name, so create each one with exactly this name:

Command What it does
/new [title] Starts a new conversation, with an optional title
/resume Lists your recent conversations. /resume 2 switches to the second one.
/status Tells you whether the agent is working, and for how long
/compact Summarizes the older messages so the conversation can keep going when the model’s context fills up. The agent suggests it from 80%.
/cancel Asks the agent to stop the current task
/help Lists the commands
  • Progress. The app posts the waiting message, with a small animation beside it, and updates it while the agent works. The answer replaces it.

  • One conversation per person. Each Slack user has one ongoing conversation with the agent, wherever they write to it. Use /new to start fresh.

  • Where answers go. The answer is posted in the channel or direct message where you wrote.

  • Threads. Replies in a thread are handled, but the agent doesn’t see the rest of the thread.

  • Busy agent. If you write while the agent is working, your message is queued and handled next.

  • Retries. If Slack resends an event because VirtuAI took a moment to acknowledge it, the agent still answers only once.

  • Files you send. Send files, images or documents, with or without text. Each one goes into the agent’s working folder, under uploads/, where the agent runs commands, so it can open and work on it. Images and PDFs also go to the model itself when it can read them. The app needs the files:read scope for this. See Files and voice notes.

  • Files while the agent is busy. A file sent while the agent is still working isn’t queued. The app answers “📎 I’m still working on your previous request. Send the file again when I finish.”

  • Voice notes. Audio files are transcribed, and the agent gets your words, whatever its model.

  • Thinking and web searches. When the model thinks or searches the web, the progress message shows it as steps, marked 💭 for a thought and 🌐 for a search, as web chat does.

  • Your accounts. If your Slack email matches a member of the VirtuAI workspace, the agent uses that member’s connected accounts, for example their Gmail or Drive.

  • Budgets. If the workspace has run out of budget, the app replies with the budget message instead of an answer.

  • Approvals. When a deep agent wants to run a command, or use a tool that needs approval, it posts what it would run in the conversation where you wrote, with the same answers as web chat’s card, and who can answer and when it expires. Nothing runs until you click one:

    • Allow once: this call only. The next one asks again.
    • Allow for this conversation: stops asking in this conversation, meaning the thread the prompt is in (or the direct message or channel itself when you wrote at the top level), on this and later turns.
    • Allow 60 min: stops asking for 60 minutes, in any conversation with this agent in Slack.
    • Always allow: stops asking for this agent in Slack until someone who can edit the agent revokes it. Slack asks you to confirm first.
    • Deny: the call is not run, and the agent is told you declined.

    A broader answer covers only you, this agent and Slack: it never answers for another member of the channel, nor on another channel such as Telegram. Prompts already waiting that it covers are approved too, and their message says which earlier answer approved them. Only the person whose message started the task can answer: if someone else in the channel clicks, Slack shows them, and only them, a note saying so, and the buttons stay. Once answered, the buttons are replaced by who approved or denied it and for how long, for example Approved by @ana for this conversation. With no answer within 10 minutes, the request expires, the message says so, and nothing is run. The agent’s editors can see and revoke these approvals under Standing approvals, in the agent’s Security tab. An approval you gave in web chat also counts here when your Slack email matches your VirtuAI account. This needs Interactivity turned on (step 4 above).

  • Your browser. When the agent uses the workspace’s Browser and a step needs you (a captcha, a sign-in, a two-step code, an approval), it sends you a link to your own browser desktop, which opens after you sign in to VirtuAI. See Sandboxes.

  • Reminders. With the reminder tools attached to the agent, you can ask it to remind you of something, once or daily, weekly or monthly. At the time, the app posts ⏰ Reminder… in the channel or direct message where you asked, and the agent reminds you. Times are in the workspace’s time zone, and due reminders go out every few minutes (every 5 minutes by default). See Predefined tools.

  • Local models. Agents with a local model answer here too. Your own runner serves your turns once VirtuAI recognizes you (by your Slack email); otherwise a workspace inference host or the cloud fallback answers. See Local models.

Slack won’t verify the Request URL : Check that the agent’s Slack card reads Connected: until the agent has its Bot token and Signing secret, VirtuAI rejects Slack’s check with 403. Then check that you copied the events URL, not the commands one, that the signing secret is the one from this Slack app, and that your VirtuAI address is reachable from the internet.

Events arrive but the app never answers : Check the Bot token and Signing secret on the agent’s Slack card, and connect again. A wrong signing secret makes VirtuAI reject every request.

The app doesn’t answer direct messages : Check that message.im is subscribed, im:history is granted, and in App Home the Messages Tab is on with Allow users to send Slash commands and messages from the messages tab ticked.

Slack shows “Sending messages to this app has been turned off” : In App Home, turn on Messages Tab and tick Allow users to send Slash commands and messages from the messages tab. People may need to reload Slack.

Event Subscriptions has no Request URL field, or nothing reaches VirtuAI : Socket Mode is on. Turn it off in Socket Mode, then set the Request URLs again.

Files people send don’t reach the agent : Add the files:read scope in OAuth & Permissions, then reinstall the app. Without it, Slack doesn’t let VirtuAI download the files.

The approval buttons do nothing, or Slack shows an error when clicked : In Interactivity & Shortcuts, turn Interactivity on and set the Request URL to the agent’s interactivity URL. A button on a prompt that already expired or was answered replies that the request is no longer waiting.

A command says “Unknown command” : The command name in Slack doesn’t match one in the table.