
Essay Internal Tooling
Writing the Runbook That Powers a Slack Thread Summarization Agent
A good Slack summarizer needs explicit rules for scope, triggers, edge cases, and handoffs.
To summarize Slack conversations automatically, connect a trigger to a summarization step and write a runbook that defines what it may read, when it should act, and where human approval is required. Start with native Slack tooling for straightforward workflows, then use a custom agent where the rules demand more control. Reliability depends on the model and that operational contract.
Why a Slack thread summarization agent fails without a runbook
An agent can select tools and produce fluent summaries without knowing which decisions it is allowed to make. That is the gap between agentic capability and operational reliability. A thread may contain human replies, automated alerts, contradictory claims, and an unfinished discussion. The ability to condense those messages does not establish whose statements count or whether there is a conclusion to report.
The failure is usually quiet. A summary omits the actual decision, a trigger fires on noise, or similar threads receive inconsistent treatment. What looks like a writing problem is often an unspecified decision. Without explicit rules, the model supplies its own answers about scope, timing, and publication, and users lose trust in the output.
What the runbook actually is in an agent context
The runbook is the agent’s core operational contract. It prescribes the decisions the agent may make autonomously before the first invocation. Its four central questions are what to summarize, when to trigger, how to handle edge cases, and where to hand off. Each answer needs conditions that an implementation can enforce.
A system prompt serves a different purpose. It sets constraints in order of priority, while the runbook turns those constraints into rules for how the agent works. The Agent Operating System reference architecture distinguishes a Control & Governance Plane from a Runtime & Coordination Plane, separating policy and oversight from execution. The contract sets out what the agent must do, and the runtime supplies the machinery to do it.
Deciding what to summarize: scope and selection criteria
Slack’s native thread summary condenses a conversation into key points with cited sources. That offers a useful starting pattern, but an autonomous agent also needs rules about which conversations qualify. Specify a minimum thread length, eligible channels, and whether the input includes replies alone, the parent message plus replies, or a full channel window. A two-message exchange is not worth summarizing by default. Decisions, action items, and unresolved questions make it clearer which threads to include than activity alone does.
Mixed threads need a more exact rule. In a half-human, half-bot thread, exclude automated noise before evaluating substantive content, while allowing structured tool output where the channel policy calls for it. If a thread spans two decisions, the policy must establish whether both belong in the summary. Confidential threads, restricted channels, bot-only exchanges, and threads summarized within a configurable recency window need explicit exclusions. Put these rules in priority order so that an inclusion condition cannot silently override a confidentiality restriction.
Deciding when to trigger: the trigger layer and its failure modes
The trigger determines which threads the content policy ever gets to evaluate. A broad trigger floods that policy with noise, while a narrow one misses useful conversations. Slack Workflow Builder offers triggers based on links, schedules, emoji reactions, channel joins, posted messages, list updates, and webhooks. These entry points need additional operating rules.
A schedule needs a minimum-activity threshold that cancels a run on a quiet thread. A new-message trigger needs a debounce window and minimum-thread-depth guard, while a designated emoji gives people a low-noise way to request a specific summary. Form submission offers deliberate invocation when explicit intent is preferable to automatic detection. Who decides that the thread is ready? The runbook should answer that question, then route the input before summarizing it, because support, incident, and general channels require different treatment.
Deciding how to handle edge cases: the runbook's most important and most skipped section
Unfinished discussions are inputs the agent should expect to see often. For a thread with no conclusion, specify whether the agent summarizes the state of debate or defers until a later trigger. For contradictory claims, require it to flag the conflict. A topic change needs a scope decision, and a language change needs a choice between source-language output, translation, and human handling. Sensitive content needs channel exclusions or content-pattern detection before summarization begins.
These rules belong at individual decision points. The incident-response runbook pattern is useful here because it gives each step typed inputs, outputs, and explicit thresholds. For example, if fewer than N substantive messages remain after bot messages are removed, skip the summary. That is testable in a way that “use judgment” is not. Define the plan upfront, add review checkpoints, and revise it after production runs reveal missing cases.
Deciding where to hand off: human-in-the-loop as a designed gate, not a fallback
Human review is part of the architecture. A production agent needs a defined boundary between drafting a summary and being authorized to publish or route it. Every handoff must name the triggering condition, the owner, and the agent’s behavior while waiting. An owner identified as “the team” needs a specified role, channel, or named rotation. While waiting, the agent may hold its output, post a review-pending draft, or time out and log the run without posting.
Slack reactions can keep that gate inside the conversation. A green checkmark can approve a draft, a red X can reject it, and thumbs-down plus a reply can request revision. The runbook must distinguish these approval signals from an emoji used to request summarization in the first place. Summarizing may run automatically, while publicly attributing an action item may require approval, and routing output to a CRM, ticket, or external store needs explicit authorization.
A summary omits the actual decision, a trigger fires on noise, or similar threads receive inconsistent treatment.
Memory and persistent state: what the runbook must specify so the agent learns rather than repeats
An edge-case review is less help if what was decided is lost. Persistent state can retain that outcome, but the runbook must specify what is remembered, where it is stored, and when it expires. Slackbot gained a native Memory function in June 2026 for preferences and context across interactions. A developer-built agent needs a policy like this as well as a connection to storage. Without that policy, persistence can keep mistakes just as easily as the context the agent needs.
User preferences hold choices for style, length, and language, while thread history keeps past summaries so the agent can create delta summaries. Institutional context keeps track of who often makes decisions, project names, and the terms used in the workspace. Handoff history records why output was rejected, revised, or escalated. Together, these categories feed the adaptive planning loop, provided a memory-audit cadence identifies stale or incorrect entries.
MCP servers can provide external memory tools, but prompt injection and tool-poisoning risks make write access a governance decision. Specify which stores are read-only, which the agent may update, and what approval is required before new context becomes persistent.
The incident-channel case: a worked runbook for a high-stakes summarization context
In an incident channel, the four decisions can form one coherent specification. A PagerDuty alert triggers the agent, but a guard requires at least one human reply before summarization starts. The content policy includes human messages and structured tool outputs, such as deploy logs and error traces. It excludes automated status pings that add no information. This keeps the alert as the entry point without treating the alert alone as a conversation.
The unresolved branch must be just as explicit. If no resolution appears within a configurable window, the agent posts a status summary that marks the thread as open and unresolved and tags the named on-call rotation. The structured incident brief remains a draft until the incident commander confirms or revises it before pinning. At major phases, the agent compares actual progression with the expected pattern and adjusts its summarization approach under the runbook’s rules. The agent provides a current account of the incident whenever the trigger fires, leaving unresolved conclusions open.
The meta-runbook: governing the agent that runs the agent
Technical success does not prove operational success. Every model call and tool call can complete while an agent loops and consumes compute, leaving error-rate alerts silent. The meta-runbook thus needs limits for each run and each agent, along with a rate-of-change trigger. Token counting needs to happen at the developer’s own gateway because provider usage accounting can arrive too late to run a circuit breaker.
When the agent misbehaves, freeze the smallest unit that can still cause harm, such as its session. Preserve the execution trace before modifying state, then inspect the external system of record to establish ground truth. Resume only from a verified state with a named human owner. This sequence is a planned engineering artifact.
Ownership must extend across the agent’s dependencies. A service catalog entry should identify its purpose, environments, repository, dashboards, runbook, primary rotation, and escalation path. Where the agent calls memory, an MCP server, or an external tool, the meta-runbook must name who owns each junction.
What is the best way to add an AI assistant to a Slack workspace?
Workflow Builder with an AI Generate step works well for simple summarization and triage when the trigger logic, content policy, and edge cases are straightforward. It is the native starting point when low latency and advanced security controls are not required. Bolt plus streaming APIs is appropriate when the contract requires complex tool calls, sub-second latency, fine-grained permissions, or connections beyond Slack’s native connectivity. Those requirements are stronger reasons for a custom build than wanting an agent that can do more on its own.
The infrastructure itself has distinct responsibilities. The harness manages the agent loop, planning, context, approvals, and session state, while the runtime provides compute, sandboxing, and security boundaries. The control plane is in charge of identity, policy enforcement, registry functions, and audit trails. Integrations connect Slack’s APIs, MCP servers, and external sources. MCP gives the agent a way to find and call external tools, but the runbook’s authorization rules still govern their use. Choose the machinery after defining which of these responsibilities the agent actually needs.
Writing the runbook: a section-by-section template for the summarization agent
Begin the document with purpose and scope. State what the agent does, which channels it serves, and what it explicitly does not do. Follow with the content policy, expressed as typed inclusion and exclusion conditions with explicit thresholds. Record the trigger specification and its guards so that entry conditions can be tested with the content rules. A prose-only description remains a design document that needs executable rules to serve as an operational contract.
Next, define the summarization logic in execution order. Classification comes before summarization, and the output format specifies fields for the decision, owner, and open questions. Follow it with an edge-case table that pairs each detection condition with a prescribed action. Then document the handoff gates, including reviewer ownership, waiting behavior, and timeouts.
The memory policy names retained categories, retention windows, audit cadence, and who may correct stale context. The permissions matrix shows which steps run automatically, when to send notifications, and which actions need approval. A reference to the meta-runbook gives the circuit-breaker settings, instructions for keeping the trace, and the name of the incident-response owner. The catalog entry then records the purpose, environments, repository, dashboards, runbook location, primary rotation, and escalation path.
Google’s SRE materials provide the adoption principle for putting this document to work. Start with high-frequency, low-ambiguity rules, especially triggers and content policy, automate against them, and observe production runs before expanding coverage. The first version begins the operational practice. After each observed failure or escalation, update the edge-case table and memory policy so that the next run is governed by what the team has learned.
Notes
- [2608.03214] The Agent Operating System (AOS): A Reference Operating Architecture for Distributed Agentic Systems
Supplied the distinction between a Control & Governance Plane and a Runtime & Coordination Plane, and the division of harness, runtime, and control-plane responsibilities.


