We built an agentic security investigation service to help us research alerts as part of our mission to keep Slack secure and protect our customers. Our service deploys teams of AI agents that collaboratively perform security investigations. AI agents free human analysts from tedious data gathering tasks. Over just the first quarter of their deployment, our agents have performed over 7,500 investigations, issuing over 500,000 tool calls. Our agents are enabling us to gain unprecedented real-time insight into Slack’s infrastructure in a way we could never do with human labor alone.
Overview
Slack's Security Engineering team describes how they built an AI agent-based system to automate and streamline security investigations. The system uses a multi-persona architecture with Director, Expert, and Critic agents that collaborate through structured investigation phases (Discovery, Trace, Conclude) to analyze security alerts, cross-reference evidence across data sources, and produce verifiable investigation reports with a knowledge pyramid approach that strategically uses different model tiers for cost optimization.
What You'll Learn
How to decompose a complex AI investigation prompt into a structured multi-agent system with defined personas and tasks
Why breaking single-prompt AI workflows into chained structured-output model invocations produces more consistent and controllable results
How to design a knowledge pyramid architecture that strategically assigns low, medium, and high-cost LLM models to different agent roles
How to implement a Critic agent pattern that provides adversarial review to mitigate hallucinations and improve finding quality
When to use phased investigation flows (Discovery, Trace, Conclude) to structure AI-driven security analysis
Prerequisites & Requirements
- Understanding of LLM prompting techniques and structured outputs (JSON schema constraints)
- Familiarity with security operations concepts such as alert triage, investigation workflows, and indicators of compromise
- Understanding of the Model Context Protocol (MCP) and tool-calling interfaces for LLMs(optional)
- Experience with multi-agent or multi-persona AI system design patterns(optional)
Key Questions Answered
How does Slack use AI agents to automate security investigations?
Why did Slack move from a single-prompt AI prototype to a multi-agent architecture?
What is the knowledge pyramid pattern in AI agent systems?
What are the investigation phases in Slack's AI security system?
How does the Critic agent help reduce AI hallucinations in security investigations?
What service architecture does Slack use for its AI investigation system?
How can AI agents discover security issues beyond the original alert scope?
What structured output approach works best for multi-step AI agent workflows?
Key Statistics & Figures
Technologies & Tools
Key Actionable Insights
1Break complex AI workflows into separate model invocations with structured outputs rather than relying on a single long prompt. Each invocation should have a single, well-defined purpose and output schema, chained together by your application logic. This gives you fine-grained control over each step that prompt engineering alone cannot achieve.Slack found that their initial single-prompt approach produced highly variable results despite extensive prompt refinement. Separating tasks like 'question evidence' into dedicated model calls with structured outputs made behavior much more predictable.
2Implement an adversarial Critic agent that reviews the output of other agents using a defined quality rubric and credibility scoring. This pattern creates a weakly adversarial relationship that catches hallucinations, misinterpretations, and blind spots that individual agents miss.In Slack's system, the Critic caught a credential exposure that the domain expert incorrectly assessed as secure, demonstrating that adversarial review can surface critical findings that pass through primary analysis.
3Design a knowledge pyramid that assigns model tiers strategically: use low-cost models for token-intensive data gathering at the bottom, medium-cost models for quality review and synthesis in the middle, and high-cost models for high-level decision-making at the top. Only pass condensed, high-quality findings upward.This approach optimizes cost by reserving expensive model capacity for tasks that require the most reasoning capability, while letting cheaper models handle the bulk of data processing and analysis.
4Structure multi-agent investigations into distinct phases (Discovery, Trace, Conclude) that allow you to vary agent behavior, model parameters, and token budgets as the investigation progresses. Let a Director agent decide when to transition between phases.In Discovery, questions broadcast to all experts ensure comprehensive data source coverage. In Trace, the Director targets specific experts with focused questions. This prevents premature conclusions while keeping investigations efficient.
5Use MCP (Model Context Protocol) servers to safely expose data sources to AI agents through the tool call interface, rather than giving agents direct access to production systems. This creates a controlled boundary between the AI system and your infrastructure.Slack implemented an stdio-mode MCP server that exposed a subset of their security data sources, providing the agents with investigation capabilities while maintaining security boundaries around sensitive infrastructure.
6Build observability into your agent system from the start with real-time event streaming, per-invocation inspection capabilities, and metrics for token usage and cost. The ability to watch investigations unfold and debug individual model calls is invaluable for iterating on agent behavior.Slack's Dashboard provides real-time observation of running investigations and detailed views of each model invocation, which they describe as invaluable when debugging the system.