All case studies

Software & IT services · Client work · 2026

One Slack bot for every agent.No AI decides who answers.

Every new AI agent on a company's Slack could have become one more bot to remember. I built one bot to sit in front of all of them, with four plain rules that decide which agent gets each message. The AI works inside the agents, where people write in their own words. The part that picks who answers has none.

  • Rules pick the agent

    no AI in that step

    Four plain checks, always in the same order, decide where a message goes. The same message lands in the same place every time.

  • One name

    to remember

    Every agent sits behind the same Slack bot. Nobody has to know which bot does what.

  • Type “menu” to leave

    works mid-conversation

    The way out is checked before anything else. An agent that breaks halfway cannot trap anyone inside it.

Client
Software company
Stack
  • n8n
  • Slack API

Context

A software company was putting agents into Slack, where its people already worked. An agent here means a small program with one job. One of them used AI to interview a person over several messages. Others did simple things, like listing what the bot could do.

The first agent had its own bot. The next agent would have had its own bot too, and so would every agent after it.

Problem

One bot per agent is the easy way to start. The cost lands on the people who use it.

What one bot per agent costs

  • People have to remember which bot does what, and the list gets longer with every new agent.
  • Every bot is one more app that somebody has to install and approve for the whole company.
  • Every bot has to deal with Slack on its own: private messages, mentions in channels, commands. The same work gets built again for each agent.

So I put one bot in front, for every agent to sit behind. That fixes the list of names. It also creates a new job: something now has to decide which agent gets each message.

What I built

One Slack bot, built in n8n. People can reach it in three ways.

A private message goes straight to the bot. An @mention in a channel gets a short reply in the thread, “Check your DMs!”, and the conversation moves to a private message. That keeps the shared channels clean.

A command is the third way. Slack gives a bot three seconds to answer a command, and an AI agent can take longer than that. So the bot says “Check your DMs” at once, and the real reply follows in private. A command already names its agent, so it goes straight there.

A private message is harder. It carries no command. Slack also does not say which conversation it belongs to. So the bot remembers, for each person, which agent they are talking to. Then it checks every private message against four rules, in this order:

  1. You typed “menu”. You go back to the menu, whatever you were doing.

  2. You are in the middle of a conversation. Your message goes to the same agent as before.

  3. You picked a number from the menu. That agent starts.

  4. Anything else. You get the menu. It is short on purpose: a few numbered options.

Every agent that holds a conversation connects to the bot in the same way. It gets two things: who is writing, and what they wrote. It gives back two things: the reply, and whether the conversation is finished. The bot delivers the reply. When the agent says the conversation is finished, the bot forgets it.

That is the whole deal between the bot and an agent. A new agent could go in without any change to the agents already there.

A menu instead of a guess

The obvious way to choose an agent is to ask an AI model. The model reads the message, guesses what the person wants, and sends it on. It looks good in a demo, and it puts AI into one more place.

I kept AI out of that step on purpose.

A rule sends the same message to the same place every time. When a message ends up in the wrong place, you can see which rule sent it there and fix that one rule. A model can guess wrong. A wrong guess drops someone into a conversation they never started, and nobody can say afterwards why it happened.

The menu also tells people what the bot can do. A short list of numbered options shows what there is to ask for. An empty text box leaves the person to guess.

The AI still does the real work. It sits inside the agents, where people write in their own words and something has to understand them. Choosing between a few agents is a smaller job. A person can do it with one digit.

Result

Adding the next agent became a checklist. Build it with the same two inputs and two outputs. Give it a command and a line in the menu. Add it to the help text. The agents already behind the bot did not need to change.

For the people on Slack, there was one name to remember, however many agents sat behind it.

The hard part

No single agent was hard. The hard part was the number of ways a message could arrive.

A person could write to the bot in private, @mention it in a channel, or type a command. Each way carries different information. A command names its agent. An @mention happens in public, so the reply has to move to a private message. A private message carries nothing at all. Put that next to several agents, a menu and a way out, and a message could take about ten different paths. Every one of them had to end in the right place.

The sharpest case is a short message. “2” typed at the menu means: start agent number two. “2” typed in the middle of an interview is an answer, for example to “How many people on your team would use this?”. The text is the same. Only the bot's memory of where the person is tells the two apart.

The order of the rules decides which meaning wins. The conversation check comes before the number check. If it came after, a person answering a question with “2” would be thrown out of their interview and into a different agent. Nothing would crash. They would end up somewhere they never asked to go.

Leaving is the same problem from the other side. An agent ends a conversation by saying it is finished. If an agent breaks halfway, it never says that, and every message would keep going to an agent that cannot answer. So the check for leaving comes first, before anything else, and it works whatever the agent is doing. A few words count as leaving: menu, stop, cancel, and 0. The price: none of them can ever be the answer to an agent's question. Not even “0” to “How many people on your team would use this?”.

A demo never shows any of this, because in a demo one person starts one conversation and finishes it. It shows up when people leave halfway, change their mind, or answer a question with a number.

What I would change today, and what I would keep

Most of this page is plumbing: three ways in, Slack's three-second limit, remembering who is talking to which agent. In early 2026 I built all of it by hand in n8n. Today I would start from Slack's own MCP server, a standard connector that lets AI assistants read and send Slack messages, and spend that time on the agents.

The menu I would keep. AI agents get easier to build every month. Choosing which one should answer a person is still a design question. Put the AI where people write in their own words, and keep it out of the part that only picks a door.

See also.