Human-in-the-Loop (HITL)
HITL is the principle that no agent output reaches a client or an external system without a human making an explicit decision first. It is not an optional layer — it is enforced at the database and tool-dispatcher levels so that no code path can bypass it.
Technical enforcement: Governance & Guardrails — Layer 3 HITL spec, approval DB schema, resolution flow code Approval display: UI Patterns — how approvals look in each app Full approval lifecycle: Approval Flow — creation → notification → decision → downstream
The Non-Negotiable Rule
No agent can trigger a write action on an external system
without a corresponding approvals record with status = 'approved'.This is enforced at the tool dispatcher — before any external API call executes, it checks for an approved record. The UI cannot bypass it. An agent cannot bypass it. Even a super admin calling the API directly cannot bypass it.
Where HITL Appears
HITL gates exist at every point where the pipeline crosses a boundary — from research to content, from content to publish, from data to spend.
1. Onboarding Chain
| Gate | What is reviewed | Who reviews | Configurable? |
|---|---|---|---|
| Context File approval | The auto-generated Client Context File (company overview, USPs, tone, competitors) | Tenant admin | Yes — can be auto-approved |
| Strategy approval | The full marketing strategy document (goals, channels, positioning) | Tenant admin | Yes — can be auto-approved |
| Deliverable plan approval | Monthly volumes per deliverable type (e.g. 10 blogs, 12 social posts) | DM reviewer | Yes — can be auto-approved |
| Action items approval | One-time strategic tasks generated by the Action Item Planner (audits, setups, research) | DM reviewer | Yes — can be auto-dispatched |
Nothing in the content pipeline runs until the strategy and deliverable plan are approved. These are the upstream gates for everything else. The Action Item Planner runs in parallel with the deliverable plan approval wait — its tasks appear for DM review while the plan itself may still be pending.
Autonomy settings: All four onboarding gates (context, strategy, deliverable plan, action items) can be bypassed per tenant or platform-wide via System → Autonomy. When disabled, the pipeline auto-approves the output and immediately triggers the next stage. The dashboard shows an “Auto-approved” badge in violet and the timeline records a System entry for full auditability. See Autonomy Settings.
2. Content Pipeline
| Gate | What is reviewed | Who reviews |
|---|---|---|
| Topic list approval | Agent-proposed blog/social topics before any writing begins | DM reviewer |
| Blog post approval | Full blog post draft before publishing to WordPress/Webflow | DM reviewer |
| Social post approval | Each platform variant (LinkedIn copy ≠ Instagram copy) | DM reviewer |
| Email campaign approval | Full email HTML + subject line + preview text | DM reviewer + tenant admin |
| GBP post approval | Google Business Profile post copy | DM reviewer |
| Landing page approval | Full landing page copy | DM reviewer + tenant admin |
3. SEO Pipeline
| Gate | What is reviewed | Who reviews |
|---|---|---|
| Keyword cluster approval | Grouped keyword clusters before brief writing begins | DM reviewer |
| Content brief approval | SEO brief (angle, structure, target keyword, search intent) | DM reviewer |
| Backlink prospect approval | Proposed target sites before outreach emails are written | DM reviewer |
| Outreach email approval | Each personalised outreach email | DM reviewer |
4. Paid Ads Pipeline
| Gate | What is reviewed | Who reviews |
|---|---|---|
| Search term classifications | Keyword → add / negative / watch classifications before pushing to Google Ads | DM reviewer |
| Ad copy approval | RSA headline/description sets or Meta ad variants | DM reviewer |
| Optimization recommendations | Bid adjustments, budget changes, pause/enable recommendations | DM reviewer + tenant admin |
| Live ad push | Final confirmation before changes are applied to live campaigns | DM reviewer |
Ad-related approvals are always
risk_level: high— they have immediate spend impact.
5. Reporting & Analysis
| Gate | What is reviewed | Who reviews |
|---|---|---|
| Monthly report approval | Full performance report before it is sent or shared with the client | DM reviewer |
| Anomaly alert review | Detected metric anomalies before alerting the client | DM reviewer |
6. Agent Mid-Run Decisions
Some agents encounter a decision point mid-execution that they cannot resolve themselves. They create an approval gate and pause, waiting for a human to decide before continuing.
| Scenario | Approval type | Example |
|---|---|---|
| Agent needs content direction | content_direction | ”Should this blog post target informational or commercial intent?” |
| Agent needs brand guidance | brand_direction | ”The client’s guide is ambiguous on formal vs casual tone for this topic.” |
| Agent needs budget decision | budget_authorization | ”Running site audit will cost ~$2.40. Approve to proceed.” |
| Strategy change required | strategy_change | ”New competitor data suggests pivoting keyword focus. Approve new direction.” |
7. System Safety Gates
| Gate | What triggers it | Who resolves |
|---|---|---|
| Channel action gate | Any write-tool call (post to WordPress, publish to LinkedIn, push to Google Ads) | DM reviewer |
| Budget halt | Agent cost exceeds per-activity or campaign cap | DM reviewer / super admin |
| Approval expiry escalation | Approval not actioned before its expiry window | DM reviewer (urgent) |
| Watchdog escalation | Agent stuck or running anomalously long | DM reviewer / super admin |
Approval Types Summary
| Type | Created by | Default risk | Expiry |
|---|---|---|---|
content_review | System (auto) | Derived from deliverable type | 72h low / 48h medium / 24h high |
content_direction | Agent (create_approval tool) | medium | 48h |
brand_direction | Agent (create_approval tool) | medium | 48h |
strategy_change | Agent (create_approval tool) | high | 24h |
budget_authorization | Agent (create_approval tool) | high | 24h |
channel_action | System (write-tool gate) | high | 24h |
Risk levels by deliverable (content_review only):
| Deliverable | Risk | Reason |
|---|---|---|
| Blog post draft | low | No external action yet |
| Social post (organic) | medium | Direct audience reach |
| Ad copy | medium | Spend-impacting |
| Email campaign | high | Irreversible send |
| Live ad create/update | high | Immediate spend impact |
| Live social post | high | Public and hard to retract |
Who Reviews What
| Role | Can review | Scope |
|---|---|---|
| DM reviewer | All approval types | Their assigned tenants |
| Tenant admin | content_review (optional), strategy_change, budget_authorization, deliverable_plan | Their own tenant only |
| Super admin | All types, all tenants | Platform-wide |
Some approvals require both a DM reviewer and a tenant admin sign-off (notably email campaigns and ad optimization pushes). Both approvals must be resolved before the gate opens.
Related Docs
| Doc | What it adds |
|---|---|
| Approval Flow | Full lifecycle: creation → notification → display → decision → downstream |
| UI Patterns | How approvals look and behave in Dashboard, DM Portal, Mobile, CLI |
| Governance & Guardrails | Technical enforcement: DB schema, tool dispatcher, validators, budget halt |
| Workflow Model | End-to-end pipeline context — where approvals fit in the activity chain |
| Notifications — Channels | Email, SMS, WhatsApp, web push delivery |
| Notifications — Providers | Platform defaults vs tenant BYOP |
| DM Portal — Screens | P2 approval queue, P3 activity + HITL detail |
| Dashboard — Screens | D5 approvals queue, D4 campaign detail with activity approval |
| Mobile — App | Push notifications for approval events |
| CLI — Commands | /approve, /reject, /bulk-approve |