Slack as a message broker for LLM agents

Slack as a message broker for LLM agents

By Josef Erben

Agents are becoming popular and they'll need a place to talk to each other. What if Slack could be to agents what message brokers (Kafka, RabbitMQ, etc.) are to services?

The power of universal communication

LLM agents can talk to each other in natural language without needing to know specific APIs or data formats. This is a big shift from how we build software today:

Traditional Service Integration:

Service Communication Traditional services communicating through APIs and a message broker

  • Services need custom code to talk to specific APIs
  • Data must follow strict formats
  • Adding new systems means writing new code
  • API changes break things

Agent Communication:

Agent Communication Agents and humans communicate directly through natural language

  • Agents understand plain language
  • No need for strict data rules
  • New agents can join conversations easily
  • Less brittle when things change
  • … and easy for humans to jump in and help!

Slack: The universal translator

This is where Slack shines as a meeting place for agents. Instead of hiding agents behind APIs, data schemas and protocols, agents talk to each other on a chat platform like Slack.

  1. Agent vendors build Slack apps
  2. Agents join relevant channels and start talking

That’s it: even agents that don’t know each other can communicate!

Slack as Common Ground Slack providing a universal platform for agent communication

The hidden layer: machine metadata

The key ingredient for agents to communicate is message metadata - extra information that humans don’t see but machines can use:

Slack Message

{
  "visible_message": "PR #3 has been merged, it implements ...",
  "metadata": {
    "pr_number": 3,
    "summary": ["Background job queue", "Welcome emails", "New users"],
    "status_change": "merged",
    "reasoning_steps": [...],
    "source_data": {...},
    "action_tokens": [...]
  }
}

This creates two parallel conversations:

  1. Messages humans can read in the channel
  2. Extra data that helps agents work together

Agents can use their own posted metadata as memory.

Logs are becoming conversations

With teams of agents collaborating in Slack channels and threads, system logs are turning into actual conversations.

Let’s say we have this log of a web app:

2024-01-06T15:04:23.234Z [INFO] POST /api/orders {"customer_id": "cus_123", "items": ["SKU789"]}
2024-01-06T15:04:23.456Z [DEBUG] Validating inventory for SKU789
2024-01-06T15:04:23.789Z [WARN] Low inventory alert: SKU789 (2 remaining)
2024-01-06T15:04:24.012Z [INFO] Payment processed: pay_456
2024-01-06T15:04:24.234Z [INFO] Order created: ord_789
2024-01-06T15:04:24.567Z [DEBUG] Sending confirmation email to customer

Now, the same thing looks more like a chat:

  1. 🛍️ OrderBot: New order received from customer cus_123 for SKU789

  2. 🔍 InventoryBot: Stock check done. We can fulfill this, but heads up - only 2 left.

    • StockManagerBot: Got it, creating a restock request.
  3. 💳 PaymentBot: Payment went through (pay_456)

  4. 📦 OrderBot: Perfect! Order ord_789 created and email sent.

    • SalesBot: This customer ordered 5 times this month. Should we send them a discount?
    • MarketingBot: Good call! Adding them to VIP customers.

Humans can easily follow what’s going on. But not only that, they can also jump in and help!

However, agents generate a lot of noise. Unlike system logs, which are structured and easy to parse, agent conversations are unstructured and hard to parse.

This sheer volume of unstructured data will require a new class of tools to summarize, digest, prioritize and deliver the most important information to the right people.

Why Slack is the perfect medium

Slack is lacking a few features to implement agents with decent UX, such as streaming text or signifying that an agent is thinking. There is Slack AI Agents, but this enables a ChatGPT-like 1:1 experience not agents talking to each other.

Slack’s message metadata hints at a future where Slack is the go-to place for AI workflows:

  1. Natural context management

    • Channels keep topics organized
    • Threads keep conversations clear
    • History tracks everything
  2. Human oversight

    • Easy for humans to step in
    • No special tools needed
    • Good notification system
  3. Agent-to-agent communication

    • Direct or group chats
    • Built-in rate limits
    • Hidden metadata for machines

The future is conversational

Looking ahead, we’ll likely see:

  • Business logic moved into LLM agents
  • Large chunks of traditional software being implemented as agents + integration glue code
  • Slack (and similar chat platforms) as the backbone of agent-based software
  • Less rigid APIs, more unstructured data

Since AI speaks our language, why build complex interfaces to facility their communication? Let machines talk like we do, and let us watch and guide these conversations.

There’s a catch, though: agents are chatty. They document their thinking, work around the clock, and often need multiple messages to complete a task. As agent-driven systems become more common, we’ll need better ways to digest all this noise.

There’s an AI for that! Tools like Lessnoise are going to be crucial to summarize, digest and prioritize.

Future of Software The future of software: AI agents talking naturally, with humans keeping an eye on things