Open Source • Go-based • Extensible

Modular AI Chatbot Framework

A powerful, extensible chatbot framework with multi-channel support, custom JavaScript skills, and AI-powered conversations.

{
  "Database": "db/database.db",
  "LogLevel": "Info",
  "Channels": {
    "Telegram": {"Enabled": true, "token": "YOUR_BOT_TOKEN"},
    "Whatsapp": {"Enabled": false}
  },
  "Providers": [
    {"Name": "Local LLM", "Type": "openai", "BaseUrl": "http://localhost:1234/v1"},
    {"Name": "Google", "Type": "google", "ApiKey": "YOUR_API_KEY", "Model": "gemini-2.0-flash"},
    {"Name": "OpenRouter", "Type": "openai", "BaseUrl": "https://openrouter.ai/api/v1", "ApiKey": "YOUR_API_KEY"}
  ]
}
{
  "Name": "My User",
  "ID": "Telegram:123456789",
  "Allowed": true,
  "Provider": "Local LLM",
  "HistorySize": 50,
  "Tools": [
    {"Name": "message_reaction", "Enabled": true},
    {"Name": "javascript", "Enabled": true},
    {"Name": "skills", "Enabled": true},
    {"Name": "subagent", "Enabled": true},
    {"Name": "cron", "Enabled": true},
    {"Name": "timer", "Enabled": true}
  ],
  "Skills": [
    {"Name": "javascript", "Enabled": true},
    {"Name": "memories", "Enabled": true},
    {"Name": "web", "Enabled": true}
  ]
}
const args = GetArgs();

async function main() {
  const { input } = args;
  return `You said: ${input}`;
}

// Export the result
export default main();

Powerful Features

Everything you need to build sophisticated AI chatbots

Multi-Channel Support

Seamless integration with Telegram and WhatsApp with full message and reaction support.

Custom Skills

Extend functionality using JavaScript-based skills. Create powerful tools with the language you love.

AI Agents

Powered by LangChainGo with robust conversation handling and multiple LLM provider support.

Cron & Timers

Schedule recurring tasks with cron expressions or set one-time alarms for specific actions.

Memory System

Persistent text storage for user preferences, facts, and data across conversations and restarts.

Hot-Reloading

Session configuration changes applied in real-time without restarting the bot.

Architecture

A modular design built for extensibility and maintainability

Agent System

AI-driven logic and conversation flows

Channel Controller

Abstraction for Telegram & WhatsApp

Skill System

Discover, load, execute JS skills

Cron System

Schedule recurring tasks

Timer System

One-time alarms & timeouts

Directory Structure

JGBot/
├── agent/          # AI agent and tool implementations
├── channels/       # Telegram, WhatsApp integration
├── conf/           # Configuration management
├── session/        # Session logic and lifecycle
├── skill/          # Skill loader and executor
├── skills/         # User-defined skills (JS)
├── cron/           # Cron job system
├── timer/          # Timer and alarm system
├── js/             # JavaScript runtime bridge
├── database/       # GORM database models
└── main.go         # Entry point

Supported Providers

Choose from a wide range of LLM providers via LangChainGo

OpenAI

OpenAI

GPT-4, GPT-3.5

Anthropic

Anthropic

Claude 3

Google

Google

Gemini Pro

Ollama

Ollama

Local models

Mistral

Mistral

Mistral AI

Supported Channels

Telegram

Telegram

Messaging, reactions, typing status, rich text

WhatsApp

WhatsApp

Messaging, reactions, typing status, rich text

Get Started

Install and run JGBot in minutes

Quick Setup

1 Clone the repository

git clone https://github.com/JulioGuillermo/JGBot
cd JGBot

2 Install dependencies

go mod tidy

3 Build the application

go build

4 Run the application

./JGBot

Note: On the first run, the application generates default configuration files and a new database file. You can customize the database path in the configuration.

Documentation

Explore detailed guides to master JGBot