Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Waiting to run
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Waiting to run
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Waiting to run
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Waiting to run
xAI Grok models for elizaOS — text generation and embeddings.
Registers Grok as the TEXT_SMALL, TEXT_LARGE, and TEXT_EMBEDDING model
handlers in an Eliza agent runtime. The plugin is auto-enabled when
XAI_API_KEY (or the alias GROK_API_KEY) is present. It adds no actions,
providers, or services — purely model handlers.
For X (formerly Twitter) social posting, mentions, and timeline interactions,
use @elizaos/plugin-x instead. This package is
intentionally Grok-only.
Installation
bun add @elizaos/plugin-xai
Capabilities
Capability
Model type registered
Default model
Text (large)
TEXT_LARGE
grok-3
Text (small)
TEXT_SMALL
grok-3-mini
Embeddings
TEXT_EMBEDDING
grok-embedding
Streaming (stream: true + onStreamChunk) is supported for both text model
types. Tool calling (tools, toolChoice) and structured output
(responseSchema) are handled natively via the xAI OpenAI-compatible API.
Configuration
Set XAI_API_KEY and (optionally) override the defaults:
Variable
Default
Description
XAI_API_KEY
—
Required. xAI API key.
GROK_API_KEY
—
Alias recognized by auto-enable only; runtime model calls require XAI_API_KEY.
XAI_MODEL
grok-3
Large/default text model. Also accepts XAI_LARGE_MODEL.
The plugin is auto-enabled when XAI_API_KEY is set in the environment, so
explicit registration in plugins is only required when auto-enable is bypassed.
Development
bun run --cwd plugins/plugin-xai build
bun run --cwd plugins/plugin-xai test
bun run --cwd plugins/plugin-xai typecheck