Reference · Tools

Grok Reasoning

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

Action AI v1

Grok Reasoning uses xAI's chain-of-thought models, which reason internally before producing an answer, and returns both the response and the reasoning content. It suits multi-step logic, mathematical work and code analysis where deliberation improves the result. A typical build is auditing a proposed change and surfacing the reasoning next to the verdict for a human to check.

Node type
Action
Parameters
7
Outputs
Output, Error
Credentials
xAI

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

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires xAI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoPlatform defaultThe 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 PromptstringNoSystem-level instructions for the model. Supports expressions like {{ $json.persona }}.
User MessagestringYesThe user message or prompt to send. Falls back to item.json.message or item.json.prompt if empty. Supports expressions.
Reasoning EffortoptionsNomediumHow 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)
OptionscollectionNo{}Optional output and token settings — add only the fields you want to override.
— Max TokensnumberNo16384Maximum number of tokens in the model response.
— Response Field NamestringNoresponseThe output field name where the model response text will be stored.
Include InputbooleanNofalseWhether to include the original input item fields in the output.
Max ConcurrencynumberNo10Maximum 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:

{
  "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:

{
  "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:

{
  "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

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes 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.

Frequently asked questions

How is this different from Grok Chat?

The reasoning models deliberate before answering and return the reasoning content alongside the response. Grok Chat answers directly, which is faster and cheaper for straightforward generation.

Can I see the model's reasoning?

Yes — reasoning content comes back on the output with the response text and token usage, so it can be logged, reviewed or used to gate a decision.

When is this the wrong choice?

For summarising, rewriting, extraction or classification, where a direct call gives the same quality for less time and money. Reasoning models earn their cost on genuinely multi-step problems.

What affects the cost of a run?

Reasoning consumes tokens before the answer is produced, so token usage on the output is worth watching — a reasoning call is meaningfully more expensive than the equivalent chat call.

Build with the Grok Reasoning node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need xAI credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.