Skip to content

Personal AI agent · self-hosted · MIT

The whole agentis one for loop.

An AI agent that lives on your server and answers only you. It runs commands, edits files, searches the web, remembers, and schedules its own jobs — on whichever model you pick. Talk to it in your terminal or in Telegram, or plug in any other interface — Discord, Slack, email — and let the agent write the plugin itself.

Read all 11,478 lines
Lines of Go
11,478*
Tools
37
RAM at idle
~10 MB
Per session
~$0.01

* Counted from the repository at v0.1.1 on 2026-10-28, tests excluded — go and re-count them.

In practice

One sentence in. A file back.

It has a shell, a filesystem, four web tools and a cron scheduler. Anything you could do on that box over SSH, you can ask for in one sentence instead.

you

grab the sales csv from this link, total it by region, send me a pdf

  1. 01

    Downloading it first — I want to see the columns before I assume anything.

    web_downloadurl=…/q3-sales.csv dest=/work/q3-sales.csv840ms

    saved 2.4 MB → /work/q3-sales.csv

  2. 02

    bashhead -3 /work/q3-sales.csv11ms

    order_id,date,region,sku,qty,revenue 88301,2026-07-01,EMEA,…

  3. 03

    Six columns, one row per order. pandas can group this in a few lines.

    write_filepath=/work/report.py6ms

    wrote 34 lines

  4. 04

    bashpython3 /work/report.py2310ms

    WEST 1.82M +18.1% EMEA 0.94M +0.3% APAC 0.61M -4.7% wrote /work/q3-by-region.pdf — 4 pages

  5. 05

    send_filepath=/work/q3-by-region.pdf390ms

    delivered to chat

  6. 06

    Q3 by region, attached. West is up 18% on Q2, EMEA is flat, APAC is the only region down.

    no tool calls — break

6 iterations3.56s · 5 tool calls · done

An example task, in the order the loop runs it — the tools are the real ones, the data and timings are illustrative. python3 and pandas are in the published image on purpose, so the shell has something to work with.

Seven more, one line each

  • every morning at 9, send me the 5 biggest AI stories, two sentences each
  • here are 12 screenshots — merge them into one pdf and send it back
  • check what Linear, Height and Shortcut charge per seat, put it in a table
  • check disk and memory hourly, ping me if anything goes over 80%
  • pull every email and phone number off this page into a csv
  • every friday at 6pm, summarise this week's commits and send the changelog
  • connect yourself to discord — the token is in DISCORD_BOT_TOKEN

Interfaces

Plug in any interface.

The terminal is built in and Telegram ships as a plugin. Discord, Slack, email or a web chat is a plugin you add — or one the agent writes for itself, with no rebuild. A plugin is a folder in /data/skills: a channel.json and a small program that only moves messages.

/data/skills/telegram/channel.json
{
  "command": ["python3", "bridge.py"],
  "requires_env": ["TELEGRAM_BOT_TOKEN"],
  "owner_env": "TELEGRAM_OWNER_ID",
  "format": "telegram_html",
  "max_message_len": 4000,
  "can_edit": true,
  "buttons": true
}
next to it
  • bridge.pytalks to Telegram, and to the core in JSON lines over stdin/stdout
  • SKILL.mdhow the plugin works, written for the agent
who does what
  • The plugin

    • connects to the platform
    • passes your messages in and the replies out
  • The core

    • drops every message that is not from you
    • draws the live status, the plan and the answer the same way everywhere
    • splits long messages, renders buttons, runs /new, /stop, /history
    • restarts a plugin that exits

Ships with two: the terminal, built in, and Telegram, as a plugin. Anything else you add or it writes.

Ask it to connect itself.
Say “connect yourself to Discord”. It follows the bundled add-channel skill, writes the plugin, and starts it with channel_restart — no rebuild. The one thing you do is put the bot token and your user ID in the container’s environment (docker run -e …); it never asks for secrets in the chat.
Several at once.
Start a job in the terminal and get its scheduled results in Telegram. Every plugin that is running gets your alerts and cron results, and every one of them looks and behaves the same, because the core draws them all.
Upgrading changes nothing.
The old Telegram docker run with TELEGRAM_BOT_TOKEN and TELEGRAM_OWNER_ID works unchanged. Telegram just moved out of the Go code into a plugin in /data/skills/telegram — Python, standard library only — that you, or the agent, can read and patch.

internal/core/agent

Everything else is just a tool call.

Agent.Run calls the model, runs the tool calls it asked for, feeds the results back, and repeats until it stops asking. Memory, scheduling and identity are not subsystems — they are tools it calls from inside that loop.

agent/run.goread the real one
func (a *Agent) Run(ctx, in RunInput) error {
    msgs := append(in.Messages, userTurn(in.Blocks))

    for {
        resp, err := a.llm.Call(ctx, msgs, a.tools)
        if err != nil {
            return err
        }
        msgs = append(msgs, resp)

        if len(resp.ToolCalls) == 0 {
            break // it stopped asking
        }

        results := a.executeTools(ctx, resp.ToolCalls)
        msgs = append(msgs, results)
    }
    return nil
}

Shortened for the page — hooks, event emission and error paths removed. The control flow is exactly the real one.

every name a.tools answers to
  • Shell & files

    bashread_filewrite_fileedit_filelist_filesfile_searchsystem_info

  • Web

    web_searchweb_fetchweb_requestweb_download

  • Memory

    memory_listmemory_readmemory_writememory_delete

  • Skills

    skill_listskill_readskill_createskill_updateskill_delete

  • Identity

    soul_readsoul_writeuser_readuser_write

  • Scheduling

    schedule_addschedule_listschedule_pauseschedule_remove

  • Conversation

    send_messagesend_fileask_userreport_statusrecall

  • Plugins

    channel_listchannel_restartchannel_logs

  • Planning

    task_plan

A new tool is Go code and a rebuild. A new interface needs no Go — it is a plugin.

And all of it lands in a folder you mounted.

Conversations, memory, skills and the two identity files are plain files in GOGOGOT_DATA_DIR. Every one of them is a file you can open, no account is holding your history, and there is nothing to export — you already have it.

$ tree ./data

  • soul.mdwho it is — it rewrites this itself
  • user.mdwhat it has worked out about you
  • memory/
  • deploys.mdplain markdown. cat it.
  • skills/
  • weekly-changelog/SKILL.mda procedure it saved and re-runs
  • telegram/the Telegram plugin — it can read and patch it
  • episodes/
  • 2026-08-26/one conversation per json + jsonl pair
  • schedules.jsonits own cron entries

Pick a brain

Three env vars decide the brain.

Set GOGOGOT_PROVIDER, GOGOGOT_MODEL and the matching API key, restart the container. You pay your model provider and whoever rents you the box — there are no seats, and there is no GoGogot account.

~$0.01

a session on DeepSeek V4 Flash, at roughly 50K tokens in and 10K out. Frontier models stay well under a dollar.

ModelContextPer sessionBenchNotes
qwen/qwen3.7-maxOpenRouter1M~$0.1292.5%Top bench score
claude-opus-4-8Anthropic1M~$0.5090.5%Best reasoning
nvidia/nemotron-3-ultra-550b-a55bOpenRouter262K~$0.0589.9%Open-weights
xiaomi/mimo-v2.5OpenRouter1M~$0.0489.7%Near-top score, multimodal
x-ai/grok-build-0.1OpenRouter256K~$0.0788.9%Trained for agentic coding
gpt-5.6-lunaOpenAI1M~$0.0288.7%Top-10 score, OpenAI direct
qwen/qwen3.6-flashOpenRouter1M~$0.0288.1%Fast, near-top score
deepseek/deepseek-v4-flashOpenRouter· recommended1M~$0.0181.7%Best cost / quality
claude-sonnet-5-5Anthropic1M~$0.20—GoGogot default

All 9 work out of the box.

Bench is the PinchBench agent success rate — measured with a different agent harness, so read it as a ranking of the models, not of GoGogot; — means the model is not on the leaderboard. Cost assumes a session of roughly 50K tokens in and 10K out, at list prices.

For scale

Same job. 9 dependencies, not 800+.

Five measurements against the two obvious alternatives. The bars are linear, so their length and the number beside them always agree — which is why ours are slivers.

Lines of code

GoGogot
11.5K
OpenClaw
430K
Nanobot
4K

Dependencies

GoGogot
9
OpenClaw
800+
Nanobot
30+

Install size

GoGogot
206 MB
OpenClaw
1 GB
Nanobot
150 MB

RAM at idle

GoGogot
10 MB
OpenClaw
450 MB
Nanobot
100 MB

Minimum host

GoGogot
anything with Linux
OpenClaw
2 GB RAM, 2 CPU
Nanobot
512 MB RAM

GoGogot's line and dependency counts come from the repository at v0.1.1; its install size is the compressed v0.1.1 image on Docker Hub, of which the Go binary is about 15 MB. The OpenClaw and Nanobot figures are the author's own measurements of a local install — read them as indicative rather than like-for-like, and open a PR if yours differ.

GoGogot vs OpenClaw, in full

What it isn't

Where it will let you down.

You are about to give a language model a shell on a box you care about. Here is the part of the pitch nobody puts on a landing page.

It opens no inbound ports.

No listener, no webhook, no EXPOSE. The Telegram plugin long-polls, the terminal is stdin, and the model is an API call. Everything is outbound — unless you ask it to write a plugin that listens.

Now the rest of it

It has a real shell.
The bash tool runs actual commands as root inside the container, and ./work is a directory on your host that you mounted into it. Docker is the only boundary. Mount read-only what you would not want rewritten, and do not run it on the host that matters.
One owner. No multi-user.
Every plugin names one owner — for Telegram, TELEGRAM_OWNER_ID — and the core drops every message from anyone else, whatever the plugin’s own code does. That is the whole auth model, and it is deliberate — but there is no team mode and no permissions.
Not an editor copilot.
It works in the directory you mounted into its container, not in the repository open in your editor. There is no web UI and no editor extension — you talk to it through the terminal or a plugin.
Telegram is a third party.
Your messages pass through their servers. The terminal does not, but it only exists while you are attached. What Telegram buys is push notifications, file transfer both ways and a mobile app you did not have to build — and its plugin is a short Python file in /data/skills/telegram, so you can read exactly what it sends.
A plugin is code it can rewrite.
The agent can write a new plugin or patch the one you are talking through. A bundled plugin that crashes three times in a row right after start is put back to its stock files. One that runs but misbehaves is not caught, and plugins it wrote itself are never rolled back — so ask it to keep a backup, and test after every change.
Recall is not a vector store.
There are no embeddings. recall hands the model up to 50 past-chat summaries and asks which are relevant. Good enough for a personal agent, not a knowledge base.
The model is not self-hosted.
Everything else runs on your box; the reasoning does not. You still send prompts to Anthropic, OpenAI or OpenRouter, and that API is the one dependency you cannot remove.
The binary is 15 MB. The image is not.
The Go binary is ~15 MB with no runtime. The published image is ~206 MB compressed because it deliberately ships a working Ubuntu userland — python, node, ripgrep, psql, jq — so the shell tool has something to work with. Build a slim one if you would rather. And the ~10 MB at idle is the Go process: the Telegram plugin runs beside it as its own python3 process.

Run it

One container. A handful of env vars.

To try it, three values — a provider, a model and its API key — and it answers in your terminal. To leave it running on a server, add a Telegram bot token and your Telegram user ID.

linux/amd64linux/arm64no GPUruns on a $4 VPS

docker run -it --rm \
  -e GOGOGOT_PROVIDER=openrouter \
  -e OPENROUTER_API_KEY=<key> \
  -e GOGOGOT_MODEL=deepseek/deepseek-v4-flash \
  -v ./data:/data \
  -v ./work:/work \
  octagonlab/gogogot:latest

Type and press Enter. /attach <path> sends a file, Ctrl+C stops the current task, Ctrl+D exits. Logs go to data/gogogot.log, because the chat owns the screen.

GOGOGOT_PROVIDER
One of anthropic, openai or openrouter.
OPENROUTER_API_KEY
Or ANTHROPIC_API_KEY / OPENAI_API_KEY, to match. Keys at openrouter.ai/keys.
GOGOGOT_MODEL
On openrouter, any vendor/model slug; on anthropic or openai, a model GoGogot knows (a wrong one fails at start and lists them). Or pick from the table above.
TELEGRAM_BOT_TOKEN
Make a bot with @BotFather. Takes about thirty seconds.
TELEGRAM_OWNER_ID
Your own numeric ID, from @userinfobot. It only answers this one. Trying it in the terminal needs neither of these two.

Optional

GOGOGOT_TRANSPORT
auto by default — the terminal when there is a TTY, Telegram when its token is set; or list them: terminal,telegram
BRAVE_API_KEY
turns on web_search — the other three web tools work without it
GOGOGOT_DATA_DIR
where soul.md, memory, skills and episodes live — /data inside the published image
GOGOGOT_LLM_TIMEOUT
per-call timeout, default 3m
TZ
fallback timezone for the scheduler — it asks you for yours and keeps it in user.md, so this only matters until then
DISCORD_BOT_TOKEN, …
whatever a plugin you add asks for — its token and your user ID go in the container env, never into the chat