Agentic Engineering in Grok Bot
In a Nutshell
Grokbot automates open source maintenance across multiple repositories using a hierarchical agent system: individual triage crewmates handle issues and PRs per repository, while First Mate orchestrates everything through a single chat interface, managing 2,000+ items monthly with auto-merging of compliant PRs and escalation of ambiguous decisions. The system maintains repository-specific vision.md files for product boundaries, uses a SQLite database for task persistence, and employs specialized crewmates like Coonbot (distilled from public content) and Cursor Cloud Agent for coding tasks, with First Mate continuously updating agent profiles based on captain feedback to reduce noise and improve efficiency over time.
These notes were generated by AI and may contain inaccuracies.
The speaker uses Grokbot to maintain open source projects that receive significant traffic. Over the last month, Grokbot processed over 2,000 items split between issues and PRs. Without this setup, maintaining the projects would not be feasible.
In a smaller repository, a PR raised by a contributor last week received comments from "Kun's first mate" providing feedback on required changes. Every issue and PR receives similar comments from Grokbot. If the PR is not ready, Grokbot provides specific feedback on required changes. If the PR aligns with repository rules, First Mate merges it automatically. Ambiguous product decisions escalate to the speaker through Grokbot.
Each open source repository has its own bot. The Treehouse bot handles triaging issues and PRs with a daily triage routine. The First Mate repository uses more frequent triage every four hours due to higher traffic. Each bot has different routines based on repository popularity. The speaker never interacts directly with individual repo bots, only communicating through First Mate.
First Mate is the main orchestrator agent that manages all other agents. The speaker only talks to First Mate, which surfaces problems from all repositories in a single chat. First Mate brings issues requiring attention, such as CI pipeline failures on the First Mate repository. The speaker can handle all repository problems through this single interface.
First Mate builds on the open source First Mate project, which has thousands of forks and active contributors. The project has pushed furthest on the chief of staff paradigm. First Mate uses a local SQLite database for task management with strong persistence that survives agent resets. This provides linear or Jira-like functionality for complex projects.
The First Mate charter contains instructions for managing crewmates. When First Mate notices crewmates making mistakes or working inefficiently, it updates their behavior to prevent repeated errors. Over two months, First Mate made concrete improvements to inefficiencies and noise. First Mate also includes built-in engineering workflows like adversarial review and planning.
The speaker can create new triage crewmates for new repositories through First Mate. The "headless" repository is an agent skill for setting up headless machines with over 100 stars. Once created, the headless crewmate begins processing issues and PRs with a routine for first-pass triage.
Every repository has a vision.md file that defines project principles, boundaries, desired changes, and unwanted changes. Triage crewmates use this file to determine which PRs are safe to merge, beyond good engineering practices. The headless repository lacks this file, requiring careful review of PRs.
A skill pushes the speaker with hypothetical product changes and tests boundaries to determine acceptable versus unacceptable changes. After several rounds, the skill helps write the vision document.
Headless triage bot sends messages to First Mate, which relays important messages to the speaker. First Mate filters out messages not requiring attention, preventing unnecessary interruptions. This inter-agent communication is useful despite potential token usage.
First Mate identified five real bugs among open issues, including an SSH setting issue on Windows and a four-line fix PR #25. The speaker requires "no mistakes" for PR submissions to ensure minimum quality. PR #25 had already undergone live validation and rigorous internal steps before submission.
Without a vision.md file, the bot flagged a behavior change as requiring captain decision. The speaker reviewed the PR, confirmed it was correcting string matching and documentation, then instructed to merge PR 25 and allow similar changes going forward.
First Mate updates agent profiles based on decisions, such as noting that Gravite is not needed for the headless repository. This smooths out rough edges and improves crewmate efficiency over time.
First Mate reads from the database to identify PRs waiting for decisions without messaging back and forth between crewmates. 88 PRs were waiting for decisions. The speaker uses the shortcut "aoy" (ask one at a time) to handle decisions sequentially.
A PR runs checks on Ubuntu and an additional OS version. The speaker questioned why the PR isn't blocked when problems are known, since migration will soon be required. After discussion, First Mate confirmed the PR passes on the new OS, leading to a decision to migrate the CI pipeline.
If the speaker has a slightly different idea for PR implementation, the crew performs the modifications rather than asking contributors. For major reworks, feedback goes back to contributors. First Mate uses the Cursor Cloud Agent for coding work through sandboxes, preventing the Grokbot computer from becoming overloaded.
The First Mate CI was hitting limits repeatedly. The speaker asked Coonbot how Kun would approach this problem. Coonbot suggested a three-part plan: split tests across parallel jobs, warn when jobs pass 20 minutes, and speed up lint. The speaker approved implementing the Kun plan.
Coonbot contains all public knowledge from tweets, blog posts, and YouTube videos distilled into a bot. The source is a repository containing opinions.md (distilled opinions), tools used, and assets content including all video transcripts. The skill generates this file daily based on public statements.
The Distill Anyone bot can create bots from anyone with public content. The speaker created bots for Mark Zuckerberg, Elon Musk, and Sam Altman to discuss AI topics. The distillation process creates voice profiles matching the person's speaking style. The bot distilled Jensen Huang from 22 talks, interviews, and 21 posts, confirming identity from Wikipedia before saving.
When asked about Chinese models, the Jensen bot responded starting with facts, similar to Jensen's speaking style. The speaker shares links to all mentioned Grokbot configurations for free import.
Keep Kun Chen in your library
Save the videos and channels worth coming back to, and find them again in one place.





