GrokTown

Gastown-Style Multi-Agent Coding System powered by xAI Grok

A multi-agent orchestration system for software development, inspired by Steve Yegge's Gastownarrow-up-right, but powered by xAI's Grok instead of Claude Code.

Twitter Account: https://x.com/GrokTownXarrow-up-right


What Is This?

GrokTown is a pure coding agent orchestration system that implements Gastown's architecture:

Core Concepts from Gastown

  1. The Town - Your HQ where all projects live

  2. Rigs - Individual projects (git repos) under management

  3. Agents - AI workers with persistent identities

  4. Beads - Git-backed persistent state for everything

  5. GUPP Protocol - "If there's work on your hook, you run it"

  6. Molecules - Multi-step workflows that survive crashes

  7. Crews - Workspaces for teams/users

GrokTown vs Gastown

Feature
Gastown
GrokTown

AI Backend

Claude Code

xAI Grok

Language

Go

Python

Primary Use

Code orchestration

Code orchestration

X Integration

No

Yes (Grok's superpower!)

Open Source

Yes

Yes


Architecture

Agent Roles

Mayor 🎩

  • Main orchestrator for the project

  • Breaks down high-level goals into issues

  • Reviews completed work

  • Plans architecture

Coding Agent 👨‍💻

  • Implements features

  • Fixes bugs

  • Writes tests

  • Refactors code

Witness 👁️

  • Maintains audit trail

  • Tracks all work done

  • Generates reports

  • Ensures compliance


Quick Start

Prerequisites

Installation

Run Demo

This will:

  1. Create a convoy of issues for building a web server

  2. Assign the first issue to a coding agent

  3. Watch the agent implement it

  4. Generate a project report


Usage

Basic Commands

Working with GrokTown

1. Create a Project (Rig)

This creates:

  • Project directory structure

  • Agent beads

  • README and scaffolding

2. Configure the Rig

Edit groktown_config.yaml:

3. Start the System

Agents will:

  • Check their hooks for pending work

  • Execute tasks autonomously

  • Store all work in git (Beads)

  • Continue until stopped

4. Create Issues

GrokTown uses GitHub-style issues. You can:

Via Mayor (AI-generated):

Manually:

5. Assign to Agent

6. Monitor Progress


GUPP Protocol

Grok Unified Perpetual Protocol

The core principle: If there is work on your hook, YOU MUST RUN IT.

How It Works

  1. Hooks - Each agent has a task queue (hook)

  2. Check - Agents continuously check their hooks

  3. Execute - If work exists, agent must process it

  4. Persist - All state stored in git

  5. Resume - Crashed agents restart and continue

Example Flow

This ensures:

  • No forgotten tasks

  • Crash resilience

  • Full audit trail

  • Predictable behavior


File Structure


Configuration

groktown_config.yaml


Grok Features

Real-Time X Context

Grok's unique advantage: access to real-time X (Twitter) data!

Use cases:

  • Research best practices

  • Find solutions to problems

  • Stay updated on tech trends

  • Monitor sentiment about technologies

Code Generation

Grok excels at code generation:


Advanced Usage

Custom Workflows (Molecules)

Create multi-step workflows:

Custom Agent Types

Extend the base agent class:


Comparison with Original Gastown

Similarities ✅

  • Multi-agent orchestration

  • Persistent state (Beads)

  • GUPP protocol

  • Git-backed storage

  • Workflow molecules

  • Rig/Crew structure

Differences 🔄

Feature
Gastown
GrokTown

AI

Claude Code

xAI Grok

Language

Go

Python

CLI Tool

gt command

Python scripts

Integration

Deep Claude integration

Generic LLM calls

X Context

No

Yes (Grok feature)

Maturity

Production-ready

Proof of concept


Roadmap

Phase 1: Foundation ✅

  • [x] Core agent framework

  • [x] GUPP protocol

  • [x] Bead storage system

  • [x] Mayor, Coder, Witness agents

  • [x] Issue management

Phase 2: Enhancement

  • [ ] Polecat agents (testing)

  • [ ] Refinery agent (data processing)

  • [ ] Deacon agent (system health)

  • [ ] Advanced molecule workflows

  • [ ] Better git integration

Phase 3: Integration

  • [ ] GitHub integration

  • [ ] VS Code extension

  • [ ] Web dashboard

  • [ ] Slack/Discord notifications

  • [ ] CI/CD integration

Phase 4: Intelligence

  • [ ] Learning from past work

  • [ ] Code quality metrics

  • [ ] Performance optimization

  • [ ] Team collaboration features


Why GrokTown?

Advantages of Grok

  1. X Integration - Real-time access to developer discussions

  2. Cost - Competitive pricing vs other LLMs

  3. Speed - Fast inference for quick iterations

  4. Flexibility - Not tied to specific CLI tools

When to Use GrokTown

Good for:

  • Multi-project management

  • Team collaboration

  • Long-running development tasks

  • Projects needing social context (X data)

Not ideal for:

  • Single-file quick edits (use Claude Code directly)

  • Projects requiring deep IDE integration

  • Real-time pair programming


Inspiration & Credits

Special thanks to the Gastown architecture for showing how multi-agent systems should work!


Contributing

GrokTown is experimental. Improvements welcome:

  1. Fork the repo

  2. Add features

  3. Test thoroughly

  4. Submit PR

Areas that need work:

  • Better error handling

  • More agent types

  • Improved git integration

  • Web UI

  • Performance optimization


License

MIT License - Use at your own risk


FAQ

Q: Why not just use Gastown? A: Gastown is tied to Claude Code and requires the gt CLI. GrokTown is more flexible and uses Grok's unique features like X integration.

Q: Can I use Claude instead of Grok? A: Yes! Just modify the GrokClient class to use Anthropic's API instead.

Q: How much does this cost? A: Depends on usage. Grok pricing is ~$0.20 per million input tokens. For typical projects, expect $5-50/month.

Q: Is this production-ready? A: No, this is a proof of concept. Use for experimentation and learning.

Q: How does it compare to cursor/copilot? A: Different use case. Cursor/Copilot are IDE assistants. GrokTown is for multi-agent project orchestration.



Happy coding with your AI crew! 🚀🤖

May your agents be productive and your git history clean.

Last updated