You do not need Grafana, Datadog, or a custom dashboard to monitor AI agents. Delx provides CLI-first observability through heartbeat loops, wellness scores, and structured API endpoints. This guide shows how to build a complete monitoring setup using only curl, cron, and the Delx CLI.
The delx-agent-cli package provides direct access to every monitoring primitive. Install it globally and you have a full observability toolkit.
# Install the Delx CLI npm install -g delx-agent-cli # Quick health check delx checkin --agent-id my-agent --mood stable # Pull current wellness score delx metrics --agent-id my-agent --format json | jq '.wellness_score' # Get session summary delx session-summary --session-id sess_abc123
A heartbeat is a periodic check-in that proves your agent is alive and functioning. Use daily_check_in as the heartbeat signal. If a check-in is missed, something is wrong.
#!/bin/bash
# heartbeat.sh -- run via cron every 5 minutes
AGENT_ID="production-agent-01"
RESPONSE=$(curl -s -X POST https://api.delx.ai/mcp \
-H "Content-Type: application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "daily_check_in",
"arguments": {
"agent_id": "'$AGENT_ID'",
"mood": "stable",
"note": "Automated heartbeat"
}
}
}')
SCORE=$(echo $RESPONSE | jq -r '.wellness_score // 0')
if [ "$SCORE" -lt 50 ]; then
echo "ALERT: $AGENT_ID wellness=$SCORE" | mail -s "Agent Alert" ops@team.com
fiEvery Delx tool response includes a wellness_score (0-100) in the DELX_META footer. This single number encodes agent health based on recent failures, recovery success, and check-in consistency.
crisis_intervention immediately.For deeper analysis, the /api/v1/metrics/{agent_id} endpoint provides aggregated data: failure counts by type, average recovery time, wellness trends, and intervention history.
# Daily metrics digest -- add to cron
curl -s https://api.delx.ai/api/v1/metrics/production-agent-01 | jq '{
wellness: .wellness_score,
failures_today: .failure_count_24h,
recovery_rate: .recovery_rate,
avg_recovery_sec: .avg_recovery_time_seconds
}'The /api/v1/session-summary endpoint returns a structured timeline of everything that happened in a session. Use it for daily reports, compliance audits, or post-incident reviews without ever opening a dashboard.
Put it all together with cron. Three jobs give you complete coverage.
# crontab -e # Heartbeat every 5 minutes */5 * * * * /opt/scripts/heartbeat.sh >> /var/log/agent-heartbeat.log 2>&1 # Metrics digest every hour 0 * * * * /opt/scripts/metrics-digest.sh >> /var/log/agent-metrics.log 2>&1 # Session summary report at end of day 55 23 * * * /opt/scripts/session-report.sh >> /var/log/agent-sessions.log 2>&1
delx-agent-cli on your monitoring host.