Message Classification System
Every message has a humanInteraction classification that determines visibility and behavior.
Overview
Every message in the Plexus system has a humanInteraction field that determines:
- UI Visibility: Whether humans see the message
- Blocking Behavior: Whether execution waits for response
- Response Expected: Whether human input is required
Classification Values
| Value | Description | Blocks? | UI Visibility |
|---|---|---|---|
INTERNAL | Agent reasoning, tool calls | No | Hidden |
CHAT | Human message in conversation | No | Visible |
CHAT_ASSISTANT | AI response in conversation | No | Visible |
NOTIFICATION | Workflow progress update | No | Visible |
ALERT_INFO | System info alert | No | Visible (monitoring) |
ALERT_WARNING | System warning | No | Visible (monitoring) |
ALERT_ERROR | System error alert | No | Visible (monitoring) |
ALERT_CRITICAL | Critical system alert | No | Visible (monitoring) |
PENDING_APPROVAL | Waiting for yes/no | Yes | Visible (action required) |
PENDING_INPUT | Waiting for input | Yes | Visible (action required) |
PENDING_REVIEW | Waiting for review | Yes | Visible (action required) |
RESPONSE | Human's response | No | Visible |
TIMED_OUT | Request expired | No | Visible |
CANCELLED | Request cancelled | No | Visible |
Visual Examples
See how different message types appear in the actual chat feed interface:
Procedure Workflow (Mixed Visibility)
A complete workflow showing notifications, warnings, approval requests, and responses. Note: INTERNAL messages (tool calls, agent reasoning) are filtered out in the human UI.
Optimization Workflow
Human sees: notifications, alerts, approval requests, and responses
Chat Conversation (All Visible)
Natural back-and-forth conversation with the AI, including procedure-generated notifications.
Chat with Procedure Integration
CHAT messages from user, CHAT_ASSISTANT from AI, plus system NOTIFICATIONS
System Monitoring (Alert Stream)
Severity-based alerts from INFO through CRITICAL with visual color coding.
Alert Severity Levels
INFO (blue) → WARNING (yellow) → ERROR (red) → CRITICAL (dark red)
UI Filtering
Human Operator Dashboard
Show only user-facing messages:
SELECT * FROM chat_messages
WHERE human_interaction IN (
'CHAT',
'CHAT_ASSISTANT',
'NOTIFICATION',
'ALERT_WARNING',
'ALERT_ERROR',
'ALERT_CRITICAL',
'PENDING_APPROVAL',
'PENDING_INPUT',
'PENDING_REVIEW',
'RESPONSE'
)Monitoring Dashboard
Show only alerts:
SELECT * FROM chat_messages
WHERE human_interaction LIKE 'ALERT_%'
ORDER BY created_at DESCAction Required
Show only messages requiring response:
SELECT * FROM chat_messages
WHERE human_interaction IN (
'PENDING_APPROVAL',
'PENDING_INPUT',
'PENDING_REVIEW'
)
AND status = 'pending'Design Principles
- Unified System: One classification covers all use cases
- Clear Semantics: Name indicates purpose and behavior
- UI-Friendly: Easy to filter for different views
- Blocking Explicit: Clear which messages block workflow
- Monitoring Integration: Alerts work for both procedures and external systems
Best Practices
DO
- Use INTERNAL for agent work
- Use NOTIFICATION for progress
- Use ALERT_* for system events
- Use PENDING_* sparingly
- Use CHAT for conversations
DON'T
- Over-notify (fatigue)
- Mix alerts and notifications
- Block for trivial operations
- Expose internal details
Complete Documentation
Detailed documentation with examples is available at:
/plexus/procedures/docs/message-classification.html