Everything you need to deploy SuperFastClaw and connect your AI to the world.
Installation
Prerequisites
- Go 1.26.2 or later —
go version - Git
- An API key for at least one provider (Anthropic, OpenAI, or local Ollama)
Clone & build
git clone https://github.com/kaushikdharamshi/superfastclaw-releases
cd superfastclaw
# Build a static binary (no CGO, no libc dependency)
CGO_ENABLED=0 go build -ldflags="-s -w" -o superfastclaw ./cmd/superfastclawbash
Cross-compile for other platforms
# Linux amd64
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build ./cmd/superfastclaw
# Linux arm64 (Raspberry Pi, AWS Graviton)
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build ./cmd/superfastclaw
# Windows
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build ./cmd/superfastclawbash
Configuration
Copy the example config and fill in your secrets. All values support ${ENV_VAR} expansion.
cp config.example.yaml config.yaml
$EDITOR config.yamlbash
Minimal config
gateway:
host: "127.0.0.1"
port: 18789
providers:
anthropic:
enabled: true
api_key: "${ANTHROPIC_API_KEY}"
default: "claude-sonnet-4-6"
channels:
telegram:
enabled: true
adapter: telegram
accounts:
- id: main
token: "${TELEGRAM_BOT_TOKEN}"
name: "MyBot"yaml
Gateway options
| Key | Type | Default | Description |
|---|---|---|---|
| gateway.host | string | 127.0.0.1 | Bind address for the WebSocket server |
| gateway.port | int | 18789 | TCP port (1–65535) |
| gateway.max_connections | int | 100 | Max concurrent WebSocket clients |
| gateway.read_timeout | duration | 30s | WebSocket read deadline |
| gateway.write_timeout | duration | 30s | WebSocket write deadline |
| gateway.ping_interval | duration | 20s | Keepalive ping interval |
Session options
| Key | Type | Default | Description |
|---|---|---|---|
| session.max_history | int | 200 | Max messages kept per session |
| session.ttl | duration | 24h | Session expiry after last message |
| session.persist_path | string | "" | Directory to persist sessions (empty = memory only) |
Security options
security:
tokens: ["your-secret-token"] # require Bearer auth on WS
allow_origins: ["https://myapp.com"]
allowlist:
mode: allowlist # open | allowlist | denylist
users: ["telegram:123456789"]
groups: ["slack:C12345"]yaml
Running
-
Set your API key
Export the environment variable before starting. The config reads it via
${ANTHROPIC_API_KEY}. -
Start the gateway
Run the binary with your config path. Use
--configflag or placeconfig.yamlin the working directory. -
Verify health
The gateway exposes a
/healthHTTP endpoint. A200 OKmeans it's running.
export ANTHROPIC_API_KEY=sk-ant-...
export TELEGRAM_BOT_TOKEN=123456:ABC...
./superfastclaw start --config config.yaml
# In another terminal:
curl http://127.0.0.1:18789/health
# → {"status":"ok","uptime":"3.4s","connections":0}bash
Build Flags
| Flag | Effect |
|---|---|
| CGO_ENABLED=0 | Produce a pure-Go static binary — no libc, runs on any Linux/macOS/Windows |
| -ldflags="-s -w" | Strip debug symbols (~40% size reduction). Safe on Linux; avoid on macOS Sequoia due to LC_UUID bug in older Go versions. |
| -trimpath | Remove local build paths from the binary (good for reproducible builds) |
WebSocket Gateway
Connect to ws://127.0.0.1:18789/ws. All messages are JSON. The gateway uses a simple request/response/event model.
// Request frame
{
"id": "req-1",
"method": "chat.send",
"payload": {
"session_id": "sess-abc",
"content": "Hello!"
}
}
// Response frame
{
"id": "req-1",
"ok": true,
"payload": { ... }
}
// Event frame (server → client, unsolicited)
{
"event": "stream.chunk",
"payload": {
"session_id": "sess-abc",
"chunk": "Hello back!"
}
}json
Sessions
Every conversation belongs to a session. Sessions carry message history and are keyed by a unique ID. Create one before sending messages.
// Create session
{ "id":"1", "method":"sessions.create", "payload":{"provider":"anthropic","model":"claude-sonnet-4-6"} }
// Send message — streaming response arrives as stream.chunk events
{ "id":"2", "method":"chat.send", "payload":{"session_id":"sess-abc","content":"What is Go?"} }json
Providers
Three providers are supported. All use raw HTTP + SSE — no SDKs, no extra dependencies.
providers:
anthropic:
enabled: true
api_key: "${ANTHROPIC_API_KEY}"
default: "claude-sonnet-4-6"
models:
- claude-opus-4-6
- claude-sonnet-4-6
- claude-haiku-4-5-20251001
openai:
enabled: false
api_key: "${OPENAI_API_KEY}"
default: "gpt-4o"
ollama:
enabled: false
base_url: "http://localhost:11434/v1"
default: "llama3.2"
timeout: 120syaml
ollama serve locally. Pull models first: ollama pull llama3.2. Great for fully offline deployments.
Agents
Define custom agents in config.yaml. The built-in security agent requires no config.
agents:
code-reviewer:
provider: anthropic
model: claude-sonnet-4-6
system_prompt: "You are a senior engineer reviewing code for correctness."
max_turns: 10yaml
# Run an agent via CLI
./superfastclaw agent run security --input "Audit /path/to/project"
# List available agents
./superfastclaw agent listbash
Device Registry
Register mobile or IoT devices to receive push notifications and queue offline messages.
{ "method":"device.register", "payload":{
"device_id": "iphone-alice",
"push_token": "abc123...",
"platform": "ios",
"session_id": "sess-abc"
}}json
devices:
persist_path: "~/.superfastclaw/devices.json"
queue_size: 100 # max offline messages per device
queue_ttl: 24hyaml
Push Notifications
APNs (iOS)
push:
apns:
key_id: "${APNS_KEY_ID}"
team_id: "${APNS_TEAM_ID}"
bundle_id: "com.yourcompany.app"
key_path: "/path/to/AuthKey.p8"
sandbox: trueyaml
FCM (Android)
push:
fcm:
server_key: "${FCM_SERVER_KEY}"yaml
crypto/ecdsa — no Apple SDK required. Tokens are cached for 50 minutes and auto-rotated.
MQTT (IoT)
The MQTT adapter bridges an MQTT broker to the AI gateway. IoT devices publish to devices/{id}/messages and receive AI responses at devices/{id}/responses.
channels:
mqtt:
enabled: true
adapter: mqtt
options:
broker: "tcp://localhost:1883"
client_id: "superfastclaw"
username: "${MQTT_USERNAME}"
password: "${MQTT_PASSWORD}"
topic_prefix: "devices"
qos: 1yaml
brew install mosquitto && brew services start mosquitto
Offline with Ollama
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model
ollama pull llama3.2
# Enable in config.yaml
# providers.ollama.enabled: truebash
WebSocket API Reference
All 16 methods available over WebSocket:
CLI Reference
superfastclaw start [--config path] Start the gateway
superfastclaw agent list List registered agents
superfastclaw agent run <id> Run an agent
--input "..." Input string
--stdin Read input from stdin
--provider anthropic Override provider
--model claude-sonnet-4-6 Override model
superfastclaw version Print versioncli
Environment Variables
| Variable | Description |
|---|---|
| ANTHROPIC_API_KEY | Anthropic API key (sk-ant-...) |
| OPENAI_API_KEY | OpenAI API key (sk-...) |
| TELEGRAM_BOT_TOKEN | Token from @BotFather |
| DISCORD_BOT_TOKEN | Discord bot token from developer portal |
| SLACK_BOT_TOKEN | Slack xoxb- bot token |
| WHATSAPP_ACCESS_TOKEN | Meta Cloud API access token |
| WHATSAPP_VERIFY_TOKEN | Meta webhook verify token (you choose) |
| WHATSAPP_PHONE_NUMBER_ID | Phone Number ID from Meta dashboard |
| MATRIX_ACCESS_TOKEN | Matrix client access token |
| TWITCH_OAUTH_TOKEN | Twitch OAuth token (oauth:...) |
| BLUEBUBBLES_PASSWORD | BlueBubbles server password (iMessage) |
| OBSIDIAN_API_KEY | Obsidian Local REST API key |
| APNS_KEY_ID | Apple APNS key ID (10 chars) |
| APNS_TEAM_ID | Apple Team ID (10 chars) |
| FCM_SERVER_KEY | Firebase Cloud Messaging server key |