Channels
Goclaw
Open-source AI assistant framework in Go β WhatsApp, Discord, Telegram with multi-tenant workspaces, plugin system, and OpenClaw-compatible skills
Configuration Example
# config.yaml
access:
default_policy: deny # deny | allow | ask
owners:
- "5511999999999" # Your phone number (full control)
admins:
- "5511888888888" # Can manage users + workspaces
allowed_users:
- "5511777777777" # Can interact with the bot
allowed_groups:
- "[email protected]" # Group JIDs
README
# GoClaw
**AI assistant. Any OS.**
Open-source personal AI assistant framework in Go. Single binary, zero runtime dependencies, cross-compilable to Linux, macOS, Windows, ARM, and anything Go targets. CLI + messaging channels (WhatsApp, Discord, Telegram). Built on the [AgentGo](https://github.com/jholhewres/agent-go) SDK.
## About
GoClaw is heavily inspired by [OpenClaw](https://github.com/openclaw/openclaw) β a project that truly revolutionized what personal AI assistants can be. OpenClaw pioneered the concept of an extensible agent with community-driven skills, layered prompts, and multi-channel support. It demonstrated that an AI assistant is more than just a chatbot: it's a platform where skills, tools, and integrations compose together to create something genuinely useful in daily life.
GoClaw takes that same vision and brings it to Go: a single compiled binary with native WhatsApp support, a plugin system for channels, and a multi-tenant workspace architecture β all while keeping OpenClaw's skill ecosystem accessible through a compatibility layer.
## Why Go, and Why Security Matters
One core concern drove the design of GoClaw: **security in an open-source skill ecosystem**.
OpenClaw's community skill repository has 900+ skills contributed by hundreds of developers. That's incredible β but it also means no single maintainer can audit, verify, and keep up with every script that runs inside the assistant. A malicious or poorly written skill could access your files, exfiltrate data, mine crypto, or open reverse shells.
Creating, maintaining, and verifying that many skills is simply not feasible at scale. So instead of trying to trust every skill, **why not create a secure environment to execute them?**
That's the approach GoClaw takes:
- **Native Go skills** are compiled into the binary β fast, type-safe, and auditable
- **Community scripts** (Python, Node.js, Shell) run inside a **multi-level sandbox** with Linux namespace isolation or Docker containers
- **Environment filtering** blocks injection vectors (`LD_PRELOAD`, `NODE_OPTIONS`, `PYTHONPATH`, etc.)
- **Content scanning** detects `eval()`, reverse shells, crypto mining, and obfuscated code *before* execution
- **Network isolation** is the default β scripts can't phone home unless explicitly allowed
The result: you get access to the entire OpenClaw skill ecosystem, but every external script runs in a controlled, resource-limited environment. Trust the ecosystem, verify the execution.
## Quick Start
```bash
# Build from source
git clone https://github.com/jholhewres/goclaw.git
cd goclaw
make build
# Interactive setup wizard (config + encrypted vault)
./bin/copilot setup
# Start (scan QR code on first run)
make run
```
The setup wizard guides you through all configuration: assistant name, phone number, access policy, API key (encrypted), model selection, language, and WhatsApp settings.
Or install directly:
```bash
go install github.com/jholhewres/goclaw/cmd/copilot@latest
copilot setup
copilot serve
```
### CLI Chat
Talk to the assistant directly from the terminal β same agent loop, tools, and skills as WhatsApp:
```bash
copilot chat # Interactive REPL
copilot chat "What time is it in SP?" # Single message
```
## Access Control
GoClaw does **not** respond to everyone. Only explicitly authorized contacts can interact with the assistant β just like OpenClaw.
```yaml
# config.yaml
access:
default_policy: deny # deny | allow | ask
owners:
- "5511999999999" # Your phone number (full control)
admins:
- "5511888888888" # Can manage users + workspaces
allowed_users:
- "5511777777777" # Can interact with the bot
allowed_groups:
- "[email protected]" # Group JIDs
```
| Policy | Behavior |
|--------|----------|
| `deny` | Silently ignores unknown contacts (default, recommended) |
| `allow` | Responds to everyone except blocked contacts |
| `ask` | Sends a one-time "access not authorized" message |
Access levels: **owner** > **admin** > **user** > **blocked**.
Owners and admins can manage access in real time via chat commands:
```
/allow 5511777777777 Grant access
/block 5511666666666 Block a contact
/admin 5511888888888 Promote to admin
/users List all authorized users
/group allow Allow the current group
/status Bot status
/help All commands
```
## Workspaces
Multiple people can use the same WhatsApp number with **completely isolated contexts**. Each workspace has its own system prompt, skills, LLM model, language, and conversation memory.
```yaml
workspaces:
default_workspace: "default"
workspaces:
- id: "default"
name: "Default"
active: true
- id: "personal"
name: "Personal Assistant"
instructions: |
You are my personal assistant. Help with daily tasks,
reminders, and planning. Be proactive.
model: "gpt-4o"
language: "pt-BR"
skills: [weather, web-search, gog]
members: ["5511999999999"]
- id: "work"
name: "Dev Team"
instructions: |
You are a technical assistant for our development team.
Help with code reviews, architecture, and documentation.
model: "gpt-4o-mini"
language: "en"
skills: [github, web-search, summarize]
members: ["5511888888888", "5511777777777"]
groups: ["[email protected]"]
```
Managed via chat:
```
/ws create personal "My Assistant"
/ws assign 5511999999999 personal
/ws list
/ws info personal
```
## Architecture
GoClaw has three layers of extensibility: **Core**, **Plugins**, and **Skills**.
```
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GoClaw β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β CLI (cmd/copilot/) β
β chat Β· serve Β· schedule Β· skill Β· config Β· remember Β· healthβ
βββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββ€
β Core β Plugins (.so) β Skills (separate repo) β
β Compiled in β Loaded at β Installed via CLI β
β the binary β runtime β from goclaw-skills β
β β β β
β βΈ WhatsApp β βΈ Extra β βΈ Prompt / Soul β
β βΈ Access β channels β βΈ Tools for the agent β
β βΈ Workspaces β βΈ Webhooks β βΈ Triggers β
β βΈ Guardrails β βΈ Custom β βΈ Config schema β
β βΈ Sessions β integrations β βΈ System prompt inject β
β βΈ Scheduler β β β
β βΈ Sandbox β β β
βββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββ€
β AgentGo SDK (github.com/jholhewres/agent-go) β
β Agent Β· Models Β· Tools Β· Memory Β· Hooks Β· Guardrails β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
- **Core** = what GoClaw needs to run. WhatsApp, access control, workspaces, guardrails, sandbox β security is not optional.
- **Plugins** = runtime extensions via Go's native plugin system (`.so`). Add channels, webhooks, or integrations without recompiling.
- **Skills** = what the *agent* can do. A skill teaches the LLM new capabilities through prompt instructions, tools, and triggers. Skills live in a separate repository.
## Connecting to AgentGo SDK
GoClaw uses the [AgentGo SDK](https://github.com/jholhewres/agent-go) for agent execution, LLM models, tools, and memory.
```go
import (
"github.com/jholhewres/agent-go/pkg/agentgo/agent"
"github.com/jholhewres/agent-go/pkg/agentgo/models/openai"
)
model, _ := openai.New("gpt-4o-mini", openai.Config{
APIKey: os.Getenv("OPENAI_API_KEY"),
})
ag, _ := agent.New(agent.Config{
Name: "Copilot",
Model: model,
Instructions: "You are a helpful assistant.",
})
output, _ := ag.Run(context.Background(), "What's on my calendar?")
```
### Supported Providers
| Provider | Import | Example model |
|----------|--------|---------------|
| OpenAI | `models/openai` | `gpt-4o-mini`, `gpt-4o` |
| Anthropic | `models/anthropic` | `claude-3-5-sonnet-20241022` |
| Google Gemini | `models/gemini` | `gemini-1.5-pro` |
| Ollama (local) | `models/ollama` | `llama2`, `mistral` |
| DeepSeek | `models/deepseek` | `deepseek-chat` |
| Groq | `models/groq` | `llama-3.1-70b-versatile` |
| Together | `models/together` | `meta-llama/Llama-3-70b` |
| OpenRouter | `models/openrouter` | Any model |
| LM Studio | `models/lmstudio` | Local models |
## Channels
### WhatsApp (core)
Native Go implementation using [whatsmeow](https://go.mau.fi/whatsmeow). Compiled into the binary β no Node.js, no Baileys.
Full support: text, images, audio, video, documents, stickers, voice notes, locations, contacts, reactions, reply/quoting, typing indicators, read receipts, group messages.
```yaml
channels:
whatsapp:
session_dir: "./sessions/whatsapp"
trigger: "@copilot"
respond_to_groups: true
respond_to_dms: true
auto_read: true
send_typing: true
media_dir: "./data/media"
max_media_size_mb: 16
```
### Discord & Telegram (plugins)
Loaded as Go plugins (`.so`) at runtime. Not everyone needs every channel.
```go
// Build a channel plugin
// my_channel_plugin.go
package main
import "github.com/jholhewres/goclaw/pkg/goclaw/channels"
var Channel channels.Channel = &MyChannel{}
// go build -buildmode=plugin -o plugins/mychannel.so my_channel_plugin.go
```
## Skills
Skills teach the agent new capabilities. They live in a separate repository ([goclaw-skills](https://github.com/jholhewres/goclaw-skills)) and are managed via CLI.
### Two Formats
| Format | Files | Runtime | Security |
|--------|-------|---------|----------|
| **Nativ
... (truncated)
channels
Comments
Sign in to leave a comment