Grok Build: SpaceXAI's Coding Agent - docs.x.ai
Grok Build: SpaceXAI's Coding Agent | SpaceXAI Docs Grok Build is a powerful and extensible coding agent. Use it via an interactive TUI, headlessly in scripts or bots, or through the Agent Client Protocol (ACP) in other apps.

- Grok Build: SpaceXAI's Coding Agent | SpaceXAI Docs Grok Build is a powerful and extensible coding agent.
- Use it via an interactive TUI, headlessly in scripts or bots, or through the Agent Client Protocol (ACP) in other apps.
- grok-4.7 , SpaceXAI's latest model, is available directly on the xAI API.
Grok Build: SpaceXAI's Coding Agent | SpaceXAI Docs
Grok Build is a powerful and extensible coding agent. Use it via an interactive TUI, headlessly in scripts or bots, or through the Agent Client Protocol (ACP) in other apps.
The TUI provides a rich, mouse-interactive, fullscreen experience for coding with agents.
curl -fsSL https://x.ai/cli/install.sh | bash
irm https: // x.ai / cli / install.ps1 | iex
On first launch, Grok opens a browser for authentication. In non-browser environments, use an API key:
grok -p "Explain the architecture" --output-format streaming-json
Headless usage is ideal for scripts, automations, or integration into other apps.
Grok supports any custom model. Add it to your user-level config file, ~/.grok/config.toml (on Windows, %USERPROFILE%.grok\config.toml ):
After updating ~/.grok/config.toml , use grok inspect to see what Grok discovered in the current directory, including config sources, instructions, skills, plugins, hooks, and MCP servers, then pick the model in headless mode or in the TUI:
You can also switch inside the TUI with /model .
grok-4.7 , SpaceXAI's latest model, is available directly on the xAI API. Drop it into your own agent loop, IDE integration, or coding tool.
-H "Authorization: Bearer $XAI_API_KEY " \
"input": "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}"
client = Client( api_key = os.getenv( "XAI_API_KEY" ))
chat = client.chat.create( model = "grok-4.7" )
chat.append(user( "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}" ))
api_key = "<YOUR_XAI_API_KEY_HERE>" ,
input = "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}" ,
prompt: 'Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}' ,
Status Line . Live session context in a row at the bottom of the TUI.
Grok Bot — AI teammates on a cloud computer
Sources
Related stories

A Guide to Grok Bot 2026
Will SpaceX AI’s “Grok Bot” and Meta’s “Muse” impact ChatGPT’s marketshare in 2027? It’s somewhat likely.

Microsoft Research Launches PDD Kit for AI Agent Code Verification
Microsoft Research introduces PDD Kit, a tool that helps developers verify AI-generated code against formal specifications.

China Telecom's Xing4.0 Runs a 29B Coding Agent on 19GB Locally
Subtopic Mixture Of Experts · Long Context · Vision Language China Telecom released Xing4.0-29B-A4B , a 29B MoE with only 4B active parameters. Native 256K context extensible to 512K using MLA attention and 64 routed experts.

Build an AI Agent Evaluation with JEV
Author(s): Quan Huynh Originally published on Towards AI. Build an AI Agent Evaluation with JEV Build a small eval harness for a tool-using AI agent: code checks the work it did, and JEV judges the words it wrote.

Components of A Coding Agent
How Coding Agents Use Tools, Memory, and Repo Context to Make LLMs Work Better in Practice Sebastian Raschka, PhD Apr 04, 2026 978 65 100 In this article, I want to cover the overall design of coding agents and agent harnesses: what they are, how they work, and how the different.

Microsoft Introduces TokenEconomizer to Cut AI Coding Costs
Microsoft Research's TokenEconomizer plugin cuts costs by up to 30.9% across coding tasks without altering AI models.