Skip to content

Summarizer node

Summarizer node keeps an agent from losing track in long conversations. When the history goes over the size you set, it summarises the older messages with an AI model and the agent receives that summary together with the most recent messages. Each new summary extends the previous one with what has been said since.

It does not work on its own: it connects to the Summarizer input of the older Agent component (the one with the Summarize memory option). That input appears when you turn on Summarize memory in its advanced options.

When to use it

  • Assistants with long conversations, such as technical support that follows a customer through a whole incident.
  • Reducing what the agent sends to the model with each message without forgetting what has already been said.

Configuration

ConnectionWhat to connect
Model (bottom connector)The AI model that writes the summaries. It is needed for the component to work.
FieldWhat it does
Initial Summarization PromptThe instruction for writing the first summary. Default: “Create a summary of the conversation above:”.
Existing Summarization PromptThe instruction for extending an existing summary with the new messages. It must include {existing_summary}, where the previous summary goes.
Default Final PromptHow the summary is presented to the agent before the recent messages. It must include {summary}. Default: “Summary of the conversation so far: {summary}”.

Advanced options

FieldWhat it does
Output Messages Keyllm_input_messages (default): the summary is only used for what the model receives, and the stored history is kept in full. messages: the stored history is replaced with the summary and the recent messages.
Max TokensThe maximum size, in tokens, of what the model receives, adding up the summary and the messages. Above it, the conversation is summarised. Default: 1024.
Max Summary TokensThe maximum size of the summary, in tokens. Default: 256.

Output

  • SummarizeNode: the configured summariser. Connect it to the agent’s Summarizer input.

Example

An online sports equipment shop has an after-sales assistant whose conversations go on for days:

  1. In the assistant’s Agent component, turn on Summarize memory in the advanced options.
  2. Add Summarizer node and connect an AI model to its bottom connector.
  3. Raise Max Tokens to 4000 so summarising only kicks in for long conversations.
  4. Connect the SummarizeNode output to the agent’s Summarizer input.

As the conversation grows, the agent still knows which order the complaint was about and what the customer was offered, without receiving every message.

Good practices

  • Leave Output Messages Key set to llm_input_messages if you want to keep the full conversation history.
  • If summaries lose important details, raise Max Summary Tokens or say in Initial Summarization Prompt which details must be kept (order numbers, dates, agreements).
  • Agent: NappAI’s main agent, which manages its memory without needing this component.
  • Summarizer: summarises standalone texts within a flow.