GoClaw Documentation
GoClaw is a high-performance Multi-Agent Orchestration Platform and AI Gateway implemented in Go. It provides a unified interface for multiple AI models, advanced agent routing, and a robust tool ecosystem, optimized for low-resource environments like home servers and NAS devices.
Key Capabilities
- Agent Router: Intelligent message routing based on channel, user, or group to specific specialized agents.
- Multi-Agent Orchestration: Run multiple isolated agents (e.g., Personal Assistant, Coding Expert, Family Bot) with unique personalities, models, and toolsets.
- Subagent Delegation: Primary agents can spawn temporary subagents for complex multi-step tasks.
- RAG & Long-term Memory: Integrated Retrieval-Augmented Generation for persistent memory and context-aware interactions.
- AI Gateway: A unified REST/WebSocket gateway compatible with major AI providers (Gemini, OpenAI, Claude, DeepSeek, Ollama, and any OpenAI-compatible endpoint).
- Built-in Tools: Shell, files, web, databases, observability and code analysis, compiled into the binary and selected per query by a RAG tool filter. A few wrap programs that must be installed (Chrome for the browser and PDF reports, linters and scanners).
- Model Context Protocol (MCP): Native support for MCP servers (stdio, SSE, HTTP) to extend agent capabilities dynamically.
Quick Navigation
Getting Started
- User Guide โ Where to start: configuration, CLI, automation, observability and the fleet toolkit
- CLI Reference โ
goclaw setup, gateway runtime, and every subcommand
- Configuration โ Comprehensive configuration guide
- Webhook Routes โ
webhooks: in config.yaml: which agent or SOP an outside system's POST to /goclaw/hook/<type>/<key> reaches
- Public Ingress โ Exposing the gateway through ngrok, Cloudflare, or a reverse proxy
- Gateway Endpoints โ WebSocket server and REST APIs
Multi-Agent & Routing
Channels
- Overview โ All supported messaging platforms
- Telegram โ Long polling by default, so no public URL is needed
- Discord โ Bot token, guild overrides, threads and embeds; no public URL needed
- Microsoft Teams โ Azure Bot registration and Teams packaging
- Facebook Messenger โ Webhooks, page tokens, pairing
- Enterprise App API โ Your own mobile app / intranet over REST, SSE and WebSocket
- Pairing โ Access control and identity linking
Automation
- Automation Overview โ How scheduled and event-driven work fits together
- Cron Jobs โ Scheduled SOP runs and built-in commands
- Standard Operating Procedures (SOPs) โ Autonomous multi-step workflows
- GitLab Webhook Integration โ Receiving push/pipeline/MR events from GitLab. Set it up by asking the agent (
gitlab_hook), with the goclaw gitlab hook wizard, or by hand
- SonarQube Quality Gates That Run a SOP โ SonarQube's webhook after each analysis runs a SOP when the quality gate fails (or always). Set it up by asking the agent (
sonarqube_hook) or by hand
- Zabbix Problems That Run a SOP โ a Zabbix action calls the gateway when a problem starts on the host groups you choose, and runs a SOP. Set it up by asking the agent (
zabbix_alert) or by hand
- Uptrace Monitors That Run a SOP โ an Uptrace monitor's webhook channel calls the gateway when an alert opens, and runs a SOP. Set it up by asking the agent (
uptrace_monitor) or by hand
- Wazuh Alerts That Run a SOP โ a monitor in the Wazuh indexer calls the gateway with the Wazuh alerts it finds, and runs a SOP. Set it up by asking the agent (
wazuh_alert) or by hand
- Grafana Alert Rules That Run a SOP โ a Grafana alert rule calls the gateway when it fires, and runs a SOP. Set it up by asking the agent (
grafana_alert_rule) or by hand
- Graylog Alerts That Run a SOP โ Graylog alert webhook: Graylog calls the gateway's hook (
/goclaw/hook/graylog/<key>) and each alert runs a SOP. Set it up by asking the agent, or by hand on the Webhooks page
Tools & Memory
Observability & Monitoring
- Observability Overview โ Multi-source monitoring, incident workflow, config
- SRE Tools โ Grafana, Graylog (log search, and
allow_write for alerts that run a SOP), Uptrace, Zabbix, Wazuh
- NetBox IPAM/DCIM โ IP, rack, server, VLAN, VM management
- Metrics Store โ Token and runtime metrics retention
- Fleet Toolkit โ Status, logs, reports, upgrades and restarts across many agents over SSH
Security
API Reference
Vision
Architecture
flowchart TD
subgraph CH["Channels"]
C1["Telegram"]
C2["Discord"]
C3["MS Teams"]
C4["Messenger"]
C5["App API / Web"]
end
GW["<b>AI Gateway</b><br/>REST ยท WebSocket ยท SSE ยท Webhooks"]
ROUTER["<b>Agent Router</b><br/>channel / role / tenant โ agent"]
subgraph ENGINE["Execution Engine"]
direction LR
MA["<b>Multi-Agent Orchestrator</b><br/>Isolated contexts ยท Subagents ยท SOPs"]
TOOLS["<b>Tools & MCP</b><br/>Built-in tools ยท RAG-filtered ยท Security"]
end
subgraph STORE["Persistence & Memory"]
direction LR
MEM["<b>Memory & Sessions</b><br/>SQLite (gc_state) ยท Embeddings ยท Replay"]
KG["<b>Knowledge Graph</b><br/>SQLite (kg) ยท Entity Relations"]
end
CH --> GW
GW --> ROUTER
ROUTER --> MA
ROUTER --> TOOLS
MA <--> TOOLS
MA --> STORE
State Directory
Default: ~/.goclaw/ (override with GOCLAW_STATE_DIR)
~/.goclaw/
โโโ config.yaml # Unified configuration (hot-reloaded)
โโโ gc_state.sqlite # Sessions, long-term memory, SOPs, cron jobs
โโโ kg.sqlite # Knowledge graph store
โโโ workspace/ # IDENTITY.md, USER.md, Memory.md, memory/
โโโ agents/ # Isolated agent environments
โ โโโ <agent_id>/
โ โโโ workspace/ # Agent-scoped files and memory
โโโ memory/personal/ # Per-user private memory (user_<id>.md)
โโโ credentials/ # AES-256 encrypted secrets and channel credentials
โโโ skills/ # Global skills
โโโ plugins/ # Installed plugins (subagents, instructions, skills, hooks, MCP servers)
โโโ media/ # Uploaded and generated media
โโโ canvas/ # Diagram and screenshot artifacts
โโโ cache/ # Transient caches
โโโ traces/archive/ # Nightly trace dumps (JSONL.gz)
โโโ logs/ # System and agent logs