Code release
xAI just gave away the code that runs Grok Build
xAI open-sourced Grok Build, its terminal-native coding agent. The code includes the agent loop, tool system, TUI, and extension framework. Developers can compile it themselves and run it fully local with their own inference backend.
Emmanuel Fabrice Omgbwa Yasse AI-assisted
2026-07-19 · 2 min read

The code running the agent is now public. xAI released the source for Grok Build, a terminal user interface coding agent that had been in internal use under the SpaceXAI branding. The repository landed on GitHub with no fanfare beyond a short post explaining the rationale. The open-source coding agent landscape keeps getting more crowded, with projects like Hugging Face's Slack-native coding agent also vying for attention.
"Publishing the code is the most direct way to build toward a robust and reliable harness," the release note reads. The repository lets developers see exactly how the agent assembles context, parses model responses, and dispatches tool calls. That includes commands for reading, editing, and searching codebases, as well as running shell commands.

What the source contains
The published codebase covers five layers: the agent loop, the tool system, the terminal user interface, the extension system, and the configuration layer. The extension system is a notable inclusion because it exposes how Grok Build loads skills, plugins, hooks, MCP servers, and subagents. Developers can treat that part of the source as the reference implementation for building new integrations. Other recently open-sourced agent frameworks, like PraisonAI's 5-line agent deployment, take a different approach to extensibility.
The agent loop handles context assembly from project files and user instructions, parses each model response into structured tool calls, and dispatches them back to the shell or the codebase. The UI component handles rendering, input, plan review, and an inline diff viewer for proposed code changes.
Local-first mode
One of the more practical changes: Grok Build can now run fully local. A developer can compile the agent from source, point it at a local inference endpoint, and drive everything from a config.toml file. That removes the dependency on xAI's own model serving infrastructure, making the agent usable in air-gapped environments or with alternative models. Local inference is becoming more viable thanks to projects like Sipp's 3x-5x speedup library and quantization techniques such as Unsloth's 975B model compression.
xAI did not announce a specific license alongside the release, though the source is posted on a standard public GitHub repository. The company said the open-source move was the most direct way to build toward a robust harness, suggesting the code's main audience is other developers building or extending agentic coding tools. This approach contrasts with the more guarded releases of some competitors, as seen in the debate around uncensored models and safety.
Get the tech essentials in 3 minutes every morning
One email, every weekday, with what actually matters in AI and tech.