- Created chatwoot-agent-bot/ with Node.js webhook server - Bot detects intent (greeting, billing, technical, features, account) - Auto-responds from FAQ knowledge base or escalates to human - FAQ-KB.md: Living knowledge base that grows with customer questions - CHATWOOT-SETUP.md: Complete deployment and configuration guide - Supports Telegram notifications on escalation - Bot runs on port 3001, ready for Chatwoot webhook integration
25 lines
698 B
Bash
Executable File
25 lines
698 B
Bash
Executable File
#!/bin/bash
|
|
# Quick health check for prospector
|
|
cd /Users/claw/.openclaw/workspace/agents/sales-prospector
|
|
|
|
# Check if running
|
|
if ! pgrep -f prospector-v8.py > /dev/null; then
|
|
echo "ALERT: Prospector not running!"
|
|
echo "Restarting..."
|
|
python3 prospector-v8.py > /dev/null 2>&1 &
|
|
exit 1
|
|
fi
|
|
|
|
# Check recent activity (last 10 min)
|
|
LEADS=$(cat state/prospector-v8-state.json 2>/dev/null | jq -r '.leads // 0')
|
|
CYLETIME=$(stat -c %Y logs/prospector-v8-$(date +%Y%m%d).log 2>/dev/null || echo 0)
|
|
NOW=$(date +%s)
|
|
DIFF=$((NOW - CYLETIME))
|
|
|
|
if [ $DIFF -gt 600 ]; then
|
|
echo "ALERT: No activity in ${DIFF}s"
|
|
echo "Leads: $LEADS"
|
|
fi
|
|
|
|
echo "OK: $LEADS leads, last activity ${DIFF}s ago"
|