Made a thing, if you use Grok and Pi check it out. Or scoll on bros A developer released pi-grok-agent, an npm package that runs xAI's Grok Build agent as a model provider inside the Pi coding agent, installable via `pi install npm:pi-grok-agent`. The package connects Grok Build over the Agent Client Protocol (ACP) via WebSockets through a local gateway on 127.0.0.1:2419, routing Grok's tool requests back to Pi over an MCP loopback while Grok retains its native tools and session history. It supports Grok 4.7, Grok 4.7 Build Fast, Grok 4.6, and Grok 4.5, each with a 500,000-token context window and low, medium, high, and xhigh reasoning efforts, and requires a Grok account rather than API key access. Grok's agent. Pi's workflow. pi install npm:pi-grok-agent Run Grok Build https://docs.x.ai/build/overview as an additional model provider in Pi coding agent https://github.com/earendil-works/pi . Grok keeps its native environment, tools, and session history. Pi provides the DIY harness, turn control, permission requests, and extensions. ┌─────────────────────┐ ┌──────────────────┐ ┌─────────────────────┐ │ PI — drives turn │ │ GATEWAY │ │ GROK BUILD — works │ │ transcript, gates, │ ACP │ one per machine │ stdio │ own tools, agents, │ │ dialogs │ over WS │ 127.0.0.1:2419 │ │ own history │ │ grok provider ext │◄───────►│ guard + MCP │◄───────►│ ~/.grok login │ └─────────────────────┘ └──────────────────┘ └─────────────────────┘ Pi drives the session using Agent Client Protocol https://agentclientprotocol.com over WebSockets. Grok returns streaming responses, thinking blocks, as well as image and video requests. All of Grok's tool requests are routed back to Pi through callbacks over an MCP loopback. The first Grok turn auto-starts the local gateway 127.0.0.1:2419 by default ; every Pi process on the machine attaches to it. Details: docs/architecture-diagram.md https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/architecture-diagram.md · docs/usage.md https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/usage.md . - Pi sets permissions and boundaries. Read-only, ask, auto, and YOLO permission modes are supported. - Pi makes decisions. Grok's tool call requests, turn order, user ask question prompts are delegated to Pi. - Grok can use Pi's extension tools Lent over MCP as pi