TokenMix Research Lab · 2026-07-22

Grok Build Open Source 2026: Apache 2.0, Local Models, Privacy
Last Updated: 2026-07-22
Author: TokenMix Research Lab
Data verified: 2026-07-22 against the SpaceXAI announcement, Grok Build GitHub repository at commit 3af4d5d, official configuration and enterprise documentation, xAI API pricing, and the original wire-level privacy report.
SpaceXAI open-sourced the Grok Build coding-agent harness under Apache 2.0. It did not release Grok 4.5 model weights. You can compile, audit, fork, and connect the agent to local inference, but the default cloud workflow still requires separate privacy and network controls.
The July 15 release includes the Rust agent loop, file and shell tools, terminal UI, inline diff viewer, skills, plugins, hooks, MCP support, and subagent runtime. The repository says first-party code is Apache 2.0, while vendored components retain their original licenses. Our July 22 source audit checked 2,847 tracked files at commit 3af4d5d39897855bdcc74f23e690024a5dc05573. We found no current source string for the older codebase_upload or git bundle path, but the tree still contains session-trace upload, GCS storage, telemetry, and remote-settings infrastructure. That distinction matters because a reproducible test of Grok Build 0.2.93 found full-repository uploads before SpaceXAI disabled that behavior server-side. The current source is more auditable; it is not proof that every default execution path is offline. SpaceXAI's announcement, the GitHub repository, and the wire-level report establish those separate facts.
Table of Contents
- Quick Verdict
- What SpaceXAI Actually Open-Sourced
- Apache 2.0 License and Commercial Use
- Grok 4.5 Is Not Open Source
- Local Models and Local-First Architecture
- The Privacy Catch
- What the Current Source Code Shows
- Privacy-Hardened Configuration
- Cost Math: Open Harness, Paid Inference
- Use Case Matrix
- Risks and Caveats
- Final Recommendation
- FAQ
- About TokenMix
- Sources
- Related Articles
Quick Verdict
Grok Build is genuinely open-source software, but "Grok is open source" is still a misleading summary.
| Claim | Status | Source |
|---|---|---|
| Grok Build source code is public | Confirmed | SpaceXAI announcement |
| First-party code uses Apache 2.0 | Confirmed | Repository license |
| Grok 4.5 model weights were released | False | The release contains the harness, not the model weights |
| Developers can connect a custom or local model | Confirmed | Grok Build documentation |
| The default Grok 4.5 inference path is free | False | Grok 4.5 API tokens remain billable |
| Open source automatically means no network traffic | False | Authentication, inference, telemetry, trace upload, and session sync are separate paths |
| Version 0.2.93 uploaded full repositories in an independent test | Confirmed for the tested setup | Wire-level report |
| That test proved SpaceXAI trained on the code | False | The researcher explicitly limited the finding to transmission and storage |
| The old whole-repository upload remains active today | Unresolved | A current-binary wire test is still required |
| Open-sourcing was caused by the privacy disclosure | Likely | The timing is close, but SpaceXAI did not state that reason |
The practical verdict is direct: use the repository as an auditable agent framework. Do not treat it as an open-weight Grok release or as a privacy guarantee.
What SpaceXAI Actually Open-Sourced
The release covers the software around the model: the agent runtime, terminal interface, tools, and extension system.
| Repository area | What it contains | Why it matters | Status |
|---|---|---|---|
xai-grok-shell |
Agent runtime, headless mode, session handling | Controls the model-tool loop | Confirmed |
xai-grok-tools |
Terminal, file editing, and search tools | Defines what the agent can do on a workstation | Confirmed |
xai-grok-pager |
Full-screen terminal UI | Makes the agent usable interactively | Confirmed |
xai-grok-workspace |
Filesystem, VCS, execution, checkpoints | Sits closest to repository data | Confirmed |
| Skills and plugins | Extension discovery and loading | Enables reusable workflows | Confirmed |
| MCP support | Local and remote tool servers | Extends data and action surfaces | Confirmed |
| Subagents | Delegated agent tasks | Supports parallel or specialized work | Confirmed |
| Grok 4.5 weights | Not included | The intelligence layer remains separate | Confirmed absence |
The repository describes itself as a periodic sync from SpaceXAI's internal monorepo. At the audited commit, the public tree contained 2,847 tracked files and identified Rust as the primary implementation language. The README also says external contributions are not currently accepted. Users can inspect and fork the code, but "open source" does not yet mean a conventional upstream community workflow where outside pull requests are merged.
SpaceXAI publishes prebuilt binaries for macOS, Linux, and Windows. The source-build instructions list macOS and Linux as supported build hosts and describe Windows source builds as best-effort and not currently tested from the public tree. That is a packaging limitation, not a license limitation.
Apache 2.0 License and Commercial Use
Apache 2.0 permits commercial use, modification, and redistribution of Grok Build's first-party code, subject to its notice and license obligations.
| Use | Apache 2.0 position | Practical requirement | Status |
|---|---|---|---|
| Internal company deployment | Allowed | Keep required notices | Confirmed |
| Fork and modify the agent | Allowed | Document material changes where required | Confirmed |
| Redistribute binaries | Allowed | Include license and notices | Confirmed |
| Build a commercial product | Allowed | Review trademarks and third-party licenses separately | Confirmed |
| Claim Grok 4.5 is included | Not supported | Obtain model access separately | Confirmed |
| Re-license third-party code as Apache 2.0 | Not automatically allowed | Preserve each component's original license | Confirmed |
| Submit changes upstream | Currently not accepted | Maintain a fork or wait for policy change | Confirmed |
The repository README explicitly separates first-party code from third-party and vendored code. Its notices include components derived from OpenAI Codex and OpenCode implementations. A commercial fork therefore needs a license inventory, not just a copy of the root Apache file.
Apache 2.0 also does not transfer SpaceXAI trademarks or guarantee continued access to Grok APIs. The harness license and model service agreement remain two different contracts.
Grok 4.5 Is Not Open Source
Grok 4.5 remains an API model; the open repository does not contain its weights, training code, or training data.
| Layer | Open in this release? | Can run without SpaceXAI? | Status |
|---|---|---|---|
| Grok Build agent loop | Yes | Yes, after compiling or using the binary | Confirmed |
| Terminal UI | Yes | Yes | Confirmed |
| File and shell tools | Yes | Yes | Confirmed |
| Skills, plugins, MCP, hooks | Yes | Yes | Confirmed |
| Grok 4.5 weights | No | No local Grok 4.5 inference from this release | Confirmed |
| Grok 4.5 API | Service access | Requires an API key or eligible product access | Confirmed |
| A different local model | Bring your own | Yes, if a compatible inference endpoint is available | Confirmed |
Official xAI documentation lists grok-4.5 with a 500K context window and current short-context prices of $2 per million input tokens, $0.30 per million cached tokens, and $6 per million output tokens. Prompts at or above 200K tokens use the published long-context rates of $4 input, $0.60 cached input, and $12 output. See the current xAI pricing page and our Grok 4.5 review.
Calling this a "Grok model open-source release" creates three bad assumptions:
- It suggests the Grok 4.5 weights can be downloaded.
- It suggests model inference has no token bill.
- It suggests the entire stack becomes offline automatically.
All three are false.
Local Models and Local-First Architecture
Grok Build can use a local model because its model layer accepts a configurable model ID, base URL, display name, and credential environment variable.
The official configuration schema looks like this:
[model.my-model]
model = "model-id"
base_url = "https://api.example.com/v1"
name = "Display Name"
env_key = "API_KEY"
[models]
default = "my-model"
For a local OpenAI-compatible inference service, the same shape can point to localhost:
[models]
default = "local-coder"
[model.local-coder]
model = "your-local-model-id"
base_url = "http://127.0.0.1:8000/v1"
name = "Local Coder"
env_key = "LOCAL_MODEL_KEY"
The exact model ID, authentication behavior, tool-call format, and context limit depend on the local inference server. The example is a configuration pattern, not a claim that every open model can execute Grok Build's agent loop correctly.
| Architecture | Agent location | Model location | Main benefit | Main caveat |
|---|---|---|---|---|
| Standard Grok Build | Local CLI | SpaceXAI cloud | Fastest setup and Grok 4.5 access | Code context needed by the model leaves the machine |
| Local harness + xAI API key | Local CLI | SpaceXAI API | Direct billing and model control | Still cloud inference |
| Local harness + company gateway | Local CLI | Company-controlled route | Central policy, logs, fallback | Gateway still forwards prompts upstream |
| Local harness + local inference | Local CLI | Local workstation or private server | Maximum model-path control | Hardware, compatibility, and quality are your responsibility |
| Local harness + private cloud model | Local CLI | Private VPC endpoint | Enterprise isolation and scale | Infrastructure and operational cost |
Run grok inspect after editing the configuration. It reports the effective model, instructions, skills, plugins, hooks, and MCP servers detected for the current workspace.
grok inspect
grok -p "Explain the repository architecture" -m local-coder
Local inference does not make every tool local. Remote MCP servers, web search, authentication, updates, session sharing, and plugins may create their own connections. A privacy review must follow the whole graph, not only the model URL.
For multi-provider routing, use an explicit gateway policy rather than changing endpoints manually. The AI API gateway guide covers routing, fallback, and observability patterns.
The Privacy Catch
Open-sourcing makes Grok Build inspectable, but it arrived after a verified privacy incident involving an older binary.
An independent researcher tested Grok Build 0.2.93 with controlled repositories and intercepted the tool's own traffic. The report found two separate channels: model requests containing files the agent read, and storage uploads containing a repository snapshot. In one preserved test, approximately 5.10 GiB moved through storage requests while model-turn traffic totaled about 192 KB. A captured Git bundle could reconstruct a file the agent had been told not to read, together with Git history.
The researcher explicitly did not prove that SpaceXAI trained on the uploaded data. The evidence established transmission, server acceptance, and storage behavior for the tested version and account. Axios independently reported that uploads appeared to stop after disclosure and that SpaceXAI said previously uploaded data would be deleted.
| Date | Event | What is established | Status |
|---|---|---|---|
| 2026-07-08 | Research test used Grok Build 0.2.93 | Tested binary and version are identified | Confirmed |
| 2026-07-12 | Automatic whole-codebase upload was reportedly disabled | Independent reporting and researcher update agree | Confirmed by reporting |
| 2026-07-14 | Researcher updated the disclosure | Old upload disabled server-side; deletion not independently verified | Confirmed |
| 2026-07-15 | Grok Build source published | Agent harness released under Apache 2.0 | Confirmed |
| 2026-07-21 | Public repository synced again | Our audited commit date | Confirmed |
| 2026-07-22 | Current-binary wire behavior | No fresh reproduction in this review | Unresolved |
The chronology supports a Likely inference that transparency became more urgent after the disclosure. It does not prove SpaceXAI open-sourced the project because of the incident. The official announcement presents reliability, extensibility, and local-first deployment as its reasons.
What the Current Source Code Shows
The July 21 source tree removes evidence of the named whole-codebase path, but retains configurable upload and telemetry systems.
We searched the audited commit for codebase_upload, upload_codebase, git_bundle, and git bundle; none appeared in tracked Rust, Markdown, or TOML files. That is useful evidence that the old path is not present under those names. It is not a network test and cannot prove equivalent behavior is impossible through a differently named path.
The current tree does contain:
- GCS and proxy upload utilities for session persistence and agent telemetry;
- a storage client using the Grok CLI proxy;
- a
trace_uploadsetting and upload queue; - remote settings that can influence telemetry;
- optional remote session sync;
- external OpenTelemetry controls.
| Current-source finding | Evidence | What it proves | Status |
|---|---|---|---|
No codebase_upload string |
Repository-wide search at commit 3af4d5d |
Old named path is absent | Confirmed |
No git bundle string |
Repository-wide search | Old named implementation is not visible under that phrase | Confirmed |
| Session trace upload exists | trace_upload, storage client, GCS utilities |
Upload capability remains | Confirmed |
| Telemetry fallback is disabled | resolve_telemetry_mode() default |
No-override source fallback is off | Confirmed |
| Remote settings can set telemetry | Config resolution order | Account/server configuration can affect resolved behavior | Confirmed |
| Trace upload follows telemetry when unset | resolve_trace_upload() |
One control can indirectly enable the other | Confirmed |
/privacy is separate |
Current user guide | Privacy opt-out does not automatically disable telemetry | Confirmed |
| Current binary never uploads repository data | No fresh packet capture | Cannot be concluded from static search alone | Unresolved |
This is the most important technical conclusion in the article:
Open source improves auditability. It does not replace runtime verification.
Privacy-Hardened Configuration
The safest configuration explicitly disables telemetry and trace uploads instead of assuming /privacy covers both.
The current user guide says these controls are independent:
/privacycontrols coding-data sharing;[features] telemetrycontrols product analytics;[telemetry] trace_uploadcontrols session traces;- external OpenTelemetry is a separate opt-in stream.
A conservative starting configuration is:
[features]
telemetry = false
[telemetry]
trace_upload = false
mixpanel_enabled = false
[models]
default = "local-coder"
[model.local-coder]
model = "your-local-model-id"
base_url = "http://127.0.0.1:8000/v1"
name = "Local Coder"
env_key = "LOCAL_MODEL_KEY"
The corresponding environment controls are:
export GROK_TELEMETRY_ENABLED=false
export GROK_TELEMETRY_TRACE_UPLOAD=false
grok inspect
grok -p "List the files you would need before reading them" -m local-coder
Environment variables and TOML syntax above come from the current repository documentation. We did not packet-capture this configuration, so "zero outbound traffic" remains a condition to verify, not a promised result.
| Control | What it changes | What it does not guarantee | Status |
|---|---|---|---|
/privacy opt-out |
Coding-data sharing preference | Telemetry and trace upload are separate | Confirmed |
telemetry = false |
Product analytics resolution | Model prompts still go to the configured model endpoint | Confirmed |
trace_upload = false |
Session trace upload setting | Plugins and MCP servers may still connect externally | Confirmed |
Local base_url |
Model inference route | Updates, auth, web tools, and remote sessions may remain | Confirmed |
Blocking code.grok.com |
Disables remote session sync/sharing | Does not block inference proxy by itself | Confirmed |
| Packet capture | Observes actual connections | Does not prove future versions behave identically | Confirmed |
For sensitive repositories:
- Start with fake credentials and a canary repository.
- Disable telemetry and trace upload explicitly.
- Use a local model endpoint.
- Block nonessential domains at the network layer.
- Capture DNS and HTTPS destinations.
- Confirm ignored files, Git history, plugins, and MCP data remain inside the intended boundary.
- Repeat after every client update.
The local AI agent SSH workflow covers another important boundary: keeping credentials on the server instead of exposing private keys to a desktop agent.
Cost Math: Open Harness, Paid Inference
The Grok Build license costs $0, but Grok 4.5 inference remains usage-priced.
The calculations below use xAI's July 22 published short-context prices: $2 per million input tokens and $6 per million output tokens. They exclude tool calls, taxes, retries, priority processing, and long-context multipliers.
| Monthly workload | Input cost | Output cost | Total | Status |
|---|---|---|---|---|
| 1M input + 0.2M output | $2.00 | $1.20 | $3.20 | Confirmed rates, calculated |
| 10M input + 2M output | $20.00 | $12.00 | $32.00 | Confirmed rates, calculated |
| 100M input + 20M output | $200.00 | $120.00 | $320.00 | Confirmed rates, calculated |
At 50 coding sessions per workday and 22 workdays, a $0.20 average model bill per session becomes:
50 sessions x 22 days x $0.20 = $220 per developer per month
That $0.20 average is a scenario assumption, not a measured Grok Build average. Teams should replace it with usage exported from their own sessions.
Long prompts change the math. xAI says prompts at or above 200K tokens use $4 per million input and $12 per million output for Grok 4.5.
| One request | Short-context math | Long-context billed math | Difference | Status |
|---|---|---|---|---|
| 300K input + 50K output | $0.90 | $1.80 | +$0.90 | Confirmed rates, calculated |
| 500K input + 100K output | $1.60 | $3.20 | +$1.60 | Confirmed rates, calculated |
Running a local model removes the xAI token charge but does not make inference free. Hardware purchase, GPU rental, electricity, engineering time, and lower task-completion rates can dominate the result. Without a measured local deployment, assigning a dollar saving would be Speculation.
For current account and model access steps, use the Grok API key guide and verify the live console before budgeting.
Use Case Matrix
Grok Build's open-source release is most valuable to teams that need an auditable agent shell, not to users expecting free Grok 4.5 weights.
| Use case | Recommendation | Why | Confidence |
|---|---|---|---|
| Audit agent file and shell behavior | Inspect or fork Grok Build | Relevant source is now public | Confirmed |
| Use Grok 4.5 with minimal setup | Standard Grok Build | Official supported path | Confirmed |
| Run an open model locally | Grok Build plus local endpoint | Custom model configuration exists | Confirmed, compatibility requires testing |
| Regulated source-code environment | Fork, pin version, disable uploads, capture traffic | Defaults alone are insufficient evidence | Likely best practice |
| Build a commercial coding tool | Apache fork plus license review | First-party code permits commercial use | Confirmed |
| Accept community pull requests upstream | Do not depend on it today | Official repository says external contributions are not accepted | Confirmed |
| Assume privacy because source is open | Do not proceed | Runtime config and network behavior still matter | Confirmed |
| Replace a working coding agent immediately | Run a canary first | Harness and model quality are separate | Likely |
Risks and Caveats
The largest risk is collapsing four separate questions - source availability, model weights, runtime traffic, and data retention - into one word: open.
| Risk | Likelihood | Impact | Mitigation | Status |
|---|---|---|---|---|
| Calling Grok 4.5 open source | High | Misleads readers and buyers | Say "Grok Build harness" every time | Confirmed |
| Assuming local-first means offline | High | Unexpected data transfer | Use local endpoint and network controls | Confirmed |
Relying only on /privacy |
Medium | Telemetry or traces may remain configured | Disable each control explicitly | Confirmed |
| Applying 0.2.93 findings to every current build | Medium | Overstates current risk | Label tested version and re-test current binary | Confirmed caveat |
| Assuming old behavior is fully fixed | Medium | False security | Packet-capture the deployed version | Unresolved |
| Ignoring third-party licenses | Medium | Redistribution exposure | Audit notices before shipping a fork | Confirmed |
| Expecting upstream contributions | High | Fork maintenance burden | Budget for internal ownership | Confirmed |
| Using a weak local model for agent loops | Medium | More retries and failed tasks | Benchmark task completion, not token price | Likely |
| Letting remote settings override assumptions | Medium | Configuration drift | Pin requirements and inspect effective config | Confirmed capability |
Final Recommendation
Use Grok Build as an auditable Apache 2.0 agent framework, not as an open-weight Grok release. For ordinary coding, the official Grok 4.5 path is the simplest. For sensitive code, pin the source, choose a controlled model endpoint, disable telemetry and trace upload explicitly, block optional services, and verify the deployed binary on the wire.
FAQ
Is Grok Build open source?
Yes. SpaceXAI published the Grok Build coding-agent harness and terminal UI under Apache 2.0 on July 15, 2026. First-party code can be inspected, modified, redistributed, and used commercially under the license terms.
Is Grok 4.5 open source?
No. The Grok Build repository does not include Grok 4.5 weights, training code, or training data. Grok 4.5 remains available through SpaceXAI's products and API.
Can Grok Build run a local model?
Yes, if the model is exposed through a compatible inference endpoint. Grok Build supports custom model IDs, base URLs, names, and credential environment variables. Tool calling and context behavior still need workload testing.
Does local-first mean Grok Build is fully offline?
No. A local model removes the cloud model path, but authentication, updates, plugins, MCP servers, web tools, telemetry, trace upload, and remote sessions are separate network surfaces. Verify actual traffic before using sensitive repositories.
Can I use Grok Build commercially?
Yes, the first-party code is licensed under Apache 2.0. You must preserve required notices and separately review third-party licenses, trademarks, and any model-service terms.
Did Grok Build upload complete repositories?
An independent wire-level test confirmed that Grok Build 0.2.93 uploaded complete repository data in the tested setup. SpaceXAI reportedly disabled that behavior afterward. This article does not claim the current binary still behaves the same way.
Does /privacy opt-out disable all uploads?
No. Current Grok Build documentation says coding-data privacy, product telemetry, session trace upload, and external OpenTelemetry are independent controls. Disable and verify each relevant path separately.
How much does Grok 4.5 cost with Grok Build?
The harness has no license fee, while API inference is usage-priced. xAI currently lists short-context Grok 4.5 at $2 per million input tokens, $0.30 cached input, and $6 output; prompts at or above 200K use higher long-context rates.
About TokenMix
TokenMix.ai is an AI API relay for developers who need one OpenAI-compatible endpoint across OpenAI, Anthropic, Google, DeepSeek, Qwen, GLM, Grok, and other model families. Check the live model catalog, compare pricing, and read the API docs before routing production workloads.
Sources
- Grok Build is Now Open Source - Official July 15 announcement and release scope.
- xai-org/grok-build - Official source repository, build instructions, repository map, and contribution status.
- Apache 2.0 license - License text for first-party repository code.
- Grok Build documentation - Official installation, custom-model configuration, and API usage.
- Enterprise deployments - Official network hosts, configuration layers, authentication, and policy controls.
- Grok Build configuration guide - Current telemetry, privacy, and trace-upload settings.
- Monitoring usage guide - External OpenTelemetry defaults and content boundaries.
- xAI API pricing - Current Grok 4.5 short- and long-context prices.
- Wire-level Grok Build 0.2.93 analysis - Original methodology, artifacts, scope, and limitations.
- Axios: SpaceXAI wipes customer data after Grok uploads - Independent reporting on upload behavior and SpaceXAI's response.
- TechRepublic: Grok Build open source after privacy backlash - Independent release and privacy chronology.