Grok Build
Run Grok Build through OpenLLM with openllm grok, choose from your OpenLLM models in each session, and keep your ~/.grok config and auth.json unchanged.
| Command | openllm grok |
| Mode | Per session. Nothing is installed. |
| Talks to | OpenAI-compatible endpoint at <gateway>/v1, one entry per model |
| Default model | ultra |
| Skip approvals | openllm -d grok (adds --always-approve) |
| Remove | Nothing to remove. Run grok directly. |
Before you begin
- Install the OpenLLM CLI. See Install.
- Install Grok Build so that
grokis on yourPATH. If it is missing,openllm grokprints the official installer,https://x.ai/cli/install.sh. - Have at least one model available. See Providers.
Set up with openllm grok
openllm grokEvery argument after grok goes to Grok Build unchanged, so openllm grok -p "…" runs a one-shot prompt. OpenLLM's own flags go before the client name: -d, --new, and --attach [id].
At launch, OpenLLM picks a gateway: your local daemon at http://127.0.0.1:8787 if it answers, otherwise https://www.openllm.sh. Grok Build has no config-override flag, so OpenLLM gives it a private config directory for the session:
GROK_HOMEpoints at~/.openllm/run/grok/<pid>/.- That directory links to every entry in your real
~/.grokexceptconfig.toml,hooks, andrules, so yourauth.json, sessions, and history are the same files as always. Your own Grok hooks and rules are not loaded in these sessions. - Three files in it are OpenLLM's own:
config.toml: your config merged with one[model."<id>"]table per model in your catalog, each withbase_urlset to<gateway>/v1and your key, plus theopenllmMCP server.hooks/openllm.json: memory hooks that recall before each prompt and save after each turn.rules/openllm.md: guidance on when to use the memory tools.
The directory is readable only by you and is deleted when Grok Build exits. Your own config.toml is read, never written.
Interactive sessions run in a background session host. Run openllm --new grok to skip the offer to attach to a running session.
Choose models
The default model is ultra. Grok Build lists ultra, plus, lite, and every model you have activated, each with its context window. If the catalog cannot be fetched at launch, only ultra is listed.
To pin a model, pick its OpenLLM id in Grok Build's model selection. Get ids from GET /v1/models. To change what the aliases resolve to, edit the chains in Configuration. See Routing and fallback.
To turn off automatic memory, set MEMORY_AUTO_RECALL=0 or MEMORY_AUTO_SAVE=0. See Memory.
Who pays for a request
The model that serves the request decides. A Grok subscription hop runs on your own Grok login through the daemon on one of your devices. An API-key hop bills your provider account. Included openllm/ models count against your plan's allowance. See Providers and Plans and limits.
Check that it works
openllm grok -p "Reply with OK"The reply prints to your terminal. Open Overview in the app: the request appears with the model that served it.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
Grok Build is not installed | grok is not on your PATH | Install Grok Build, then run openllm grok again |
No models are available for your OpenLLM account. | Nothing in your model list | Connect a provider on Providers |
Only ultra is listed | The catalog fetch failed at launch | Check your connection and launch again |
| A new provider's models are missing | The catalog is read at launch | Exit and run openllm grok again |
403 subscription_requires_daemon | The chain has only subscription models and no device can serve them | Run openllm start, or add an API-key model to the chain. See Errors |
For anything else, see Troubleshooting.
Remove it
There is nothing to uninstall. Exit Grok Build and run grok directly to use it without OpenLLM. Temporary files are deleted on exit.
Last updated on
OpenCode
Run OpenCode through OpenLLM with openllm opencode, which adds an openllm provider with all your models per session and leaves your own config untouched.
Hermes
Run the Hermes agent through OpenLLM per session with openllm hermes, or install a sticky openllm profile and remove it with openllm hermes uninstall.