Skip to main content
Models & Research

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.

By Precis Daily Newsroom1 min read286 words
Illustration for: Grok Build: SpaceXAI's Coding Agent - docs.x.ai
Illustration
Key points
  • 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

Summarized from the linked originals.

Related stories

Illustration for: A Guide to Grok Bot 2026
Guides

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

AI Supremacy3 min