Skip to main content

Intake Triggers

Triage is triggered by events from multiple sources. All paths converge at the same triage boundary.

Trigger Sources

1. MCP Connector Session Save

When an MCP tool call completes, the connector saves session memory. Path: MCP Connector → POST /v1/triage/session → Knowledge Service → triage-bot extraction Payload:
Processing:
  • Workers AI classifies priority, category, sentiment
  • All items written as pending (no auto-approve)
  • If spam or low confidence → discarded

2. Conversation Archive

When a user archives a conversation in the AI Conversations system. Path: IQ Hub POST /conversations/:id/archive → triage-bot extraction Processing:
  • Reads all messages from the conversation
  • Workers AI extracts knowledge items (insights, facts, decisions, etc.)
  • Each extraction written to triage_results as pending
  • Optional Slack notification

3. Runtime TriageAgent

The Durable Object TriageAgent in iw-agent-runtime receives events from Twin sessions, worker handoffs, and manual triggers. Path: Twin/Agent event → TriageAgent.triage() → classify() → emitTriageInput() → Continuity service Processing:
  • Simple pattern-based classification (not LLM)
  • Routes to memory, proposal, signal, or governance
  • Memory/signal routes emit to Continuity service
  • Items stored in Durable Object SQLite

4. Manual Trigger

Admin or automated system triggers triage via API. Path: POST /v1/triage/run → Knowledge Service → consolidation pipeline Payload:
Processing:
  • Fetches approved triage items in time window
  • Groups by category
  • Generates consolidated memories using Workers AI
  • Writes to consolidated_memories table

5. Triage Workflow (Durable)

The Cloudflare Workflow TriageWorkflow processes high-stakes items that require cognitive evaluation. Path: Workflow queue → TriageWorkflow.run() → TriageAgent.execute() → route Processing:
  • Cognitive evaluation across 4 dimensions
  • Routes to HITL DLQ or terminal rejection
  • No direct canonical writes

Intake Convergence

All triggers converge at the same boundary:
The source determines the extraction method (LLM vs pattern), but all outputs are candidates — never approved organizational memory.