Like a finely tuned transmission at full throttle, powerglide swerves through your codebase with precision, force, and grace. It is the layer between you and a swarm of LLM-driven engineers working in parallel β€” written in Zig 0.15.2, compiled to a single static binary with zero runtime dependencies, built around one non-negotiable constraint: the agent loop must be reliable enough to run unattended while you do something else.

$ powerglide run --agent hephaestus --velocity 2.0 "implement a binary search tree in Zig"

Named after the legendary Lamborghini Powerglide transmission β€” powerglide is built for maximum throughput.

Key Features

  • Multi-Agent Swarms 🐜 β€” Lay your foot flat. Run N agents in parallel, each in an isolated workspace, pulling from a shared file-backed task queue. Workers are monitored via heartbeat; rogue agents are killed before their diverged work accumulates. No daemon, no sockets β€” just observable, restartable file I/O.

  • Velocity Control πŸš€ β€” Tune the gear ratio: --velocity 2.0 halves the step delay to 500ms for maximum throughput; 0.5 stretches it to 2000ms β€” long enough to read output and brake before the agent over-commits. Agents can self-throttle mid-session by writing their own velocity back to disk.

  • Ralph Loop State Machine πŸ”„ β€” An explicit 11-state machine is the cognitive engine inside every session: idle β†’ load_tasks β†’ pick_task β†’ thinking β†’ tool_call β†’ executing β†’ observing β†’ verify β†’ commit β†’ done. No implicit flow, no silent exits. Every session terminates with <POWERGLIDE_DONE> or <POWERGLIDE_ERROR>. The loop is what makes powerglide auditable β€” you can see which state any agent is in, at any moment, and intervene.

  • Reliable PTY Management πŸ’» β€” Every tool runs in a full pseudoterminal. Exit codes are captured via waitpid with WNOHANG polling and a /proc/<pid>/status fallback β€” so bash, zig build, pytest, and any arbitrary command deliver reliable, trustable exit codes to the verify state that follows.

  • Multi-Model Routing πŸ€– β€” Route to Anthropic (Claude), OpenAI, or any OpenAI-compatible endpoint (Ollama, igllama, NVIDIA NIM, Together AI). Fallback chains in config.json mean a rate-limited primary provider degrades gracefully to the next available one β€” without stopping the session.

  • Terminal TUI πŸ“Š β€” A vxfw-based multi-panel dashboard showing each agent’s current loop state, live log output, velocity, task progress, and token usage β€” across all workers simultaneously. Because watching interleaved terminal output across five agents isn’t situational awareness, it’s noise.

Quick Start

Get Started

  • Zig 0.15.2 β€” Install with mise install zig@0.15.2 or from the official site
  • An API key for your model provider (set ANTHROPIC_API_KEY or OPENAI_API_KEY), or run igllama locally with any GGUF

Build

git clone https://github.com/bkataru/powerglide
cd powerglide
zig build

The binary lands at ./zig-out/bin/powerglide.

Run

# Health check β€” verify all dependencies are set up
./zig-out/bin/powerglide doctor

# Run an agent session
./zig-out/bin/powerglide run "refactor this function to be more idiomatic"

# Run with specific agent and velocity
./zig-out/bin/powerglide run --agent hephaestus --velocity 2.0 "add unit tests"

# Open TUI dashboard
./zig-out/bin/powerglide tui

Commands

CommandPurpose
powerglide runLaunch an agent coding session
powerglide sessionManage agent sessions β€” list, show, resume, delete, export
powerglide agentManage agent configurations β€” list, add, remove, show
powerglide swarmManage agent swarms β€” list, create, add, remove, run, status, stop
powerglide configManage powerglide configuration β€” show, set, get, reset, edit
powerglide toolsList and test available tools β€” list, show, test
powerglide tuiOpen the interactive multi-agent dashboard
powerglide doctorRun system health checks
powerglide versionShow version information

The Ralph Loop

Every powerglide agent session is driven by the Ralph Loop β€” an explicit state machine that enforces a strict sequence from task intake through tool execution to completion. The loop structure is what makes powerglide agents auditable and stoppable: you can see exactly which state an agent is in, you can attach rate limiting or logging to any specific transition, and you always know whether a session ended cleanly.

The loop does not trust the model to self-terminate gracefully. It drives the model β€” state by state, transition by transition β€” and only the loop decides when a session is done.

IDLE LOAD_TASKS PICK_TASK THINKING TOOL_CALL EXECUTING OBSERVING VERIFY COMMIT DONE all done next task FAILED on error

When LOAD_TASKS finds an empty queue β€” every task complete or failed β€” the loop emits <POWERGLIDE_DONE> and exits. This terminal signal is the agent’s contract with its caller: any script, CI job, or orchestrator can reliably detect completion without polling process exit codes or parsing log output.

Inspiration

powerglide synthesizes patterns from across the AI coding agent ecosystem, taking the strongest idea from each:

ProjectWhat We Took
oh-my-piMulti-agent harness architecture: N workers, one orchestrator, file-based coordination
oh-my-opencodeThe omo agent model β€” autonomous coding agents invocable as CLI subprocesses
ralphThe ralph loop pattern: explicit states, explicit done signal, no implicit flow
gastownWorkspace isolation per worker β€” each agent gets its own directory, no write conflicts
opencodeCLI structure and multi-model routing with OpenAI-compatible fallback chains
crushTerminal UX sensibility and the vxfw-based TUI approach