Recorder

xAI Grok

The xAI API is OpenAI-compatible, so the recorder reads its usage, including reasoning tokens.

  1. Wrap each call as in the OpenAI API panel.
  2. Add Grok models to pricing.json with their prices; until then their calls are counted but not priced, and check-logs lists them.

Wrap a call

with run.agent("triage", model="xai/grok-5") as step:
    resp = client.chat.completions.create(model="grok-5", messages=messages)
    step.model_call(**usage_from(resp))

Where the log lands

Wherever your service logs go, or a folder.

How it reaches the harness

You download the logs with your own access.

Read the full guide on GitHub

Add the recorder

20 platform guides in total.