Post

SpaceXAI
SpaceXAI@SpaceXAI·
We've open-sourced Grok Build and have reset usage limits for all users. Open sourcing Grok Build allows anyone to support making a reliable and robust harness. Check out our code, including the Git repo for the Grok Build CLI. x.ai/open-source
English
943
2.2K
16.2K
7.8M
ticalcode
ticalcode@ticalcode·
Setting up Grok Build as a remote agent server on a VPS, and what I learned about its architecture. --- Installation is straightforward — download the Rust binary from GitHub releases, chmod +x, done. No dependencies, no container needed. ~150MB single binary. Authentication uses device code flow: ``` grok login --device-code ``` Credentials persist in ~/.grok/auth.json with auto-refresh. The agent runs as a WebSocket server: ``` grok agent serve --bind 127.0.0.1:2422 ``` It speaks JSON-RPC 2.0 over WebSocket (they call it ACP). Four handshake steps: initialize → authenticate → session/new → session/prompt. Each session carries file system access, cwd, and a list of MCP servers. I wrote a Telegram bot (~100 lines of Python, websockets library) that bridges chat messages to the ACP endpoint. Runs at ~42MB RAM. --- The first real issue surfaced quickly: quota burn rate. A single complex task — "understand two codebases" — consumed 6% of the weekly X Premium quota in one go. Agent mode triggers multiple inference rounds per prompt: think → call tool → read result → think again. Each tool call in the loop counts as a separate API request. --- I attempted to mitigate this by routing simple queries to a cheaper model (DeepSeek V4 Flash) through Grok Build's built-in multi-model config: ```toml [model."deepseek-v4-flash"] base_url = "api.deepseek.com/v1" api_key = "sk-..." api_backend = "chat_completions" ``` The ACP protocol even accepts a modelId field in session/new metadata. It looked fully supported. It wasn't. The model answered as Grok regardless of the modelId parameter. GROK_DEFAULT_MODEL env var had no effect either. --- Digging into the binary revealed why. Grok Build fetches a model catalog from xAI's server on startup and caches it locally (~/.grok/models_cache.json). This catalog only contains xAI models (grok-4.5, etc.) with api_backend set to "responses" — xAI's proprietary protocol.
English
2
1
2
117
Zerops
Zerops@zeropsio·
@ticalcode @SpaceXAI Thanks for this breakdown. In case you're itnerest, on Zerops it gets its own container with a VPN into just the project network.
English
0
0
0
1
Paylaş