Clients

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.

Commandopenllm grok
ModePer session. Nothing is installed.
Talks toOpenAI-compatible endpoint at <gateway>/v1, one entry per model
Default modelultra
Skip approvalsopenllm -d grok (adds --always-approve)
RemoveNothing to remove. Run grok directly.

Before you begin

  • Install the OpenLLM CLI. See Install.
  • Install Grok Build so that grok is on your PATH. If it is missing, openllm grok prints the official installer, https://x.ai/cli/install.sh.
  • Have at least one model available. See Providers.

Set up with openllm grok

openllm grok

Every 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_HOME points at ~/.openllm/run/grok/<pid>/.
  • That directory links to every entry in your real ~/.grok except config.toml, hooks, and rules, so your auth.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 with base_url set to <gateway>/v1 and your key, plus the openllm MCP 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

SymptomCauseFix
Grok Build is not installedgrok is not on your PATHInstall Grok Build, then run openllm grok again
No models are available for your OpenLLM account.Nothing in your model listConnect a provider on Providers
Only ultra is listedThe catalog fetch failed at launchCheck your connection and launch again
A new provider's models are missingThe catalog is read at launchExit and run openllm grok again
403 subscription_requires_daemonThe chain has only subscription models and no device can serve themRun 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

On this page