# Build your own open-source Grok Bot, here’s how
<!--
ref: @content/youtube/david-ondrej/2026-11-15-build-your-own-open-source-grok-bot-here-s-how
version: 1
updated_at: 2026-11-22T13:20:19.348Z
-->
**[Watch on YouTube](https://www.youtube.com/watch?v=7-Tj5qaOUbc)**
*Synthesized from David Ondrej, 2026-11-15.*
David Ondrej, a developer who has done AI-assisted coding since GPT-4 came out in 2023 and who builds his own agentic development environment (Cloud Room), records himself building a self-hosted, open-source copy of Grokbot in roughly 1.5 hours.
## Core Thesis
David Ondrej argues that a closed product like Grokbot can be reverse-engineered and rebuilt as open source in a single sitting. You ask the product to describe its own internals, then hand that description to a fleet of parallel local and cloud coding agents. The bottleneck is no longer writing code. It is human judgment: knowing what to build, making architectural decisions, keeping agents concise and practical, and shipping to production quickly. He says the next step past running agents yourself is "agent loops," recurring automated agents that take the human out of routine work.
## Key Insights
- **Reverse engineering by asking.** David opened a fresh Grokbot chat ("technical explainer") and asked in plain English about its virtual machine, memory, procedures and inter-bot communication. It described its whole setup, and he pasted those answers straight into his agents as specs.
- **Grokbot's disclosed environment:** one shared Linux VM for all bots, running Debian 13 with kernel 6.12. It has 8 virtual Intel Xeon CPUs, 15 GB RAM (only about 2 GB free), a 128 GB disk and no GPU, and it runs in a container. A supervisor starts each bot, restarts it when it crashes and collects its logs. The pieces David chose to replicate are a planner, a message bus, state, guardrails and observability.
- **Why Grokbot succeeds:** it is a guided, self-healing experience where bots don't hang or crash. Earlier in the year, Claude Bot (renamed Open Claw) and Hermes agent made you revive things yourself.
- **Harness-agnostic design.** The goal was a backend that can run Claude Code CLI, Codex CLI, Grok build, Hermes, Pi or anything else under the hood. The first version uses Claude Code CLI on his existing subscription. David uses the official CLI as the loop instead of building his own interface on Anthropic models, because of Anthropic's terms of service.
- **Language choice:** the backend was moved to Rust because it is fast and memory-safe, compiles to small binaries, and agents like writing it. The final repo was about 67% Rust.
- **Model tradeoffs (as David uses them):** Opus 5.5 is his default because it is extremely fast and light on tokens. Fable is smarter but uses up limits quickly, and he had already hit 100% of his Fable usage. After thousands of lines of output across five agents, Opus had moved his subscription usage by about 1%. He found Fable 5.2 refusing basic recruiting work over EU rules. He argues that a less restricted model, even if weaker (Grok 4.7, or open-weight models like DeepSeek, GLM or Kimi), is often more useful for everyday tasks, though not for security or architecture work.
- **Reasoning effort is a dial you adjust per task.** David switches between high, extra-high and max depending on difficulty. He says the gap between each level is large, and higher levels run much longer.
- **Agents lack practicality.** Left alone, agents will spend 50 minutes on a 5-minute task and pile tests and CI onto an internal tool for four users. One backend agent wrote 3,000+ lines and another 4,000+. He sends interrupts like "keep it minimal" mid-task.
- **Junk ratio.** David proposes measuring slop as architecture decision records (ADRs) relative to lines of code. Code shipped without recorded human decisions leaves agents with no direction.
- **Agents are weak at creative naming.** The name brainstorm took several rounds before landing on "Superbot," after checking GitHub for popular repos with that name. Naming is where the human should lead.
- **Multi-agent parallelism:** cloud agents run in isolated Linux sandboxes, so 5–50 of them can work at once without overwriting each other's files or overheating a laptop that is recording 4K. A Mac-access permission lets cloud agents act on the local MacBook, for example copying a generated password to the clipboard so it never shows up in chat history.
- **Agents beyond code.** Separate agents did UI redesigns, SVG bot-avatar sets and README visuals. David says he uses agents for hiring, marketing, thumbnails and training as well.
- **Productivity claim:** his output went from about 10 meaningful commits a week to about 1.3 thousand a week (around 130x), with 200+ a day on his public GitHub. He has logged 2,500+ hours of AI coding over four years. Cloud Room reached about 100k in roughly a month.
- **Agent loops are the next era.** By David's framing, 2023–2026 was chatbots, 2027 is agents, and after that comes agent loops. He runs 41 loops, and argues everyone should have 5 or more running.
## Actionable Takeaways
1. **Start with an `agents.md` at the repo root** that tells agents to always answer briefly and in plain English. Keep correcting verbose replies ("rewrite in two short sentences").
2. **Skip long planning and go straight to parallel agents with separate roles:** a researcher to document how the target works as modular markdown files in a root-level folder, a UI agent working from screenshots, a GitHub agent, and a backend developer. Rename each thread after its role so you always know what each one is doing.
3. **Prototype the UI from a screenshot of the target product,** run it as a local server, and compare it side by side with the original.
4. **Use the GitHub CLI** to create a public MIT-licensed repo with a proper `.gitignore`. Have the agent leave notes wherever a rename will be needed later, to avoid trademark trouble.
5. **Ask the closed product about its own internals,** wrap the answer in XML tags, and have an agent save it as compressed modular markdown plus a README architecture section. Give the architecture image to the backend agent with "make it exactly like this."
6. **Deploy early.** David's setup was a VPS running Ubuntu 24 or 26 (KVM 2 tier), with SSH-key access given to the agent. Have the agent harden the server (firewall, common mistakes), set up auto-deploy so anything merged to master ships to the VPS, and add a password to the UI near the end.
7. **Interrupt runaway agents** with a queued message like "don't overthink, simple and minimal" and lower the reasoning effort. Don't act as a proxy between agents: tell them to read each other's threads and pass messages directly through the CLI.
8. **Before any next step, have each agent rebase onto the latest main and re-read the other threads,** because answers go stale within minutes when many agents are merging.
9. **For medium or large changes, run a cross-model review.** David's `/gpt-review` skill starts a subagent that uses Codex CLI as reviewer. A Gemini review exists but is overkill for small changes.
10. **For design work, ask for four options at a time** (his "designs" skill renders them inside the editor), pick one, then ask for four variants of that one. This is how he settled on the Superbot branding watermark, the bot-creation UI and the robot avatar style.
11. **Add features the original lacks.** David added a thin, neutral-gray model selector above the chat input that shows exact model names, plus per-bot default settings.
12. **Create a maintenance agent loop in plain English.** His took one paragraph and 1 minute 23 seconds: cloud-only, Opus 5.5 at high effort, running 3 times a day to check stability, logs and disk space and fix obvious problems, with an immediate test run. Tune it later in plain English ("run 40% less often," "be more concise"). He added a daily cybersecurity-guard agent for the VPS the same way.
13. **Reuse prompt fragments.** David keeps about 30 snippets for prompts he types often ("summarize this thread," "what's left to do?"), and archives finished threads with a one-command self-archive.
## Notable Quotes
> "You don't want to be at the stage planning forever." — David Ondrej
> "This is actually what agents are not very good at it, brain storm of unique names and creative things." — David Ondrej
> "They will happily spend 50 minutes on a task that could be completed in 5 minutes." — David Ondrej
> "You are wasting your time. All of you there must be five or more cycles that are doing some work." — David Ondrej
> "Agent cycles, this is the future." — David Ondrej
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*