AI Overview (KL-AI-2000 Dashboard) Documentation¶
Menu Location: AI > AI Overview
Access Level: Kiva Admin only
Last Updated: 2026-03-02
Overview¶
The KL-AI-2000 Dashboard (klai-dashboard.php) is the central command center for the AI automation engine. It provides a comprehensive view of all AI-driven events, email communications, Claude Code sessions, and error tracking. This is a Kiva Admin-only tool for monitoring and managing the automated AI systems that handle various business operations.
Primary Functions:
- Monitor all AI event processing (pending, analyzing, completed, errors)
- Track inbound and outbound AI-generated emails
- Manage Claude Code automation sessions
- Review error signatures and patterns
- Cancel, reprocess, or retry AI events
- Check session completion status
Page Layout¶
Stats Row¶
Color-coded stat wells across the top:
| Stat | Color | Description |
|---|---|---|
| Total Events | Default | Total number of AI events in the system |
| Processing | Yellow | Events currently pending + analyzing |
| Awaiting Decision | Blue | Events waiting for admin decision |
| Completed | Green | Successfully completed events |
| Errors | Red | Events that encountered errors |
| Emails Out/In | Default | Count of outbound/inbound AI emails |
Claude Code Sessions Alert¶
When sessions are running, an info banner displays the count with a "Check Sessions" button.
Tab Navigation¶
| Tab | Description |
|---|---|
| Events | Lists all AI events with status and actions |
| Emails | Shows inbound/outbound AI-generated emails |
| Claude Code Sessions | Tracks running Claude Code sessions |
| Error Signatures | Groups and tracks error patterns |
| Event Detail | (Contextual) Detailed view of a specific event |
| Session Detail | (Contextual) Detailed view of a specific session |
| Email Detail | (Contextual) Detailed view of a specific email |
Event Management¶
Event Statuses¶
| Status | Meaning |
|---|---|
| pending | Event created, waiting to be processed |
| analyzing | AI is currently analyzing the event |
| queued | Queued for cron processing |
| awaiting_decision | Analysis complete, needs admin decision |
| completed | Event fully processed |
| cancelled | Event was cancelled by admin |
| error | Processing encountered an error |
Available Actions¶
- Cancel Event: Sets event status to 'cancelled'
- Reprocess Event: Sets event back to 'pending' for re-analysis
- Retry OpenCode: Re-queues event for Claude Code processing via cron
- Check Sessions: Checks all running Claude Code sessions for completion
Event Detail View¶
Shows full event details including:
- Context JSON (parsed and displayed)
- Options JSON
- Execution log (supports JSON-formatted logs)
- Associated Claude Code session details
- Related email communications
How to Use¶
Monitoring System Health¶
- Navigate to AI > AI Overview
- Review the stats row for an at-a-glance health check
- Red "Errors" count indicates events needing attention
- Yellow "Processing" should decrease over time as events complete
Managing Failed Events¶
- Click the "Events" tab
- Filter for error status events
- Click into the event detail to review the error
- Choose to Reprocess (try again) or Cancel (abandon)
Checking Claude Code Sessions¶
- If the blue banner shows running sessions, click "Check Sessions"
- The system checks all running sessions and reports: checked, completed, emails sent
- View the Sessions tab for detailed session history
Reviewing AI Emails¶
- Click the "Emails" tab
- Review outbound emails sent by the AI system
- Check inbound emails received
- Click into any email for full content view
Common Use Cases¶
Daily Operations Check¶
Review the dashboard stats each morning to ensure AI automation is running smoothly. Investigate any errors or stuck events.
Debugging AI Failures¶
When events error out, use the Event Detail view to examine the context JSON, execution log, and error details. Decide whether to retry or cancel.
Session Management¶
Monitor long-running Claude Code sessions. Use "Check Sessions" to poll for completion and trigger follow-up actions (like sending results emails).
Database Tables¶
| Table | Purpose |
|---|---|
| klai_events | All AI automation events with status, context, and logs |
| klai_emails | Inbound and outbound email communications |
| klai_opencode_sessions | Claude Code session tracking |
Tips & Best Practices¶
- Check the dashboard regularly for error accumulation
- Reprocess events before cancelling - transient errors often resolve on retry
- Use the Error Signatures tab to identify recurring issues
- Monitor the emails tab to ensure AI communications are appropriate
- Check Sessions proactively when Claude Code sessions are running
FAQ¶
Why is this Kiva Admin only?¶
This dashboard provides deep system-level access to AI automation internals. It's restricted to Kiva admins to prevent accidental disruption of automated processes.
What triggers AI events?¶
Events are created by various system triggers - customer actions, scheduled tasks, error detection, and other automated workflows.
Can I manually create events?¶
Events are typically created automatically. Use other admin pages to trigger specific AI functions.
Related Pages¶
- AI Suggestions for Product - Product improvement suggestions
- System Log Insights - AI-powered log analysis
- AI Campaigns - Marketing campaign generation