---
title: "Lessons on UX, security, and scale when building an enterprise-grade Slack agent"
description: "Sourcegraph's Deep Search Slack agent fits into enterprise workflows through staged status messages (emoji acknowledgement, escalation links for long searches), TL;DR answers with threaded follow-ups, and rich link unfurling via Slack's link_shared events, SHA256-based entity IDs, chat.unfurl work objects and flexpane details."
url: "https://swe.quest/articles/lessons-on-ux-security-and-scale-when-building-an-enterprise-grade-slack-agent-718cb96cab6bcc78"
canonical: "https://sourcegraph.com/blog/deep-search-slack-agent-lessons"
source: "Sourcegraph"
published: "2026-05-04"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["ai-agents","product-engineering","identity-auth","resilience","communications"]
---

# Lessons on UX, security, and scale when building an enterprise-grade Slack agent

A post on [Sourcegraph](https://swe.quest/sources/sourcegraph.md), published 2026-05-04, 5 min read, Case study. Original: [https://sourcegraph.com/blog/deep-search-slack-agent-lessons](https://sourcegraph.com/blog/deep-search-slack-agent-lessons)

## Summary

Sourcegraph's Deep Search Slack agent fits into enterprise workflows through staged status messages (emoji acknowledgement, escalation links for long searches), TL;DR answers with threaded follow-ups, and rich link unfurling via Slack's link\_shared events, SHA256-based entity IDs, chat.unfurl work objects and flexpane details. On the enterprise side it supports Enterprise Grid's one-app-to-many-workspaces model, auto-links Slack users to Sourcegraph accounts by verified email so permissions match code access, and validates setup by forcing a fresh Slack event-URL ping with a random retry parameter. Abuse is controlled with simple Redis fixed-window counters per user and team that fail open if Redis is down.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Product engineering](https://swe.quest/tags/product-engineering.md) (Engineering organization)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)
- [Communications](https://swe.quest/tags/communications.md) (Domains)

## Prerequisites

- Slack app development
- Redis basics ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- OAuth basics ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Slack, Sourcegraph Deep Search, Redis, Slack Enterprise Grid, Block Kit, Slack Work Objects

## Related posts

- [How Grab built Scarlet: the AI teammate that turns a Slack message into a production data pipeline](https://swe.quest/articles/how-grab-built-scarlet-the-ai-teammate-that-turns-a-slack-message-into-a-cb0afbb754a543cf.md): Grab Engineering · 2026-11-23 · Medium · 12 min read · AI agents, Data pipelines, Testing, Identity & auth, LLMs
  Grab's ADW team rebuilt Scarlet, its Slack-based data-pipeline agent, around a short core prompt plus a versioned library of Markdown skills (platform, routing, repository, workflow) loaded on demand, shrinking the prompt about 25x and letting new teams onboard by adding one reviewed repository skill.
- [Building effective agent automations](https://swe.quest/articles/building-effective-agent-automations-abcba7937b1d5df2.md): claude.dev · 2026-10-08 · Medium · 12 min read · AI agents, LLMs, Resilience
  A scheduled daily-brief agent built on Claude Managed Agents reads Slack channels and GitHub pull requests, tracks what changed since the last run, and posts a short brief to Slack.
- [How we built enterprise search to be secure and private](https://swe.quest/articles/how-we-built-enterprise-search-to-be-secure-and-private-9bbeb6f1e852b588.md): Slack Engineering · 2025-03-07 · Easy · 5 min read · Search, Identity & auth, RAG & retrieval, Privacy, Security
  Slack's enterprise search, which brings Google Drive and GitHub results into Slack search and AI Answers, uses a federated, real-time design instead of an index.
- [Security Automation Evolved: From SlackOps to Programmatic SIEM Triage (Part 1/2)](https://swe.quest/articles/security-automation-evolved-from-slackops-to-programmatic-siem-triage-part-1-2-4945f06fa59a1bdc.md): Sourcegraph · 2026-05-28 · Medium · 4 min read · Threat detection, Security, Go
  Sourcegraph's security team built SecBot, a Slackbot that enriches SIEM alerts with context from Entitle JIT permissions, Okta, Google Workspace, GCP asset metadata and threat intel, so alerts can be triaged and closed from Slack via emoji reactions.
- [Automating Security Triage with HackerOne and Deep Search](https://swe.quest/articles/automating-security-triage-with-hackerone-and-deep-search-ce50e70d2f61dc6d.md): Sourcegraph · 2026-06-05 · Easy · 4 min read · Security, AI agents, LLMs
  Sourcegraph's security team built a small service that receives signed HackerOne webhooks for new bug bounty reports, verifies the signature, and sends the report to the Deep Search API to investigate it against the relevant codebase.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
