Search all guides

Reference · Tools

Grok Reasoning

Perform complex multi-step tasks with xAI Grok models that generate internal chain-of-thought reasoning before responding, including optional web and X search.

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.

Works as
Action
Tool name
grok_reasoning
Parameters
11
Outputs
Output, Error
Credentials
xAI
Official docs
xAI docs docs.x.ai

What you can build with Grok Reasoning

  • 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.

Each of these runs as a step in a BusyBot workflow or inside an agent, so the result can be routed, filtered and sent on with the core nodes and any of the communication integrations.

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.

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 PromptstringNo—System-level instructions for the model. Supports expressions like {{ $json.persona }}.
User MessagestringYes—The 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.
Web SearchbooleanNofalseEnable xAI’s server-side search tools. When on, Grok may search before answering and returns cited sources in the sources output field.
Search SourcesmultiOptionsNo["web"]Which xAI search surfaces Grok may use. Select both to let Grok choose per query. (shown when Web Search is on)
Options: web (public web via the xAI web_search tool), x (X/Twitter posts via the x_search tool)
Search From DatestringNo—Only consider results published on or after this date. Accepts YYYY-MM-DD or a full ISO timestamp. Leave empty for no lower bound. Supports expressions. (shown when Web Search is on)
Search To DatestringNo—Only consider results published on or before this date. Accepts YYYY-MM-DD or a full ISO timestamp. Leave empty for no upper bound. Supports expressions. (shown when Web Search is on)
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 }}.

  • sources is always present: an array of cited results when Web Search is on, and an empty array when it is off. Each entry carries url and title.
  • usage now carries both naming schemes. prompt_tokens / completion_tokens / total_tokens are kept as aliases so existing expressions keep working, alongside the Responses API’s own input_tokens / output_tokens / num_server_side_tools_used.
  • finishReason keeps the familiar stop / length / content_filter / tool_calls vocabulary. The raw Responses values are exposed additively as status and incompleteReason.
  • Frequency Penalty and Presence Penalty were removed. The Responses API has no equivalent and silently ignores them, so they were retired rather than left as controls that do nothing. Saved workflows carrying those keys keep running — the values are simply ignored.

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 solves complex multi-step problems using an xAI Grok model. This tool is ideal for tasks requiring structured deliberation, such as math, coding, logic, and analytical challenges, rather than direct generation. It produces the model’s response, a reasoning trace, cited sources, and token usage details.

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 reviewed . Spotted something wrong? Tell us.