{"slug": "made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros", "title": "Made a thing, if you use Grok and Pi check it out. Or scoll on bros", "summary": "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.", "body_md": "Grok's agent. Pi's workflow.\n\n```\npi install npm:pi-grok-agent\n```\n\nRun [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.\n\n```\n┌─────────────────────┐         ┌──────────────────┐         ┌─────────────────────┐\n│ PI — drives turn    │         │ GATEWAY          │         │ GROK BUILD — works  │\n│ transcript, gates,  │  ACP    │ one per machine  │  stdio  │ own tools, agents,  │\n│ dialogs             │ over WS │ 127.0.0.1:2419   │         │ own history         │\n│ grok provider ext   │◄───────►│ guard + MCP      │◄───────►│ ~/.grok login       │\n└─────────────────────┘         └──────────────────┘         └─────────────────────┘\n```\n\nPi 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).\n\n- **Pi sets permissions and boundaries.** Read-only, ask, auto, and YOLO permission modes are supported.\n- **Pi makes decisions.** Grok's tool call requests, turn order, user_ask_question prompts are delegated to Pi.\n- **Grok can use Pi's extension tools** Lent over MCP as`pi__<name>` , with the result continuing the same Grok turn.\n- **Grok keeps all of his tools and extensions.** My own observations have been that Grok performs better with his native toolset, so this project's purpose is to keep his tools without buying the shed.\n\n| Model ID | Name in `/models` | Reasoning efforts | Context window | \n|---|---|---|---|\n| `grok/grok-4.7` | Grok 4.7 | low, medium, high, xhigh | 500,000 tokens | \n| `grok/grok-4.7-build-fast` | Grok 4.7 Build Fast | low, medium, high, xhigh | 500,000 tokens | \n| `grok/grok-4.6` | Grok 4.6 | low, medium, high, xhigh | 500,000 tokens | \n| `grok/grok-4.5` | Grok 4.5 | low, medium, high, xhigh | 500,000 tokens | \n\nModel availability in Pi is determined by your [account access](https://grok.com).\n\n- This package connects the Grok Build agent over ACP, not the xAI chat-completions API. The ACP protocol does not provide complete visibility or control of an agent, and not all functions or extensions of Grok Build have been tested for safety in this configuration. The tool gates are not an operating-system sandbox: Grok runs with your user's permissions.\n- The gateway listens on loopback only, requires a bearer secret, and never starts Grok with `--always-approve` . Headless use does not imply approval: by default, headless Pi cancels Grok's permission prompts. The`postEditCheck` and`stopCheck` settings run as shell commands — treat them as executable code.\n\n- Not compatible with API key access. A Grok account is required, any membership tier. If your OAuth token expires you can '/login' from either Grok Build or Pi with '/grok login' to renew credentials.\n- Token read, token write, cache read and cache hit % displayed in Pi are taken from Grok Build. Pi may occasionally report inaccurate data during long multistep tool calls, but will correct onn the next turn.\n\n- [docs/usage.md](https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/usage.md) — settings, lent tools, permissions, the gateway guard, hooks,`/grok` commands, troubleshooting\n- [docs/architecture-diagram.md](https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/architecture-diagram.md) — the diagram in mermaid and ASCII\n- [docs/first-class-model.md](https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/first-class-model.md) — design and turn mapping\n- [docs/launch-verification.md](https://github.com/JangMan-J/pi-grok-agent/blob/main/docs/launch-verification.md) — recorded live runs behind the verified claims\n\n- [Open an issue](https://github.com/JangMan-J/pi-grok-agent/issues) with the output of`node --version` ,`pi --version` , and`grok --version` , the model ID, and a short redacted excerpt of`/grok debug` .", "url": "https://wpnews.pro/news/made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros", "canonical_source": "https://github.com/JangMan-J/pi-grok-agent", "published_at": "2026-09-28 21:51:54+00:00", "updated_at": "2026-09-28 22:17:49.160439+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "large-language-models"], "entities": ["pi-grok-agent", "Grok Build", "Pi coding agent", "xAI", "Grok 4.7", "Grok 4.7 Build Fast", "Grok 4.6", "Grok 4.5"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros", "markdown": "https://wpnews.pro/news/made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros.md", "text": "https://wpnews.pro/news/made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros.txt", "jsonld": "https://wpnews.pro/news/made-a-thing-if-you-use-grok-and-pi-check-it-out-or-scoll-on-bros.jsonld"}}