feat: add Grok Build (xAI) as agent provider#830
Closed
canyugs wants to merge 1 commit into
Closed
Conversation
Add xAI's official Grok Build CLI as a supported agent provider via its native ACP entry (`grok agent stdio`) — no wrapper required. Files added: - Dockerfile.grok: runtime image with pinned grok 0.1.211 binary (SHA256-verified, sourced from xAI's public artifacts bucket) - docs/grok.md: setup guide covering Docker build, Helm install, three auth options (API key / device-code / deployment key), credential persistence, and a comparison with Dockerfile.hermes - config.toml.example: agent example placed next to the hermes one - .github/workflows/build.yml: grok variant added to build-image, merge-manifests, and promote-stable matrices so the ghcr.io/openabdev/openab-grok image is published alongside other agent variants Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
Contributor
Author
|
Mis-targeted upstream — re-opening on the canyugs fork. Sorry for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discord Discussion URL
Internal thread on the openab-testing Discord (channel
1495121978007228466, thread1505232450471596096) — discussed "should OpenAB ship a pure xAI variant alongside Hermes" on 2026-05-16. Summary: Hermes already supports xAI Grok OAuth, but it pulls in the entire Nous gateway, requires loopback OAuth (kubectl port-forward / ECS curl-the-callback), and adds a second supply-chain dependency. Now that xAI's officialgrokCLI (Grok Build, GA 2026-05-14) ships native ACP and supports headless API-key / device-code auth, a dedicated Dockerfile is simpler for users who only want Grok.1. What problem does this solve?
OAB users who want to run xAI Grok currently have to deploy
Dockerfile.hermesand complete the loopback-OAuth flow (hermes auth add xai-oauth). That flow needs port-forwarding into the pod or an ECS curl-the-callback workaround, both of which are documented indocs/hermes.mdbut are non-obvious operations and pull in 30+ unused providers.xAI released Grok Build on 2026-05-14 — an official coding-agent CLI distributed as a single static binary with native ACP (
grok agent stdio). It supports three headless auth modes:GROK_CODE_XAI_API_KEYenv var (pay-per-token API)GROK_DEPLOYMENT_KEYenv var (enterprise managed config)This PR adds
Dockerfile.grokso users who only need Grok can deploy it without the Nous gateway layer.No issue filed yet — happy to open one if maintainers prefer.
2. At a Glance
3. Prior Art & Industry Research
Dockerfile.hermes, PR feat: add Hermes Agent as agent provider #824): existing OAB integration. This PR coexists with it — see the comparison table indocs/grok.md. Hermes wins on multi-provider switching and fallback chains; Grok wins on supply-chain surface and headless auth simplicity.Dockerfile.codex): closest analog inside the repo — also an official-vendor CLI with ACP support (via@zed-industries/codex-acpwrapper). Grok Build ships ACP in-binary so no wrapper is needed.4. Proposed Solution
Mirror the existing per-agent Dockerfile pattern. Four touchpoints:
Dockerfile.grok—debian:bookworm-slimbase. PinnedGROK_VERSION=0.1.211with separate SHA256s for amd64 and arm64. Binary pulled directly fromhttps://storage.googleapis.com/grok-build-public-artifacts/cli/(the same sourcehttps://x.ai/cli/install.shresolves to) so the install script's PATH/shell-config side-effects are skipped in the container.docs/grok.md— Docker build / Helm install / three auth flows / credential persistence / model selection / comparison withDockerfile.hermes.config.toml.example— agent block placed immediately after the hermes one..github/workflows/build.yml—grokvariant added tobuild-image,merge-manifests, andpromote-stablematrices.ACP invocation
grok agent stdiowas verified against the 0.1.211 binary's--helpoutput (subcommand tree includesagent → stdio | headless | serve | leader).5. Why This Approach
Dockerfile.hermespins NousResearch'sinstall.shby commit + SHA256. The xAI install script doesn't expose a versioned URL, but the GCS-hosted binary itself does. Pinning the binary directly is one fewer indirection and verifies what actually runs.Dockerfile.codexwe don't need a separate*-acppackage on top.Known limitations:
agents.grok.*not added yet —docs/grok.mddocuments--setflags so users can deploy today, but a chart-side first-class entry is a follow-up PR.6. Alternatives Considered
Dockerfile.hermesinstead of new file: rejected. Hermes provides value as a multi-provider gateway; conflating it with a single-provider variant erases the distinction users currently rely on.https://x.ai/cli/install.shdirectly in the Dockerfile (à la Hermes): rejected. The script modifies~/.bashrc, writes~/.grok/config.toml, and fetches managed config from a proxy URL — useful for interactive installs, noise in a container.@superagent-ai/grok-clicommunity wrapper: rejected. It's a third-party project on top of the xAI API; defeats the point of preferring the official surface.7. Validation
grok agent stdioconfirmed against 0.1.211--help.9245f9c9...(amd64),b283cb72...(arm64) — both downloaded from the GCS bucket andsha256sum'd.https://x.ai/cli/install.shreturns HTTP 200 (cross-checked the install script's own GCS fallback URL to derive the artifact path).https://x.ai/cli/stable→0.1.211.docker build -f Dockerfile.grok: not yet run — opening as Draft for this reason; will run before marking ready.8. Follow-ups
agents.grok.*values + templates (follow-up PR).groktodocker-smoke-test.ymlonce the basic ACP handshake is validated.