by aspasskiy
Lightweight self-hosted AI agent. Open-source OpenClaw alternative in Go.
# Add to your Claude Code skills
git clone https://github.com/aspasskiy/GoGogot
A lightweight, extensible, and secure open-source AI agent that lives on your server. It runs shell commands, edits files, browses the web, manages persistent memory, and schedules tasks — a self-hosted alternative to OpenClaw (Claude Code) in ~5,500 lines of core Go.
docker run commandBackend, Transport, Tool) make it trivial to add providers, transports, or custom toolsTELEGRAM_BOT_TOKEN by creating a new bot via @BotFather on Telegram.No comments yet. Be the first to share your thoughts!
TELEGRAM_OWNER_IDNo git clone needed — the image is published on Docker Hub:
docker run -d --restart unless-stopped \
--name gogogot \
-e TELEGRAM_BOT_TOKEN=... \
-e TELEGRAM_OWNER_ID=... \
-e GOGOGOT_PROVIDER=anthropic \
-e ANTHROPIC_API_KEY=... \
-e GOGOGOT_MODEL=claude-sonnet-4-6 \
-v ./data:/data \
-v ./work:/work \
octagonlab/gogogot:latest
The image supports linux/amd64 and linux/arm64 and ships with a full Ubuntu environment (bash, git, Python, Node.js, ripgrep, sqlite, postgresql-client, and more).
curl -O https://raw.githubusercontent.com/aspasskiy/GoGogot/main/deploy/docker-compose.yml
# Create .env with your keys
cat > .env <<EOF
TELEGRAM_BOT_TOKEN=...
TELEGRAM_OWNER_ID=...
GOGOGOT_PROVIDER=anthropic
ANTHROPIC_API_KEY=...
GOGOGOT_MODEL=claude-sonnet-4-6
EOF
docker compose up -d
Requires Go 1.25+:
make generate # fetch OpenRouter model catalog
go run ./cmd
Set GOGOGOT_PROVIDER, GOGOGOT_MODEL, and the corresponding API key. The agent will not start without all three.
| Provider | GOGOGOT_PROVIDER | API key env | Example GOGOGOT_MODEL |
|---|---|---|---|
| Anthropic | anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-6, claude-opus-4-6, claude-haiku-4-5 |
| OpenAI | openai | OPENAI_API_KEY | gpt-4o, gpt-4.1, gpt-5.4, o3, o4-mini |
| OpenRouter | openrouter | OPENROUTER_API_KEY | deepseek/deepseek-v3.2, google/gemini-3-flash-preview |
Model metadata (context window, vision support, pricing) is stored in JSON catalogs under llm/catalog/ — just edit the JSON to add or update models.
With OpenRouter you can also pass any slug directly, e.g. GOGOGOT_MODEL=moonshotai/kimi-k2.5.
For convenience, short aliases are supported as GOGOGOT_MODEL values:
| Alias | Resolves to |
|---|---|
| claude | claude-sonnet-4-6 |
| openai | openai/gpt-5-nano |
| deepseek | deepseek/deepseek-v3.2 |
| gemini | google/gemini-3-pro-preview |
| llama | meta-llama/llama-4-maverick |
| qwen | qwen/qwen3.5-397b-a17b |
| minimax | minimax/minimax-m2.5 |
| kimi | moonshotai/kimi-k2.5 |
Browse all available models: Anthropic | OpenAI | OpenRouter | Benchmarks: PinchBench
27 built-in tools across 10 categories:
soul.md / user.md, auto-evolvingLOG_LEVEL=debug)The entire agent is a for loop. Call the LLM, execute tool calls, feed results back, repeat:
func (a *Agent) Run(ctx context.Context, input []ContentBlock) error {
a.messages = append(a.messages, userMessage(input))
for {
resp, err := a.llm.Call(ctx, a.messages, a.tools)
if err != nil {
return err
}
a.messages = append(a.messages, resp)
if len(resp.ToolCalls) == 0 {
break
}
results := a.executeTools(resp.ToolCalls)
a.messages = append(a.messages, results)
}
return nil
}
Everything else — memory, scheduling, compaction, identity — is just tools the LLM can call inside this loop.
GoGogot is designed to be extended without frameworks or plugin registries:
Backend interface method)Channel + Replier — 3 + 6 methods)llm/catalog/MIT