Grok Build as a model in Pi. Grok keeps his tools, so Pi can put him to work.
TypeScript
1
25 commits
updated Sep 28, 2026
Grok's agent. Pi's workflow.
pi install npm:pi-grok-agent
Run Grok Build as an additional model provider in Pi coding agent. 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 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 · docs/usage.md.
pi__<name>, with the result continuing the same Grok turn.| Model ID | Name in /models | Reasoning efforts | Context window |
|---|---|---|---|
grok/grok-4.7 | Grok 4.7 | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.7-build-fast | Grok 4.7 Build Fast | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.6 | Grok 4.6 | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.5 | Grok 4.5 | low, medium, high, xhigh | 500,000 tokens |
Model availability in Pi is determined by your account access.
--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./grok commands, troubleshootingnode --version, pi --version, and grok --version, the model ID, and a short redacted excerpt of /grok debug.TypeScript
96.9%
Shell
3.1%
Grok Build as a model in Pi. Grok keeps his tools, so Pi can put him to work.
TypeScript
1
25 commits
updated Sep 28, 2026
Grok's agent. Pi's workflow.
pi install npm:pi-grok-agent
Run Grok Build as an additional model provider in Pi coding agent. 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 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 · docs/usage.md.
pi__<name>, with the result continuing the same Grok turn.| Model ID | Name in /models | Reasoning efforts | Context window |
|---|---|---|---|
grok/grok-4.7 | Grok 4.7 | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.7-build-fast | Grok 4.7 Build Fast | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.6 | Grok 4.6 | low, medium, high, xhigh | 500,000 tokens |
grok/grok-4.5 | Grok 4.5 | low, medium, high, xhigh | 500,000 tokens |
Model availability in Pi is determined by your account access.
--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./grok commands, troubleshootingnode --version, pi --version, and grok --version, the model ID, and a short redacted excerpt of /grok debug.TypeScript
96.9%
Shell
3.1%