Skip to content

hangnhat57/go-molt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Molt πŸ¦€

Personal AI Gateway written in Go β€” Inspired by OpenClaw

Molt lΓ  bαΊ£n viαΊΏt lαΊ‘i cα»§a OpenClaw bαΊ±ng Go, cung cαΊ₯p gateway kαΊΏt nα»‘i cΓ‘c nền tαΊ£ng nhαΊ―n tin (Telegram, Discord, WhatsApp) vα»›i AI agents (Claude, GPT, Gemini).

✨ Features

  • πŸš€ Fast & Lightweight β€” Single binary 14MB, startup ~100ms
  • πŸ“± Multi-channel β€” Telegram (Discord, WhatsApp coming soon)
  • πŸ€– Multi-model β€” Anthropic Claude, OpenAI GPT, GitHub Copilot
  • πŸ› οΈ 25+ Built-in Tools β€” exec, read, write, browser, cron, memory, tts, canvas
  • 🧠 Memory System β€” Vector search + keyword fallback
  • πŸ“š Skills System β€” Compatible vα»›i OpenClaw SKILL.md format
  • ⏰ Cron Scheduler β€” at/every/cron expressions vα»›i timezone
  • 🎨 Canvas β€” Web-based rendering vα»›i screenshot
  • πŸ”Š TTS β€” OpenAI + ElevenLabs text-to-speech
  • πŸ–₯️ Control UI β€” Real-time web dashboard
  • πŸ” Local-first β€” Dα»― liệu khΓ΄ng qua cloud trung gian

πŸ“¦ Installation

# Clone repo
git clone https://github.com/hangnhat57/molt.git
cd molt

# Build
go build -o bin/molt ./cmd/molt

# Or install globally
go install ./cmd/molt@latest

Requirements

  • Go 1.23+
  • Chrome/Chromium (for browser automation)

πŸš€ Quick Start

# 1. Initialize config
molt config init

# 2. Edit config
nano ~/.molt/config.json

# 3. Start gateway
molt gateway

# 4. Open Control UI
open http://127.0.0.1:18791

βš™οΈ Configuration

Config file: ~/.molt/config.json

{
  "gateway": {
    "port": 18789,
    "bind": "loopback",
    "controlUi": {
      "enabled": true
    }
  },
  "agents": {
    "default": "main",
    "defaults": {
      "model": "anthropic/claude-sonnet-4-20250514",
      "fallback": "openai/gpt-4o",
      "anthropicKey": "sk-ant-...",
      "openaiKey": "sk-...",
      "githubCopilotToken": "ghu_..."
    }
  },
  "telegram": {
    "enabled": true,
    "botToken": "123456:ABC...",
    "allowlist": [1461352104]
  }
}

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        CHANNELS                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Telegram   β”‚   Discord    β”‚   WhatsApp (planned)         β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚              β”‚                       β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚        Gateway         β”‚
              β”‚   ws://127.0.0.1:18789 β”‚
              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
              β”‚ β€’ Session Manager      β”‚
              β”‚ β€’ Channel Manager      β”‚
              β”‚ β€’ WebSocket Server     β”‚
              β”‚ β€’ HTTP API             β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                 β–Ό                 β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Agents    β”‚ β”‚    Tools     β”‚ β”‚   Services   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β€’ Runner     β”‚ β”‚ β€’ exec       β”‚ β”‚ β€’ Memory     β”‚
β”‚ β€’ Prompt     β”‚ β”‚ β€’ read/write β”‚ β”‚ β€’ Skills     β”‚
β”‚ β€’ Memory     β”‚ β”‚ β€’ browser    β”‚ β”‚ β€’ Cron       β”‚
β”‚              β”‚ β”‚ β€’ web_search β”‚ β”‚ β€’ TTS        β”‚
β”‚              β”‚ β”‚ β€’ cron       β”‚ β”‚ β€’ Canvas     β”‚
β”‚              β”‚ β”‚ β€’ tts        β”‚ β”‚ β€’ Control UI β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚     LLM Providers      β”‚
              β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€
              β”‚Anthropicβ”‚OpenAI β”‚Copilotβ”‚
              β”‚(Claude) β”‚ (GPT) β”‚       β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

molt/
β”œβ”€β”€ cmd/molt/              # CLI entry point
β”‚   └── main.go
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ agents/              # Agent runner
β”‚   β”‚   └── runner.go
β”‚   β”œβ”€β”€ browser/             # Browser automation (chromedp)
β”‚   β”‚   β”œβ”€β”€ browser.go
β”‚   β”‚   └── tools.go
β”‚   β”œβ”€β”€ canvas/              # Web canvas rendering
β”‚   β”‚   β”œβ”€β”€ canvas.go
β”‚   β”‚   └── tools.go
β”‚   β”œβ”€β”€ channels/            # Channel adapters
β”‚   β”‚   └── telegram.go
β”‚   β”œβ”€β”€ config/              # Configuration
β”‚   β”‚   └── types.go
β”‚   β”œβ”€β”€ controlui/           # Control UI dashboard
β”‚   β”‚   └── server.go
β”‚   β”œβ”€β”€ cron/                # Cron scheduler
β”‚   β”‚   β”œβ”€β”€ scheduler.go
β”‚   β”‚   └── tools.go
β”‚   β”œβ”€β”€ gateway/             # Gateway server
β”‚   β”‚   β”œβ”€β”€ server.go
β”‚   β”‚   β”œβ”€β”€ session.go
β”‚   β”‚   └── channels.go
β”‚   β”œβ”€β”€ memory/              # Memory system
β”‚   β”‚   β”œβ”€β”€ memory.go
β”‚   β”‚   β”œβ”€β”€ embedder.go
β”‚   β”‚   └── tools.go
β”‚   β”œβ”€β”€ prompt/              # Dynamic system prompt
β”‚   β”‚   └── builder.go
β”‚   β”œβ”€β”€ skills/              # Skills system
β”‚   β”‚   β”œβ”€β”€ skills.go
β”‚   β”‚   └── tools.go
β”‚   β”œβ”€β”€ tools/               # Built-in tools
β”‚   β”‚   β”œβ”€β”€ tools.go
β”‚   β”‚   └── web.go
β”‚   └── tts/                 # Text-to-speech
β”‚       β”œβ”€β”€ tts.go
β”‚       └── tools.go
β”œβ”€β”€ pkg/
β”‚   └── llm/                 # LLM providers
β”‚       β”œβ”€β”€ provider.go
β”‚       β”œβ”€β”€ anthropic.go
β”‚       β”œβ”€β”€ openai.go
β”‚       └── github_copilot.go
β”œβ”€β”€ go.mod
└── README.md

πŸ”§ Commands

# Start gateway server
molt gateway
molt gateway --port 8080 --bind lan
molt gateway --headless=false  # Show browser

# Configuration
molt config init    # Create default config
molt config show    # Show current config

# Health check
molt doctor

# Show status
molt status

πŸ› οΈ Tools

Core Tools

Tool Description
exec Execute shell commands
read Read file contents
write Write to files
edit Edit files (find/replace)

Web Tools

Tool Description
web_search Search web (Brave API)
web_fetch Fetch URL content

Browser Tools

Tool Description
browser_navigate Navigate to URL
browser_screenshot Capture screenshot
browser_snapshot Get page content
browser_click Click element
browser_type Type into input
browser_evaluate Execute JavaScript

Cron Tools

Tool Description
cron_list List scheduled jobs
cron_add Add new job
cron_remove Remove job
cron_run Trigger job now
cron_status Scheduler status

Memory Tools

Tool Description
memory_search Semantic search memories
memory_get Read memory file

Skills Tools

Tool Description
skills_list List available skills
skills_search Search skills
skills_info Get skill details

TTS Tools

Tool Description
tts Convert text to speech
tts_voices List available voices

Canvas Tools

Tool Description
canvas_present Display HTML/markdown
canvas_snapshot Capture canvas
canvas_eval Execute JS in canvas
canvas_hide Close canvas session
canvas_list List canvas sessions

πŸ”Œ Ports

Port Service
18789 Gateway WebSocket
18790 Canvas HTTP server
18791 Control UI dashboard

πŸ“Š Comparison with OpenClaw

Feature OpenClaw (TypeScript) Molt (Go)
Language TypeScript/Node.js Go
Binary Requires Node.js Single binary
Size ~100MB (node_modules) 14MB
Memory ~100-300MB ~20-50MB
Startup ~2-5s ~100ms
Lines of code ~555,000 ~7,800
Channels 10+ 1 (WIP)
Skills 50+ Compatible loader
Browser Playwright chromedp

πŸ—ΊοΈ Roadmap

  • Gateway server with WebSocket
  • Telegram channel
  • Anthropic Claude provider
  • OpenAI provider
  • GitHub Copilot provider
  • Basic tools (exec, read, write, edit)
  • Web tools (search, fetch)
  • Browser automation (chromedp)
  • Cron scheduler
  • Memory system (vector + keyword)
  • Skills system (OpenClaw compatible)
  • Dynamic system prompt
  • TTS (OpenAI, ElevenLabs)
  • Canvas rendering
  • Control UI dashboard
  • Discord channel
  • WhatsApp channel
  • Google Gemini provider
  • Ollama provider
  • Message tool (cross-channel)
  • Nodes (mobile integration)

🀝 Contributing

PRs welcome! Please follow Go conventions and add tests.

# Run tests
go test ./...

# Format code
go fmt ./...

# Lint
golangci-lint run

πŸ“„ License

MIT

πŸ™ Credits


Built with πŸ¦€ by Nathan Nguyen β€” 2026

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages