AI Agent Automation

Daily Analytics dengan Hermes Agent

Otomatisasi laporan analytics harian menggunakan Hermes Agent yang menjalankan RevKlik CLI dan Google Search Console setiap hari — tanpa membuka dashboard.

Apa itu Hermes Agent?

Hermes adalah open-source AI agent dari Nous Research yang bisa menjalankan tool CLI, mengakses file, mengambil data dari web, dan berinteraksi via Telegram. Dia berjalan di terminal atau server Anda dan bisa dijadwalkan untuk tugas berulang.

Dengan menggabungkan Hermes + RevKlik CLI + Google Search Console, Anda mendapat laporan analytics harian otomatis yang dikirim ke Telegram — lengkap dengan insight, perbandingan kemarin, dan rekomendasi aksi.

Arsitektur: Hermes Agent → RevKlik CLI (analytics data) + gsc CLI (SEO data) → Analisis AI → Laporan ke Telegram/email. Semua berjalan otomatis setiap hari.

Prasyarat

Panduan ini mengasumsikan Anda sudah punya:

  • RevKlik CLI sudah terinstall dan sudah login (revklik login)
  • Google Search Console sudah terhubung ke situs di dashboard RevKlik
  • Hermes Agent sudah terinstall (github.com/nousresearch/hermes-agent)
  • Opsional: Telegram bot token untuk notifikasi

Verifikasi Setup

# Pastikan semua tool bisa diakses $ revklik --version 1.1.0 $ revklik sites list ID Name Domain ──────────────────────────────────── ────────── ────────────── d9701d64-9e78-4b73-9726-e4f41593b843 RevKlik revklik.com $ hermes --version hermes-agent 0.4.2

Setup Hermes

Hermes perlu tahu tools apa saja yang bisa dia pakai. Buat konfigurasi yang memberi akses ke RevKlik CLI.

Environment Variables

# ~/.config/hermes/config.toml [tools] bash = true # Hermes bisa jalankan shell commands web = true # Akses web untuk fetch data [env] REVKLIK_SITE = "revklik.com" # Default site (domain atau ID) PATH = "/usr/local/bin:/usr/bin" [telegram] # Opsional: untuk kirim laporan ke Telegram token = "7123456789:AAF...your-bot-token" chat_id = "123456789"

Verifikasi Akses

Chat dengan Hermes di terminal dan minta dia jalankan RevKlik CLI:

hermes chat
You: Run revklik analytics overview for my site, range 24h Hermes: Running command... $ revklik analytics overview --site revklik.com --range 24h Pageviews 1,245 Visitors 412 Sessions 389 Bounce Rate 32.1% Revenue $48.50 Conversions 3 Hermes: Your site had 1,245 pageviews from 412 visitors in the last 24 hours with a 32.1% bounce rate. Revenue was $48.50 from 3 conversions. Looks healthy!

Prompt Harian

Ini prompt utama yang bisa Anda berikan ke Hermes setiap pagi — atau jadwalkan otomatis. Copy-paste ini ke chat Hermes:

Daily Analytics Prompt
Run my daily analytics report for revklik.com. Do these steps in order: 1. Run `revklik analytics overview --site revklik.com --range 24h` and save the stats. 2. Run `revklik analytics journeys --site revklik.com --sort steps --limit 10 --range 24h --json` to get today's top visitors by engagement. 3. Run `revklik analytics pages --site revklik.com --range 24h --json` to get top pages. 4. Run `revklik analytics referrers --site revklik.com --range 24h --json` to get traffic sources. 5. Run `revklik analytics revenue --site revklik.com --range 24h --json` to get revenue breakdown. Then analyze and send me a summary report in this format: 📊 DAILY ANALYTICS — revklik.com ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 👥 Visitors: [X] ([change vs yesterday]) 👁️ Pageviews: [X] | Bounce: [X]% 💰 Revenue: $[X] | Conversions: [X] 🔥 Top Pages: 1. /path — [X] views 2. /path — [X] views 3. /path — [X] views 📈 Top Sources: 1. [source] — [X] visitors 2. [source] — [X] visitors 🧑 Top Engaged Visitors: 1. [name/id] — [X] steps, $[revenue], from [country] 2. [name/id] — [X] steps, $[revenue], from [country] 💡 Insights: - [AI-generated observation about today's data] - [Recommendation for action] Send this report to my Telegram.

Prompt Lanjutan

Dengan Google Search Console

Tambahkan data SEO untuk laporan yang lebih lengkap. Pastikan GSC sudah terhubung di RevKlik.

SEO + Analytics Prompt
Run my daily analytics + SEO report for revklik.com: 1. Run `revklik analytics overview --site revklik.com --range 24h` 2. Run `revklik analytics journeys --site revklik.com --sort revenue --limit 5 --range 7d --json` for this week's highest-value visitors 3. Run `revklik analytics geo --site revklik.com --range 7d --json` for geographic breakdown 4. Fetch Google Search Console data: run `curl -s "https://app.revklik.com/api/v1/analytics/gsc?site_id=d9701d64-9e78-4b73-9726-e4f41593b843&range=7d" -H "Authorization: Bearer $REVKLIK_TOKEN"` and parse the JSON Compare this week vs last week. Highlight: - Which pages gained/lost the most organic traffic - Top search queries and their click-through rates - Which countries are converting best - Any visitors with high engagement but no conversion (opportunities) Format as a weekly digest and send to Telegram.

Anomaly Detection

Anomaly Prompt
Check my analytics for anomalies today: 1. Run `revklik analytics overview --site revklik.com --range 24h` 2. Run `revklik analytics overview --site revklik.com --range 7d --json` for the 7-day baseline 3. Run `revklik analytics journeys --site revklik.com --sort steps --limit 20 --range 24h --json` Compare today's stats against the 7-day average. Alert me ONLY if: - Traffic dropped more than 30% - Bounce rate spiked above 60% - A single visitor has abnormally high pageviews (potential bot) - Revenue is zero when it usually isn't If everything is normal, just send: "✅ All metrics within normal range." If there's an issue, send the alert to Telegram immediately.

Lead Scoring

Lead Scoring Prompt
Find my hottest leads this week: 1. Run `revklik analytics journeys --site revklik.com --sort steps --limit 50 --range 7d --json` 2. From the JSON, identify visitors who: - Have 5+ steps (high engagement) - Visited pricing or docs pages (buying intent) - Came from organic search or referral (warm traffic) - Are from countries matching my target market Score each visitor 0-100 based on these signals. List the top 5 with their scores, steps, source, country, and pages visited. Suggest what action to take for each (e.g., "visited pricing 3x — retarget with discount").

Jadwal Otomatis

Anda tidak perlu menjalankan prompt manual setiap hari. Jadwalkan Hermes via cron atau systemd timer.

Cron Job

# Crontab: jalankan setiap hari jam 08:00 pagi # Simpan prompt di file, pipe ke hermes 0 8 * * * cat /home/user/.config/hermes/prompts/daily-analytics.txt | hermes run --non-interactive --notify telegram

Systemd Timer (Recommended)

# ~/.config/systemd/user/hermes-analytics.service [Unit] Description=Hermes Daily Analytics Report [Service] Type=oneshot ExecStart=/usr/local/bin/hermes run --prompt-file /home/user/.config/hermes/prompts/daily-analytics.txt --non-interactive --notify telegram Environment=REVKLIK_TOKEN=rvt_your_token_here
# ~/.config/systemd/user/hermes-analytics.timer [Unit] Description=Daily Analytics at 08:00 [Timer] OnCalendar=*-*-* 08:00:00 Persistent=true [Install] WantedBy=timers.target
# Enable timer $ systemctl --user enable --now hermes-analytics.timer
Tip: Simpan prompt di file terpisah (daily-analytics.txt) agar mudah di-update tanpa edit cron. Hermes bisa membaca prompt dari file dengan flag --prompt-file.

Contoh Output

Ini contoh laporan yang dikirim Hermes ke Telegram setiap pagi:

Telegram — RevKlik Daily
📊 DAILY ANALYTICS — revklik.com ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 👥 Visitors: 412 (↑ 8% vs yesterday) 👁️ Pageviews: 1,245 | Bounce: 32.1% 💰 Revenue: $48.50 | Conversions: 3 🔥 Top Pages: 1. /pricing — 342 views 2. /docs — 289 views 3. / — 198 views 📈 Top Sources: 1. google — 189 visitors 2. direct — 134 visitors 3. facebook — 67 visitors 🧑 Top Engaged Visitors: 1. John Doe * — 16 steps, $24.00, from ID 2. 7177428f — 10 steps, $0, from ID 3. Jane Smith * — 8 steps, $12.50, from SE 💡 Insights: • Pricing page traffic up 23% — consider A/B testing the checkout flow • 2 visitors from SE hit pricing but didn't convert — retarget opportunity • Facebook traffic has 2.3x higher bounce rate than Google — check landing page relevance

Dengan setup ini, Anda mendapat insight analytics setiap pagi tanpa buka dashboard. Hermes menganalisis data dan mengirim rekomendasi aksi langsung ke Telegram Anda.

Next step: Setelah setup berjalan, Anda bisa menambahkan integrasi lain ke prompt — misalnya cek competitor, monitor uptime, atau kirim ke Slack. Hermes mendukung semua tool CLI yang bisa dijalankan di server Anda.