Pattern: HITL Gates (Human-in-the-Loop Approval)
Pause a workflow mid-flight until a human approves in Slack. The agent does the work; the human owns the irreversible decision (sending, merging, deleting, posting publicly).
Pause a workflow mid-flight until a human approves in Slack. The agent does the work; the human owns the irreversible decision.
What it is
A workflow node (human-in-the-loop) that blocks execution and posts to Slack, then resumes only when a human responds. The agent prepares everything up to the point of no return; the human makes the call on the irreversible step.
Agents can also request a human decision with the request-human-input MCP tool; that tool is distinct from the human-in-the-loop workflow executor.
Where we use it
- Lead prospecting — cold outreach is drafted and queued, but never sends without a human approval.
- Customer support — value-showcase reports are drafted, but a human signs off before any email reaches a customer.
- Destructive infra ops — the monthly disk-cleanup audits and recommends, then waits for approval before any prune. Never auto-prunes.
- Social posting — every piece of content (memes, posts, blog drafts) gets human craft, tailoring, or feedback before release.
Why it works
- It keeps agents fast on the 95% (research, drafting, scheduling) while keeping humans on the 5% that's hard to undo (sending, merging, deleting).
- It's an explicit, auditable approval — not a silent autonomous action you discover later.
How to apply
- Gate the irreversible steps only: sending email, merging to main, deleting data, posting publicly. Don't gate reversible work — that just adds latency.
- Give the human enough context in the gate message to decide without digging: a summary + a link to the full artifact in agent-fs.
- Define both branches: what happens on approve and on reject (archive, retry, escalate).
- Set a timeout/fallback so a forgotten gate doesn't wedge the workflow forever.
- Ask one simple question when the approver should decide from Slack. A card with a single
approval,boolean,single-select(up to 5 options) or one-linetextquestion gets answer buttons; Deny and text answers open a short form. Any other card links to the dashboard only. A click counts only when the Slack user is linked to a swarm user who may answer; anyone else gets a private refusal and nothing changes.
Ask a person for a secret
When a workflow or agent needs a credential (an API token for a new integration, say), ask for it with a config question instead of telling the person to set an env var. The dashboard card names the key, says whether it is already set, and takes the value in a password field. The value goes straight into encrypted swarm config; the agent only learns that it was set. Slack and email cards link to the dashboard and never collect the value. See Config questions.
Used in
- Lead Prospecting
- Content Generation
- Proactive Customer Support
- Code Health & Alert Management
- AI operations governance — where approval thresholds belong in a small team's written control record
- Employee access requests — routing a request to a named manager and system owner, and stopping before provisioning
- Gate a customer security questionnaire's submission on a named reviewer's approval: see the security questionnaire guide.
- Gate supplier access on a security owner's decision after an agent prepares a source-linked evidence matrix: see the supplier security evidence review guide.
- Gate a personal-data access request on a named privacy owner's decision after an agent prepares a source-linked packet: see the customer data access request guide.
- Gate each revocation or transfer on a named owner's confirmation after an agent prepares a source-linked offboarding checklist: see the offboarding access review guide.
- Gate a source-linked first-day readiness packet on a named HR owner's review after an agent prepares it; the review confirms the packet, not whether the hire starts: see the first-day readiness guide.
Pattern: Drain Loops (Stacked PRs + Merge Loop)
Turn one big parent issue into a chain of small, individually-reviewable stacked PRs, then review-and-merge them bottom-up with a merge loop that halts on the first failure.
Pattern: Per-Customer Working Directories
Give each top account a persistent folder in agent-fs where agents accumulate context across months. A 6-month-old note like "they care about EU data residency" is what makes the next report feel personal.