On this page
Sommatic Docs
Open portal

Summarize Text

Multi-format text summarization powered by LLM.

View as Markdown
Open in
AI Available ai.summarize Version 1.0.0 Execution: async

Summarizes text with the LLM in one of five modes (executive, bullets, abstractive, extractive, structured) and returns the summary with its word count and compression ratio.

This operator condenses input text into a summary using one of several modes.

Operations

  • Executive: 2-3 sentence high-level summary for decision-makers.
  • Bullets: Key points as a bullet-point list.
  • Abstractive: Condensed rewrite preserving core meaning.
  • Extractive: Selects the most important original sentences.
  • Structured: Produces a JSON object with overview, key_findings, action_items, and risks_concerns sections.

Use Cases

  • Condensing meeting transcripts or reports for stakeholders.
  • Generating bullet-point digests for dashboards and notifications.
  • Producing structured summaries for downstream workflow processing.

How it works

  1. Resolves the node config: expressions in config keys are evaluated against the run; the incoming item is used as-is.
  2. Merges the incoming item with the resolved config (config keys win) and reads the inputs from the result.
  3. Requires text. Builds the instruction for summary_mode (default executive; unknown modes use it), adding max_length, focus_areas and a language line when language is not en.
  4. The user message is Title: …, Context: … (when present) and Text: ….
  5. Calls the LLM through the backend with the llm_provider_id record. invocation_mode: "sync" (default) waits for the full answer; "stream" reads it over SSE and joins the chunks.
  6. In structured mode parses the JSON answer into sections; if it is not JSON, the raw text becomes summary and sections is null. In other modes the answer text is the summary.
  7. Counts words (split on whitespace) and computes compression_ratio = summary words / input words. Routes to success.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-summarize",
  "label": "Summarize thread",
  "operator_slug": "ai.summarize",
  "operator_version": "1.0.0",
  "config": {
    "llm_provider_id": "<llm_provider_id>",
    "summary_mode": "executive",
    "max_length": 60,
    "language": "en",
    "focus_areas": [
      "deadlines",
      "costs"
    ]
  }
}

Configuration

llm_provider_id string 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_mode string Optional

Transport for the LLM call. `sync` blocks until the full response arrives. `stream` consumes tokens via SSE (required for long generations). Default `sync`.

Default: sync

Allowed values: syncstream

timeout_ms integer 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.

summary_mode string Optional

The summarization strategy to apply.

Default: executive

Allowed values: executivebulletsabstractiveextractivestructured

max_length number Optional

Target maximum words for the summary (optional).

max_bullets number Optional

Maximum number of bullet points (bullets mode only).

Default: 5

Shown when: summary_mode = bullets

language string Optional

Output language code (e.g., "en", "es").

Default: en

focus_areas array<string> Optional

Topics or themes to prioritize in the summary (optional).

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.

llm_provider_id
Required at runtime although the schema does not mark it as required. It is the id of an LLM provider record; the backend resolves endpoint, deployment and credentials from it.
summary_mode
Temperatures: extractive 0, abstractive 0.3, the rest 0.2. Only structured fills sections and key_phrases (copied from key_findings); the other modes return sections: null and key_phrases: [].
max_bullets
Default 5. Also sets the number of sentences selected in extractive mode, although the schema shows it only for bullets.
max_length
A prompt hint in words; the output is not truncated.
timeout_ms
timeout_ms only takes effect in stream mode, as the idle time allowed between chunks (default 600000). In sync mode it is logged but the backend request has no timeout.

Output ports

success default

The LLM answered. The worker returns the fields at the top level, so data also includes raw and port.

Data
{
  "summary": "The supplier will deliver the missing pallets on Friday. Finance must approve the extra freight cost before Thursday.",
  "sections": null,
  "key_phrases": [],
  "word_count": 18,
  "compression_ratio": 0.12,
  "raw": null,
  "port": "success"
}
error

Validation, the LLM call or parsing failed. data is { error } (plus response when the backend returned a body).

Data
{
  "error": "Missing 'text'"
}

In expressions

What a later node can read from this node's output with $("Summarize Text").item.json.<path> (write your node's label instead of Summarize Text). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through success, from the output shown in Ports.

ExpressionEditorWorker
$("Summarize Text").item.json.summarystring= "The supplier will deliver the missing pallet…"The generated summary text.
$("Summarize Text").item.json.sectionsobject= nullStructured sections (structured mode only).
$("Summarize Text").item.json.key_phrasesarray= […] (0)Key phrases detected in the text (when available).
$("Summarize Text").item.json.word_countnumber= 18Word count of the summary.
$("Summarize Text").item.json.compression_rationumber= 0.12Ratio of summary words to original words (0-1).
$("Summarize Text").item.json.rawnullNot suggested by the editor= null—
$("Summarize Text").item.json.portstringNot suggested by the editor= "success"—

— 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 The incoming item has no text.
[AiSummarize] Missing 'llm_provider_id' in node config (LlmProviderModel.id, e.g. 'wf-llm-provider-*'). … error The node has no llm_provider_id. Pick an LLM provider in the node config; the legacy model_id key is not accepted.
LLM Invocation Error: <backend message> error The backend rejected the call (unknown or inactive provider record, provider error, credentials). Check the provider record.
LLM Invocation Error: empty response from backend (<reason>). error The backend could not be reached or returned nothing in sync mode.
RemoteApiService.stream: idle timeout after <timeout_ms>ms error In stream mode no chunk arrived within timeout_ms.

Input contract

text string Required

The text content to summarize.

title string Optional

Optional title or heading for context.

context string Optional

Optional background context to inform the summary.

Output contract

summary string Optional

The generated summary text.

sections object Optional

Structured sections (structured mode only).

key_phrases array<string> Optional

Key phrases detected in the text (when available).

word_count number Optional

Word count of the summary.

compression_ratio number Optional

Ratio of summary words to original words (0-1).

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.summarize",
  "name": "Summarize Text",
  "category": "ai",
  "version": "1.0.0",
  "description": "Multi-format text summarization powered by LLM.\n\nThis operator condenses input text into a summary using one of several modes.\n\n**Operations**\n- **Executive:** 2-3 sentence high-level summary for decision-makers.\n- **Bullets:** Key points as a bullet-point list.\n- **Abstractive:** Condensed rewrite preserving core meaning.\n- **Extractive:** Selects the most important original sentences.\n- **Structured:** Produces a JSON object with overview, key_findings, action_items, and risks_concerns sections.\n\n**Use Cases**\n- Condensing meeting transcripts or reports for stakeholders.\n- Generating bullet-point digests for dashboards and notifications.\n- Producing structured summaries for downstream workflow processing.",
  "capabilities": [
    "ai",
    "nlp",
    "summarization",
    "text"
  ],
  "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
      },
      "summary_mode": {
        "type": "string",
        "title": "Summary Mode",
        "description": "The summarization strategy to apply.",
        "enum": [
          "executive",
          "bullets",
          "abstractive",
          "extractive",
          "structured"
        ],
        "default": "executive"
      },
      "max_length": {
        "type": "number",
        "title": "Max Length (words)",
        "description": "Target maximum words for the summary (optional)."
      },
      "max_bullets": {
        "type": "number",
        "title": "Max Bullets",
        "description": "Maximum number of bullet points (bullets mode only).",
        "default": 5,
        "displayOptions": {
          "show": {
            "summary_mode": [
              "bullets"
            ]
          }
        }
      },
      "language": {
        "type": "string",
        "title": "Language",
        "description": "Output language code (e.g., \"en\", \"es\").",
        "default": "en"
      },
      "focus_areas": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "title": "Focus Areas",
        "description": "Topics or themes to prioritize in the summary (optional)."
      },
      "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 content to summarize."
      },
      "title": {
        "type": "string",
        "description": "Optional title or heading for context."
      },
      "context": {
        "type": "string",
        "description": "Optional background context to inform the summary."
      }
    },
    "required": [
      "text"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "summary": {
        "type": "string",
        "description": "The generated summary text."
      },
      "sections": {
        "type": "object",
        "description": "Structured sections (structured mode only)."
      },
      "key_phrases": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Key phrases detected in the text (when available)."
      },
      "word_count": {
        "type": "number",
        "description": "Word count of the summary."
      },
      "compression_ratio": {
        "type": "number",
        "description": "Ratio of summary words to original words (0-1)."
      }
    }
  },
  "ports": [
    {
      "port_id": "success",
      "label": "Summarized",
      "is_default": true
    },
    {
      "port_id": "error",
      "label": "Error"
    }
  ],
  "execution_mode": "async",
  "tags": [
    "ai",
    "nlp",
    "summarize",
    "text"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://me.veripass.com/sommatic",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
No
Capabilities
ainlpsummarizationtext
Tags
ainlpsummarizetext

Notes and limits

  • Input fields are read from the incoming item ($json). A key with the same name in the node config, which may be an expression, takes precedence over the input.
  • timeout_ms only takes effect in stream mode, as the idle time allowed between chunks (default 600000). In sync mode it is logged but the backend request has no timeout.
  • In stream mode the temperature this node sets is not forwarded to the provider, and raw is null.
  • The engine does not apply execution.retryOnFail, maxTries, waitBetweenTries or continueOnFail to this node. Handle failures by wiring the error port.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs