grok_reflect
Run a structured, tool-free review of an artifact or plan to obtain a deterministic critique.
Instructions
Run a structured, tool-free Grok review of an artifact or plan.
Use this when a client needs a deterministic critique shape rather than a
full agent run. It calls xAI structured outputs through the shared
_parse_structured helper, so the reflection pass cannot invoke local
tools and degrades explicitly if structured parsing is unavailable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | grok-4.3 | |
| context | No | ||
| subject | Yes | ||
| criteria | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the reflection was successful. | |
| text | No | Human-formatted output (includes footers, citations, cost summary). | |
| model | Yes | Actual executing model ID (e.g. 'grok-4.5'). | |
| plane | No | API | |
| route | Yes | High-level route (fast/agentic/research/etc.). | |
| tokens | No | Total tokens consumed. | |
| profile | No | Internal routing profile. | |
| cost_usd | No | Exact USD cost from xAI billing metadata. | |
| critique | Yes | Structured Grok reflection output (schema-enforced). | |
| response | Yes | Raw model output or primary content. | |
| citations | No | Native xAI/X citations with URL + snippet. | |
| latency_sec | No | ||
| finish_reason | No | unknown | |
| reasoning_effort | No | Grok 4.5+ native reasoning level. |