<!-- BusyBot node reference — https://busybot.net/tools/grok-reasoning/ -->

> Node: Grok Reasoning (`grok_reasoning`) · Action · v1
> Category: AI · Credentials: xAI (`xai`)
> Updated: 2026-08-16

# Grok Reasoning

> Use xAI Grok reasoning models for complex multi-step tasks.

## Overview

Grok Reasoning uses xAI reasoning-capable models that perform internal chain-of-thought reasoning before producing a response, controlled by a reasoning-effort setting. These models are well-suited for math, coding, logic, and analytical tasks. Returns the model response along with reasoning content and token usage.

**Category:** AI  
**Tool Name:** `grok_reasoning`  
**Version:** 1

**Appearance:** Icon: `brain` | Color: `#000000`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **xAI** credentials.
See the [Credentials Guide](https://busybot.net/credentials/xai/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | Platform default | The Grok reasoning model to use. |
| | | | | Options: the Grok chat models currently available — the dropdown tracks the model catalog, so it changes as xAI's line-up changes. |
| System Prompt | `string` | No | — | System-level instructions for the model. Supports expressions like {{ $json.persona }}. |
| User Message | `string` | Yes | — | The user message or prompt to send. Falls back to item.json.message or item.json.prompt if empty. Supports expressions. |
| Reasoning Effort | `options` | No | `medium` | How much reasoning effort the model should spend. |
| | | | | Options: `low` (minimal reasoning — fastest responses, lowest cost), `medium` (balanced reasoning effort), `high` (maximum reasoning — best quality, higher cost and latency) |
| Options | `collection` | No | `{}` | Optional output and token settings — add only the fields you want to override. |
| — Max Tokens | `number` | No | `16384` | Maximum number of tokens in the model response. |
| — Response Field Name | `string` | No | `response` | The output field name where the model response text will be stored. |
| Include Input | `boolean` | No | `false` | Whether to include the original input item fields in the output. |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. The answer text is written to the field named by Response Field Name (`response` by default). The rest of the input JSON is carried over only when Include Input is on; binary data from the input item is forwarded.

- `response` — the model's final answer, under whatever name Response Field Name is set to.
- `reasoning` — the reasoning content the model produced before answering, when the model returns it.
- `model` — the model that produced the answer.
- `usage` — the token counts reported by xAI for the request, including reasoning tokens.
- `finishReason` — why generation stopped, as reported by xAI.

Reference the result downstream by expression, e.g. `{{ $json.response }}`.

## Usage Examples

- Solve a complex math problem with step-by-step reasoning
- Analyze code for bugs using Grok reasoning
- Reason through a multi-step logic puzzle
- Generate a detailed technical analysis
- Solve an optimization problem with chain-of-thought reasoning

## Example Configuration

Reason over a single question with the defaults:

```json
{
  "type": "grok_reasoning",
  "parameters": {
    "userMessage": "Explain the implications of Godel's incompleteness theorems for formal systems."
  }
}
```

Deep analysis with maximum reasoning effort and a custom output field:

```json
{
  "type": "grok_reasoning",
  "parameters": {
    "systemPrompt": "You are a senior systems analyst. Reason carefully and show your work.",
    "userMessage": "Identify the top three single points of failure in this architecture: {{ $json.architecture }}",
    "reasoningEffort": "high",
    "includeInput": true,
    "maxConcurrency": 5,
    "options": {
      "maxTokens": 16384,
      "responseFieldName": "analysis"
    }
  }
}
```

High-throughput ticket triage with minimal reasoning. Each item comes back with a single label — Bug, Feature Request or Question:

```json
{
  "type": "grok_reasoning",
  "parameters": {
    "systemPrompt": "Classify the input as exactly one of: Bug, Feature Request, Question. Reply with only the label.",
    "userMessage": "{{ $json.ticketBody }}",
    "reasoningEffort": "low",
    "includeInput": true,
    "maxConcurrency": 20,
    "options": {
      "maxTokens": 64,
      "responseFieldName": "category"
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Grok Reasoning submits prompts to xAI chain-of-thought models that perform internal reasoning before producing a final response. Use this tool when tasks involve multi-step logic, mathematical computation, or code analysis that benefits from structured deliberation rather than direct generation. It outputs a main channel containing the model response text, reasoning content, and token usage statistics, or routes failures to an error channel.