npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wagent/wagent

v0.2.77

Published

WAGENT - WhatsApp AI Agent Platform

Readme

🤖 WAGENT — WhatsApp AI Agent Platform

Open-source, self-hosted, multi-AI WhatsApp agent untuk siapapun.

License: MIT Bun TypeScript

🇩🇮 Bahasa Indonesia | 🇺🇸 English


🎯 Apa itu WAGENT?

WAGENT adalah platform WhatsApp AI Agent yang bisa dipakai siapa saja — personal, profesional, bisnis, developer.

  • 💬 Personal AI Assistant — AI yang jawab WhatsApp kamu
  • 🛒 Toko Online — Otomasi CS, order, pembayaran
  • 🏢 Bisnis — Service, booking, konsultasi
  • 🧑‍💻 Developer — Build AI agent custom dengan skills

📸 Preview / Tangkapan Layar

1. TUI Setup Wizard

Wizard penyiapan interaktif di terminal saat pertama kali menjalankan ./bin/wagent init.

TUI Setup Wizard

2. WhatsApp QR Authentication di Terminal

Kode QR dinamis yang dihasilkan di terminal untuk menghubungkan nomor WhatsApp Anda.

WhatsApp QR Code

3. WAGENT Service di Systemd

Log operasional background daemon saat berjalan di server Linux (systemctl start wagent).

WAGENT Service

4. Konfigurasi Nomor WhatsApp (Web Dashboard)

Tampilan pengaturan di Web Dashboard untuk mengelola integrasi multi-nomor WhatsApp Anda.

Web Dashboard WA Configuration

5. Riwayat Percakapan (Web Dashboard)

Tampilan pemantauan pesan masuk real-time, di mana CS manusia dapat melakukan intervensi obrolan.

Web Dashboard Chat Interface

6. Telegram Escalation (Notifikasi Bantuan Manusia)

Notifikasi real-time yang dikirimkan ke Telegram saat AI tidak bisa menjawab pertanyaan pelanggan, agar agen manusia dapat mengambil alih percakapan.

Telegram Escalation


✨ Fitur

Core

| Fitur | Deskripsi | |-------|-----------| | 🧠 Multi-AI Provider | OpenAI, Gemini, Claude, atau Ollama (local) | | 📚 RAG Knowledge Base | Semantic search + FTS5 untuk jawaban akurat | | 👥 Multi-Number WhatsApp | Kelola banyak nomor dari satu instance | | 🤝 Human Takeover | AI otomatis berhenti ketika human agent membalas | | 🚨 Telegram Escalation | Notifikasi ke Telegram ketika AI tidak bisa menjawab | | 🎤 Voice Transcription | Transkripsi pesan suara via Whisper atau Gemini | | 🔐 Encryption at-rest | AES-256-GCM enkripsi data sensitif | | ⏰ Scheduled Messages | Kirim pesan terjadwal (daily/weekly/monthly) | | 🐌 Natural Behavior | Typing delay, read receipts — seperti manusia |

Human-like Behavior

| Fitur | Deskripsi | |-------|-----------| | ✍️ Multi-Burst Typing | AI mengetik dalam beberapa burst dengan jeda random — tidak terukur, seperti manusia nyata | | 👀 Reading Simulation | Delay sebelum AI mulai memproses, seolah membaca pesan | | 🔄 Auto Handback | Human ketik ai / bot di chat customer → AI langsung resume | | ⏱️ Smart Cooldown | AI resume otomatis 10 menit setelah human terakhir reply (timer reset tiap reply) | | 📢 Group Chat Filter | Bot hanya respon saat di-@mention, bukan saat @all |

Business

| Fitur | Deskripsi | |-------|-----------| | 🛒 Order Management | Buat & kelola pesanan dari WhatsApp | | 📦 Product Catalog | Kelola produk, stok, harga | | 🚚 Shipping Integration | 17+ kurir (JNE, J&T, SiCepat, dll) | | 💳 Payment Gateway | Midtrans, Xendit, Transfer, COD | | 📊 Analytics | Response time, CSAT, top contacts |

Integration

| Fitur | Deskripsi | |-------|-----------| | 🔌 MCP Support | Model Context Protocol — konek ke sistem apapun | | 🧩 Skill System | Plugin JavaScript untuk extensibilitas | | 🌐 Web Scraper | Cari info dari internet | | 📱 Dashboard | Web UI untuk monitoring & management | | 🤖 Telegram /setup | Personalisasi AI via Telegram — interaktif seperti interview |


🚀 Quick Start

Prasyarat

  • Bun ≥ 1.0
  • Akun WhatsApp (nomor bisnis)
  • API key AI provider (Gemini gratis)

Install

Opsi 1: Otomatis (Rekomendasi)

curl -fsSL https://raw.githubusercontent.com/crediblemark-official/WAGENT/main/install.sh | bash

Opsi 2: Manual (Kloning Repositori)

git clone https://github.com/crediblemark-official/WAGENT.git
cd WAGENT
bun install
bun run build

Setup

./bin/wagent init              # Setup wizard interaktif

Start

Mode Interaktif (Terminal)

./bin/wagent start

Scan QR code WhatsApp. Selesai!


⚙️ Production / Deployment (systemd)

WAGENT dilengkapi dengan manajer layanan systemd internal yang memudahkan Anda mendeploy asisten AI ini sebagai daemon latar belakang di server produksi Linux Anda.

1. Inisialisasi Konfigurasi (Wajib)

Sebelum menjalankan layanan di latar belakang, Anda wajib melakukan inisialisasi konfigurasi terlebih dahulu untuk membuat berkas setelan:

wagent init

Ikuti langkah-langkah di layar hingga selesai.

2. Menjalankan Layanan

Untuk menginstal dan menjalankan WAGENT di latar belakang (daemon):

wagent service start

Perintah ini secara otomatis mendeteksi path, menginstal file unit wagent.service ke folder systemd user (~/.config/systemd/user/wagent.service), me-load daemon, dan menyalakan asisten AI Anda.

3. Memantau Status & Log

Memeriksa status unit layanan:

wagent service status

Membaca log aktivitas asisten AI secara real-time:

wagent service logs

4. Menghentikan & Memulai Ulang

Untuk menghentikan layanan:

wagent service stop

Untuk memuat ulang konfigurasi/memulai ulang layanan:

wagent service restart

5. Autostart Saat Booting (Optional)

Mengaktifkan layanan agar otomatis menyala saat server Linux dinyalakan:

wagent service enable

Menonaktifkan autostart:

wagent service disable

💡 Use Cases

🧑 Personal AI Assistant

# AI yang jaga WhatsApp kamu 24/7
# Jawab pertanyaan, ingatkan jadwal, cari info

# Setup cepat
./bin/wagent init
# Set system prompt: "Kamu adalah asisten pribadi yang membantu"
./bin/wagent start

# Sekarang AI menjalankan WhatsApp kamu!

👨‍💻 Developer / Freelancer

# Build AI agent untuk klien
# Custom skills untuk kebutuhan spesifik

# Buat skill untuk integrasi API klien
mkdir -p skills
cat > skills/client-api.js << 'EOF'
export default () => ({
  manifest: { name: 'client-api', version: '1.0.0', description: 'Client API integration' },
  tools: [{
    name: 'get_client_data',
    description: 'Ambil data dari API klien',
    parameters: { type: 'object', properties: { id: { type: 'string' } } },
    handler: async (args) => {
      const res = await fetch(`https://api.client.com/data/${args.id}`);
      return res.json();
    },
  }],
});
EOF

🏪 Toko Online / E-Commerce

# Upload katalog produk
./bin/wagent kb upload products.csv

# Customer tanya: "Baju A ada warna apa?"
# AI search KB → jawab otomatis

# Customer tanya: "Ongkir ke Bandung?"
# AI hitung ongkir via RajaOngkir → jawab

# Customer: "Mau order 2 pcs"
# AI buat order → approval via Telegram

🏢 Service Business (Salon, Klinik, etc)

# Upload daftar harga & layanan
./bin/wagent kb upload services.md

# Customer: "Berapa facial?"
# AI jawab dari KB

# Customer: "Mau booking jam 3"
# AI catat → kirim notifikasi ke Telegram

🏭 B2B / Distributor

# Konek ke POS yang sudah ada via MCP
./bin/wagent mcp connect pos-server

# Customer: "Stok barang A berapa?"
# AI query POS via MCP → jawab

# Customer: "Buat PO 100 unit"
# AI buat order di POS → approval

🤖 AI Agent untuk Apapun

# Buat skill custom
mkdir -p skills
cat > skills/my-skill.js << 'EOF'
export default () => ({
  manifest: { name: 'my-skill', version: '1.0.0', description: 'Custom skill' },
  tools: [{
    name: 'my_tool',
    description: 'My custom tool',
    parameters: { type: 'object', properties: {} },
    handler: async () => JSON.stringify({ result: 'Hello!' }),
  }],
});
EOF

# Skill langsung ter-load
./bin/wagent start

📦 Skills / Integrasi

WAGENT mendukung integrasi via Skills (plugins):

Shipping (17+ Provider)

  • Aggregator: RajaOngkir, Shipper, Biteship, KiriminAja, Popaket, Autokirim, APIKurir
  • Kurir: JNE, J&T, SiCepat, AnterAja, TIKI, POS, Lion, Ninja Van, Grab

Payment

  • Gateway: Midtrans, Xendit
  • Manual: Transfer Bank, COD, E-Wallet

POS / E-Commerce

  • Shopee, Tokopedia, WooCommerce
  • Custom POS via REST API

MCP (Model Context Protocol)

  • Database: MySQL, PostgreSQL, MongoDB
  • File System
  • Custom API

Lihat folder packages/skills/ untuk contoh skill.


🔌 MCP (Model Context Protocol)

WAGENT mendukung MCP untuk konek ke sistem eksternal:

# Connect ke MySQL via MCP
./bin/wagent mcp connect mysql-server

# Expose WAGENT tools ke AI lain
./bin/wagent mcp expose --stdio
./bin/wagent mcp expose --port 3001

📋 Commands

# Core
./bin/wagent init                  # Setup wizard
./bin/wagent start                 # Start agent
./bin/wagent status                # Cek status
./bin/wagent config                # Lihat config
./bin/wagent log                   # Lihat log

# Knowledge Base
./bin/wagent kb list               # List KB
./bin/wagent kb upload <file>      # Upload file
./bin/wagent kb search "query"     # Search KB
./bin/wagent kb categories         # List kategori

# Skills
./bin/wagent skill list            # List skills
./bin/wagent skill install <path>  # Install skill

# Multi-Number
./bin/wagent number list           # List nomor WA
./bin/wagent number add <id>       # Tambah nomor

# MCP
./bin/wagent mcp list              # List MCP servers
./bin/wagent mcp test              # Test connections
./bin/wagent mcp expose            # Expose tools

# Model
./bin/wagent model list            # List AI models
./bin/wagent model resolve <id>    # Resolve model

# Service (systemd)
./bin/wagent service start         # Start daemon
./bin/wagent service status        # Cek status
./bin/wagent service logs          # Lihat log live

# Encryption
./bin/wagent crypto init           # Setup encryption
./bin/wagent crypto encrypt        # Enkripsi data

# Maintenance
./bin/wagent update                # Update WAGENT

🛠️ Tech Stack

Runtime      │ Bun ≥1.0 (ESM)
Language     │ TypeScript 5.9
Database     │ better-sqlite3 (SQLite + WAL + FTS5)
AI Providers │ OpenAI / Gemini / Claude / Ollama
Embeddings   │ Gemini text-embedding-004 (768d)
WhatsApp     │ @whiskeysockets/baileys
CLI          │ Commander.js + picocolors
Dashboard    │ React 19 + Vite 6 + Express 5 + WebSocket
MCP          │ @modelcontextprotocol/sdk ≥2.0.0-beta.1 (peer dep)
Encryption   │ AES-256-GCM (Node crypto)
Logging      │ Pino structured logger
Testing      │ Vitest + @vitest/coverage-v8

📊 Test Coverage

cd packages/core
npx vitest run --coverage

| Metrik | Nilai | |:---|---:| | Lines | ~87% 🟢 | | Branches | ~78% 🟢 | | Functions | ~86% 🟢 | | Statements | ~86% 🟢 | | Tests | 1437 ✅ |


📖 Dokumentasi

| Dokumen | Deskripsi | |---------|-----------| | 📘 Core Package | AI Agent Engine, RAG, Database | | 📟 CLI Commands | Command line interface | | 📱 Dashboard | Web UI monitoring & management | | 💬 WhatsApp Adapter | WhatsApp integration | | 🖥️ TUI | Terminal user interface |


🤝 Kontribusi

  1. Coding: Buka issue, fork, buat PR
  2. Testing: Coba install, laporkan bugs
  3. Skills: Buat skill baru untuk integrasi
  4. Dokumentasi: Bantu perbaiki docs

📄 Lisensi

WAGENT dirilis di bawah lisensi MIT.


🙏 Kredit