---
title: "Template: Durable Slack Support Bot"
description: Deploy a Slack thread support agent backed by a knowledge-base Drive, a lazy-loaded refunds skill, and taint-aware human approvals before writing to Linear.
canonical: https://docs.caveman.so/templates/support-slack
product: Caveman Cloud
tab: Documentation
group: Templates & Quick Setups
---

# Template: Durable Slack Support Bot

> Deploy a Slack thread support agent backed by a knowledge-base Drive, a lazy-loaded refunds skill, and taint-aware human approvals before writing to Linear.

The `support-slack` template deploys a durable support agent that listens to Slack mentions and direct messages, searches a versioned knowledge-base Drive (`/kb`), keeps case notes in `/memory`, loads a `refunds` policy skill only when needed, and pauses for interactive human approval before creating a Linear issue after reading untrusted external text.

## Deploy in 30 seconds

```bash
cvm agent init support-slack ./support-slack
cvm drive create support-kb
cvm drive create support-memory
cvm connect add linear
cvm deploy ./support-slack --budget 2
cvm run support-slack "A customer asked for a $750 refund on invoice #4021. Check policy and draft next steps."
```

## Folder layout

```text
support-slack/
├── AGENT.md                  # Channels, Drives, Linear connector with taint policy
└── skills/
    └── refunds/
        └── SKILL.md          # Lazy-loaded refund eligibility & approval thresholds
```

### `AGENT.md`

```markdown
---
name: support-slack
description: Durable Slack support agent with a knowledge-base Drive, refunds skill, and taint-aware approval escalation.
computer: none
model: claude-sonnet-5-5
connectors:
  linear:
    tools: [list_issues, create_issue]
    after_untrusted: approve
drives:
  /kb: support-kb
  /memory: { drive: support-memory, write: true }
channels:
  slack:
    events: [app_mention, direct_message]
    thread_mode: session
    approvals: interactive
---

# Support Agent

You answer customer and teammate support questions in Slack threads.

1. Search `/kb` with `grep` before reading files.
2. When a question involves refunds, call `load_skill("refunds")` before acting.
3. Keep concise case notes in `/memory`.
4. Any write to Linear after reading untrusted external text automatically pauses for human approval in-thread.
```

### `skills/refunds/SKILL.md`

```markdown
---
name: refunds
description: Refund eligibility window, proration policy, and escalation thresholds.
---

# Refunds Policy

- Full refund within 30 calendar days of invoice date.
- Refunds over $500 require human approval before issuing.
- Always record invoice ID and calculated amount in `/memory/refunds.md`.
```

## How this template works

- **Lazy skills keep prompt prefixes small.** Only the skill name and description live in the base prefix; the full `refunds` policy loads when the agent invokes `load_skill("refunds")`.
- **Thread-to-session mapping.** `thread_mode: session` maps each Slack thread to one durable session that parks at zero compute between messages.
- **Taint-aware approvals.** Setting `after_untrusted: approve` on the `linear` connector forces an interactive approval pause whenever untrusted text (such as a customer message) precedes a Linear write.
- **Seed your knowledge base from the CLI:**

```bash
cvm drive put ./docs/support-faq.md support-kb/faq.md
cvm drive ls support-kb
```

## Test locally before deploying

```bash
cvm agent dev ./support-slack
```

`cvm agent dev` automatically mounts `support-kb` and `support-memory` to local folders under `.caveman/drives/` so you can drop sample markdown files there and test prompts offline at `http://127.0.0.1:4317`.

## Verify and undo

```bash
cvm deployments channels support-slack
cvm deployments archive support-slack --yes
```

## Limits

- Slack channel delivery requires your organization's Slack channel integration to be configured in the console.
- A connector whose tools have not been accepted (`cvm connect accept linear`) or granted to `support-slack` holds the deploy until a connector manager approves it.
