skip to content
$worker

grok

v0.1.5

xAI Grok CLI as an iii worker; grok::run/start/stop/status/sessions::list spawn the grok CLI for headless turns, mirror raw streaming-json events onto grok::events, and stream AgentEvent frames onto agent::events.

iiiverified
5 installs1 in 7d0 today
install
$iii worker add grok@0.1.5
binarylicense: Apache-2.0coding-agentgrokxaicliheadless
  • macOS: arm64 · x64
  • Linux: arm64 · armv7 · x64
  • Windows: arm64 · x64 · x86

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

6

grok::on-config-change

function

Internal: reload grok configuration when it changes.

request
empty object
response
  • okboolean

grok::run

function

Run one Grok turn and wait for the result. Accepts `prompt` or a `messages` array; streams raw Grok events onto grok::events, AgentEvent frames onto agent::events, and returns {session_id, result, stop_reason}.

request
  • always_approveboolean

    Auto-approve tool/command execution for this headless turn (--always-approve).

  • cwdstring

    Working directory the turn runs in (--cwd).

  • iii_contextboolean

    Inject the iii runtime discovery prompt as the leading instructions (default true via config).

  • messagesobject[]

    Alternative to prompt: role/content messages; the last user entry becomes the prompt.

    • contentunknownrequired

      Either a plain string or an array of content blocks.

    • rolestringrequired
  • modelstring

    Model id; empty = Grok default (e.g. grok-build-0.1).

  • promptstring

    The user prompt for this turn.

  • session_idstring

    iii session id; reuse to resume the same Grok thread.

  • timeout_msinteger· uint64min 0

    Reserved for callers; not forwarded.

response
  • busyboolean
  • grok_thread_idstring
  • is_errorboolean
  • num_turnsinteger
  • reasonstring
  • resultstring
  • session_idstring
  • stop_reasonstring

grok::sessions::list

function

List every Grok session this worker has run.

request
empty object
response
  • sessionsobject[]
    empty object

grok::start

function

Start a Grok turn and return immediately; watch grok::events / agent::events (group_id = session_id) for progress and turn_end.

request
  • always_approveboolean

    Auto-approve tool/command execution for this headless turn (--always-approve).

  • cwdstring

    Working directory the turn runs in (--cwd).

  • iii_contextboolean

    Inject the iii runtime discovery prompt as the leading instructions (default true via config).

  • messagesobject[]

    Alternative to prompt: role/content messages; the last user entry becomes the prompt.

    • contentunknownrequired

      Either a plain string or an array of content blocks.

    • rolestringrequired
  • modelstring

    Model id; empty = Grok default (e.g. grok-build-0.1).

  • promptstring

    The user prompt for this turn.

  • session_idstring

    iii session id; reuse to resume the same Grok thread.

  • timeout_msinteger· uint64min 0

    Reserved for callers; not forwarded.

response
  • session_idstring
  • startedboolean

grok::status

function

Point-in-time status of a Grok session.

request
  • session_idstringrequired

    iii session id returned by grok::run / grok::start.

response
  • liveboolean
  • recordobject
  • session_idstring

grok::stop

function

Interrupt a live Grok run for a session.

request
  • session_idstringrequired

    iii session id returned by grok::run / grok::start.

response
  • reasonstring
  • session_idstring
  • stoppedboolean

triggers

0
no triggers registered