xAI just open-sourced Grok's coding agent (in Rust)
xAI just open-sourced the real source code for Grok's coding agent. The actual Rust harness, not a wrapper. It's called Grok Build, and it runs three ways, off any model you point it at. That last part is the whole story.
A full agent that lives in your terminal
Here's grok running in your terminal. From one prompt line it reads your whole codebase, edits files, runs shell commands, and searches the web. Up top, it's streaming an answer back live and tracking its own context as it works. This isn't a chat box wired to your editor. It's a full agent that lives in the terminal.
The real source, not a docs stub
Coding agents are everywhere this year, and almost all of them are closed. What xAI shipped is different: the real, layered Rust source, synced straight from their internal monorepo. There's even a pinned commit file recording exactly which internal build this tree was cut from. So you can read how a production coding agent is actually put together.
One runtime. Three front doors.
And here's the clever part. It's one agent runtime with three front doors. Run it as a fullscreen terminal app you click around in. Run it headless for scripts and CI. Or wire it into your editor over the Agent Client Protocol, and the same agent drives from inside. Same engine underneath. You just choose how it shows up.
It'll drive any model you want
[model.my-model] model = "provider/model-id" base_url = "https://api.example.com/v1" env_key = "MY_API_KEY"
By default it runs on grok four point five, xAI's own model. But add a few lines to a config file, and it'll drive any OpenAI-compatible model instead. Point it at your own endpoint, start it with grok dash m and the model name, and you're off. It's a harness, not a lock-in.
Its tools are ported from other agents
Now the part I didn't expect. Open the tools folder, and some of the implementations are ported straight from other agents. The file search and read handlers come from OpenAI's Codex, under Apache. Bash, edit, glob, and grep come from sst's opencode, under MIT. A frontier lab shipped its coding agent with tool code openly borrowed from a rival's and from an independent open project. The whole field is converging on shared tools.
One line gets it
Getting it is one line: curl the install script into bash, on Mac, Linux, or WSL. Then cd into a project and just run grok. The current build is v0.2.101, still labeled Beta. One honest note: this is a read-only mirror of xAI's internal tree. You can read it, build it, fork it, but they don't take outside patches. It's the source, not a community project.
Read the real agent · run it three ways · point it at any model.
So if you've ever wanted to see how a production coding agent is really built, or run one against your own model, this is the source to read. Apache two, Rust, all of it in the open. The link's on screen. New repo tomorrow.



















