{"slug":"triage/04-INTAKE_TRIGGERS","title":"04 — Intake Triggers","section":"triage","sectionLabel":"Triage","status":"canon","type":"document","path":"triage/04-INTAKE_TRIGGERS.mdx","bytes":2752,"description":"The events and sources that feed the triage system, from connector syncs to AI session outputs.","updated":"2026-08-24","source":"integratewise/Integratewise-docs-wiki","content":"\n\nTriage is triggered by events from multiple sources. All paths converge at the same triage boundary.\n\n## Trigger Sources\n\n### 1. MCP Connector Session Save\n\nWhen an MCP tool call completes, the connector saves session memory.\n\n**Path:** MCP Connector → `POST /v1/triage/session` → Knowledge Service → triage-bot extraction\n\n**Payload:**\n```json\n{\n  \"session_id\": \"uuid\",\n  \"summary\": \"Session summary text\",\n  \"memories\": [{\"text\": \"extracted memory\"}]\n}\n```\n\n**Processing:**\n- Workers AI classifies priority, category, sentiment\n- All items written as `pending` (no auto-approve)\n- If spam or low confidence → `discarded`\n\n### 2. Conversation Archive\n\nWhen a user archives a conversation in the AI Conversations system.\n\n**Path:** IQ Hub `POST /conversations/:id/archive` → triage-bot extraction\n\n**Processing:**\n- Reads all messages from the conversation\n- Workers AI extracts knowledge items (insights, facts, decisions, etc.)\n- Each extraction written to `triage_results` as `pending`\n- Optional Slack notification\n\n### 3. Runtime TriageAgent\n\nThe Durable Object TriageAgent in iw-agent-runtime receives events from Twin sessions, worker handoffs, and manual triggers.\n\n**Path:** Twin/Agent event → TriageAgent.triage() → classify() → emitTriageInput() → Continuity service\n\n**Processing:**\n- Simple pattern-based classification (not LLM)\n- Routes to memory, proposal, signal, or governance\n- Memory/signal routes emit to Continuity service\n- Items stored in Durable Object SQLite\n\n### 4. Manual Trigger\n\nAdmin or automated system triggers triage via API.\n\n**Path:** `POST /v1/triage/run` → Knowledge Service → consolidation pipeline\n\n**Payload:**\n```json\n{\n  \"type\": \"hourly|daily|weekly\"\n}\n```\n\n**Processing:**\n- Fetches approved triage items in time window\n- Groups by category\n- Generates consolidated memories using Workers AI\n- Writes to `consolidated_memories` table\n\n### 5. Triage Workflow (Durable)\n\nThe Cloudflare Workflow `TriageWorkflow` processes high-stakes items that require cognitive evaluation.\n\n**Path:** Workflow queue → TriageWorkflow.run() → TriageAgent.execute() → route\n\n**Processing:**\n- Cognitive evaluation across 4 dimensions\n- Routes to HITL DLQ or terminal rejection\n- No direct canonical writes\n\n## Intake Convergence\n\nAll triggers converge at the same boundary:\n\n```\nAll Sources → Triage Intake → classify → stage → governance review\n```\n\nThe source determines the extraction method (LLM vs pattern), but all outputs are candidates — never approved organizational memory.\n"}