Detect Intent
Detects user intent from text input and extracts relevant parameters for downstream routing.
Detects the user's intent in text against an intent catalog (inline and/or from a knowledge resource) and routes to detected or unknown, with extracted parameters.
This operator classifies input text against a configurable intent catalog, producing a primary intent, confidence score, extracted parameters, and routing hints for workflow orchestration.
Operations
- Intent Detection: Matches text against a catalog of named intents with descriptions and examples.
- Parameter Extraction: Extracts key-value slot parameters relevant to the detected intent.
- Routing: Provides routing hints to guide downstream workflow branching.
Use Cases
- Chatbot message routing based on user intent (e.g., "book_appointment", "check_status", "complaint").
- Email triage and automatic categorization by purpose.
- Command Center input classification for explicit vs. inference-assisted execution.
- Multi-channel intake routing with confidence-based human review escalation.
How it works
- Merges the upstream payload with the node config (config wins) and reads
text,contextandchannel; throwsMissing 'text'whentextis empty. - Collects intents from
intents(items needname) and adds those incontent.structured_data.intentsofknowledge_resource_idwhose name is not already present (case-insensitive). Fails when none remain. - Sends a classifier system prompt with the catalog, the threshold and a strict JSON format; the user message joins
Channel:,Context:andtext;temperature: 0. - Parses the answer as JSON.
primary_intentis matched case-insensitively to the catalog; any other value becomesunknown. Every catalog intent missing fromall_intentsis added with confidence 0. needs_reviewis the model's value or, when missing,confidence < confidence_threshold. Routes todetectedunless the intent isunknown.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-detect-intent",
"label": "Detect intent",
"operator_slug": "ai.intent",
"operator_version": "1.0.0",
"config": {
"text": "{{ $json.message }}",
"channel": "chat",
"intents": [
{
"name": "track_order",
"description": "The user wants to know where an order is",
"examples": "where is my order, tracking number"
},
{
"name": "cancel_order",
"description": "The user wants to cancel an order"
},
{
"name": "refund",
"description": "The user asks for money back"
}
],
"allow_multiple": false,
"confidence_threshold": 0.7,
"language": "en",
"llm_provider_id": "wf-llm-provider-xxxx",
"invocation_mode": "sync"
}
}{
"ok": true,
"data": {
"primary_intent": "track_order",
"confidence": 0.92,
"all_intents": [
{
"intent": "track_order",
"confidence": 0.92
},
{
"intent": "cancel_order",
"confidence": 0.05
},
{
"intent": "refund",
"confidence": 0.03
}
],
"parameters": {
"order_id": "4521"
},
"routing_hint": "order-status-flow",
"needs_review": false,
"raw": null,
"port": "detected"
},
"port": "detected"
}Configuration
-
llm_provider_idstring Optional -
The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.
-
invocation_modestring Optional -
Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.
-
timeout_msinteger Optional -
Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.
-
intentsarray<object> Optional -
Define the intents to detect. Each needs a name and description.
-
allow_multipleboolean Optional -
Allow detecting multiple intents in a single input.
-
confidence_thresholdnumber Optional -
Flag as needs_review when confidence falls below this threshold.
-
knowledge_resource_idstring Optional -
Load intent catalog from a Knowledge Resource instead of inline config.
-
languagestring Optional -
Output language code (e.g., "en", "es").
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
confidence_threshold - Does not change the port: a low-confidence catalog intent still goes to
detected. It only setsneeds_reviewwhen the model omits it. -
text, context, channel - Not in the config schema (it is in the input contract), but read from the config first and then from the upstream payload.
-
timeout_ms - Stream mode only: idle timeout between chunks, default 600000. In sync mode it is not applied to the request.
-
execution - Declared but ignored: neither the worker nor the engine reads
retryOnFail,maxTries,waitBetweenTries,continueOnFail,alwaysOutputDataortimeout_msfrom this block.
Output ports
detected default The primary intent is a catalog intent, whatever its confidence. Check needs_review for low confidence.
{
"primary_intent": "track_order",
"confidence": 0.92,
"all_intents": [
{
"intent": "track_order",
"confidence": 0.92
},
{
"intent": "cancel_order",
"confidence": 0.05
},
{
"intent": "refund",
"confidence": 0.03
}
],
"parameters": {
"order_id": "4521"
},
"routing_hint": "order-status-flow",
"needs_review": false,
"raw": null,
"port": "detected"
}unknown The model answered unknown, no intent, or a name outside the catalog.
{
"primary_intent": "unknown",
"confidence": 0.2,
"all_intents": [
{
"intent": "track_order",
"confidence": 0.1
},
{
"intent": "cancel_order",
"confidence": 0.05
},
{
"intent": "refund",
"confidence": 0.05
}
],
"parameters": {},
"routing_hint": null,
"needs_review": true,
"raw": null,
"port": "unknown"
}error text or the catalog is missing, the model call failed or the answer was not JSON.
{
"error": "Model did not return valid JSON output"
}In expressions
What a later node can read from this node's output with $("Detect Intent").item.json.<path> (write your node's label instead of Detect Intent). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through detected, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Detect Intent").item.json.primary_intentThe detected primary intent name or "unknown". | ||
$("Detect Intent").item.json.confidenceConfidence score (0-1) for the primary intent. | ||
$("Detect Intent").item.json.all_intentsProbability distribution across all catalog intents. | ||
$("Detect Intent").item.json.parametersExtracted key-value parameters relevant to the intent. | ||
$("Detect Intent").item.json.routing_hintSuggested next action or routing target. | ||
$("Detect Intent").item.json.needs_reviewTrue when confidence is below the threshold. | ||
$("Detect Intent").item.json.parameters.order_id | — | |
$("Detect Intent").item.json.raw | — | |
$("Detect Intent").item.json.port | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Missing 'text' | error | No text in the config or the upstream payload. |
No intents found. Provide intents in the config or link a Knowledge Resource with an intent catalog. | error | Neither intents nor the resource provides an intent with a name. If there are no inline intents and the resource fetch fails, that fetch error is returned instead. |
Model did not return valid JSON output | error | The answer could not be parsed as a JSON object. |
[AiIntent] Missing 'llm_provider_id' in node config (LlmProviderModel.id, e.g. 'wf-llm-provider-*'). The legacy 'model_id' alias is no longer supported — update the node config to use 'llm_provider_id'. | error | llm_provider_id is empty or not a string. Pick an LLM provider record with chat capability. |
LLM Invocation Error: <backend message> | error | The backend rejected the call: unknown or inactive provider record, provider error, quota or content filter. Check the provider record and the backend logs. |
LLM Invocation Error: empty response from backend (<transport error>) | error | Sync mode: the HTTP call to the backend failed (network error, non-2xx status or timeout). Long prompts often hit the request timeout; switch to invocation_mode: "stream". |
RemoteApiService.stream: idle timeout after <timeout_ms>ms | error | Stream mode: no chunk arrived within timeout_ms. A failed stream request shows RemoteApiService.stream: HTTP <status> — <body> instead. |
Input contract
-
textstring Required -
The text input to analyze for intent.
-
contextstring Optional -
Optional conversation or session context.
-
channelstring Optional -
Optional channel identifier (chat, email, api, etc.).
Output contract
-
primary_intentstring Optional -
The detected primary intent name or "unknown".
-
confidencenumber Optional -
Confidence score (0-1) for the primary intent.
-
all_intentsarray<object> Optional -
Probability distribution across all catalog intents.
-
parametersobject Optional -
Extracted key-value parameters relevant to the intent.
-
routing_hintstring Optional -
Suggested next action or routing target.
-
needs_reviewboolean Optional -
True when confidence is below the threshold.
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "ai.intent",
"name": "Detect Intent",
"category": "ai",
"version": "1.0.0",
"description": "Detects user intent from text input and extracts relevant parameters for downstream routing.\n\nThis operator classifies input text against a configurable intent catalog, producing a primary intent, confidence score, extracted parameters, and routing hints for workflow orchestration.\n\n**Operations**\n- **Intent Detection:** Matches text against a catalog of named intents with descriptions and examples.\n- **Parameter Extraction:** Extracts key-value slot parameters relevant to the detected intent.\n- **Routing:** Provides routing hints to guide downstream workflow branching.\n\n**Use Cases**\n- Chatbot message routing based on user intent (e.g., \"book_appointment\", \"check_status\", \"complaint\").\n- Email triage and automatic categorization by purpose.\n- Command Center input classification for explicit vs. inference-assisted execution.\n- Multi-channel intake routing with confidence-based human review escalation.",
"capabilities": [
"ai",
"nlp",
"intent",
"classification",
"routing"
],
"knowledge_binding": {
"enabled": true,
"resource_types": [
"intent_catalog"
],
"field": "knowledge_resource_id",
"label": "Intent Catalog"
},
"config_schema": {
"type": "object",
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.",
"x-ui-widget": "llm-provider-picker",
"x-llm-provider-capabilities": [
"chat"
]
},
"invocation_mode": {
"type": "string",
"title": "Invocation Mode",
"description": "Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.",
"enum": [
"sync",
"stream"
],
"default": "sync"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.",
"minimum": 1000
},
"intents": {
"type": "array",
"title": "Intent Catalog",
"description": "Define the intents to detect. Each needs a name and description.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Intent Name"
},
"description": {
"type": "string",
"title": "Description"
},
"examples": {
"type": "string",
"title": "Example Phrases"
}
},
"required": [
"name",
"description"
]
},
"default": []
},
"allow_multiple": {
"type": "boolean",
"title": "Allow Multiple Intents",
"description": "Allow detecting multiple intents in a single input.",
"default": false
},
"confidence_threshold": {
"type": "number",
"title": "Confidence Threshold",
"description": "Flag as needs_review when confidence falls below this threshold.",
"default": 0.7,
"minimum": 0,
"maximum": 1
},
"knowledge_resource_id": {
"type": "string",
"title": "Intent Catalog (Knowledge Resource)",
"description": "Load intent catalog from a Knowledge Resource instead of inline config.",
"ui_widget": "knowledge_resource_picker"
},
"language": {
"type": "string",
"title": "Language",
"description": "Output language code (e.g., \"en\", \"es\").",
"default": "en"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The text input to analyze for intent."
},
"context": {
"type": "string",
"description": "Optional conversation or session context."
},
"channel": {
"type": "string",
"description": "Optional channel identifier (chat, email, api, etc.)."
}
},
"required": [
"text"
]
},
"output_contract_schema": {
"type": "object",
"properties": {
"primary_intent": {
"type": "string",
"description": "The detected primary intent name or \"unknown\"."
},
"confidence": {
"type": "number",
"description": "Confidence score (0-1) for the primary intent."
},
"all_intents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"description": "Probability distribution across all catalog intents."
},
"parameters": {
"type": "object",
"description": "Extracted key-value parameters relevant to the intent."
},
"routing_hint": {
"type": "string",
"description": "Suggested next action or routing target."
},
"needs_review": {
"type": "boolean",
"description": "True when confidence is below the threshold."
}
}
},
"ports": [
{
"port_id": "detected",
"label": "Detected",
"is_default": true
},
{
"port_id": "unknown",
"label": "Unknown"
},
{
"port_id": "error",
"label": "Error"
}
],
"execution_mode": "async",
"tags": [
"ai",
"nlp",
"intent",
"routing",
"classification"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"llm_provider_id": {
"type": "string",
"title": "LLM Provider",
"description": "The `id` of a `LlmProviderModel` record (e.g. `wf-llm-provider-*`). The orchestrator delegates to the backend: `POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` for sync mode, or `POST /chat/conversation/execute/stream-ephemeral` (SSE) for stream mode. The backend resolves endpoint + api-key + deployment from the record and routes to the correct adapter.",
"x-ui-widget": "llm-provider-picker",
"x-llm-provider-capabilities": [
"chat"
]
},
"invocation_mode": {
"type": "string",
"title": "Invocation Mode",
"description": "Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.",
"enum": [
"sync",
"stream"
],
"default": "sync"
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Maximum time to wait for the invocation to complete (or idle timeout between chunks in stream mode). Default 30000 for sync, 600000 for stream.",
"minimum": 1000
},
"intents": {
"type": "array",
"title": "Intent Catalog",
"description": "Define the intents to detect. Each needs a name and description.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Intent Name"
},
"description": {
"type": "string",
"title": "Description"
},
"examples": {
"type": "string",
"title": "Example Phrases"
}
},
"required": [
"name",
"description"
]
},
"default": []
},
"allow_multiple": {
"type": "boolean",
"title": "Allow Multiple Intents",
"description": "Allow detecting multiple intents in a single input.",
"default": false
},
"confidence_threshold": {
"type": "number",
"title": "Confidence Threshold",
"description": "Flag as needs_review when confidence falls below this threshold.",
"default": 0.7,
"minimum": 0,
"maximum": 1
},
"knowledge_resource_id": {
"type": "string",
"title": "Intent Catalog (Knowledge Resource)",
"description": "Load intent catalog from a Knowledge Resource instead of inline config.",
"ui_widget": "knowledge_resource_picker"
},
"language": {
"type": "string",
"title": "Language",
"description": "Output language code (e.g., \"en\", \"es\").",
"default": "en"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The text input to analyze for intent."
},
"context": {
"type": "string",
"description": "Optional conversation or session context."
},
"channel": {
"type": "string",
"description": "Optional channel identifier (chat, email, api, etc.)."
}
},
"required": [
"text"
]
}{
"type": "object",
"properties": {
"primary_intent": {
"type": "string",
"description": "The detected primary intent name or \"unknown\"."
},
"confidence": {
"type": "number",
"description": "Confidence score (0-1) for the primary intent."
},
"all_intents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"intent": {
"type": "string"
},
"confidence": {
"type": "number"
}
}
},
"description": "Probability distribution across all catalog intents."
},
"parameters": {
"type": "object",
"description": "Extracted key-value parameters relevant to the intent."
},
"routing_hint": {
"type": "string",
"description": "Suggested next action or routing target."
},
"needs_review": {
"type": "boolean",
"description": "True when confidence is below the threshold."
}
}
}[
{
"port_id": "detected",
"label": "Detected",
"is_default": true
},
{
"port_id": "unknown",
"label": "Unknown"
},
{
"port_id": "error",
"label": "Error"
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
ainlpintentclassificationrouting- Tags
ainlpintentroutingclassification
Notes and limits
- The model is asked for
reasoning, but it is not returned.parametersis passed through from the model as an object. - The worker returns its fields at the top level instead of inside
data, so the engine stores the whole return value as the node output:portandrawappear in$jsonnext to the result fields. rawis the provider's raw response in sync mode andnullin stream mode.- The model call goes through the Sommatic AI backend, which resolves the provider record named by
llm_provider_id(endpoint, credentials, deployment); the orchestrator never holds provider keys.invocation_mode: "sync"(default) waits for the full answer;"stream"reads it as server-sent events and joins the chunks. timeout_msonly takes effect in stream mode, as the idle time allowed between chunks (default 600000). In sync mode the value is logged but not applied to the HTTP request, so the platform's default request timeout governs.- In stream mode the backend endpoint does not apply sampling settings, so the fixed
temperature: 0only takes effect in sync mode. - The knowledge resource is read from the backend on every run (10 s timeout). A resource whose status is not
activeis used anyway, with a warning in the log. - No automatic retries: the engine does not honour
execution.retryOnFail,maxTriesorwaitBetweenTriesfor this node; a failed call goes straight toerror.
Reviewed against the orchestrator code · 31e874b · 2026-11-26