Skip to content
Vitor Lima edited this page Mar 19, 2026 · 1 revision

The Chat History node retrieves messages from the current chat. Use it to feed conversation context into an LLM Agent or JavaScript node.

Inputs

Input Type Required Description
Participant ID String No Filter messages to only those from a specific participant. Leave unconnected to include messages from everyone.

Outputs

Output Description
Chat History A list of chat messages, filtered and limited by your configuration.

Configuration

Click the settings icon to configure:

  • Node Name — A label to help you identify this node on the canvas.
  • Message Depth — How many recent messages to retrieve (1–500). Default is 10. The node always takes the most recent messages.
  • Message Type — Filter by sender:
    • All Messages — Everything (default).
    • Assistant Only — Only character/AI responses.
    • User Only — Only what the user said.
    • System Only — Only system messages.

How It Works

  1. The node reads all messages from the active chat's current chapter.
  2. If a Participant ID is connected, it filters to only messages from that participant.
  3. It applies the Message Type filter from your configuration.
  4. It takes the last N messages based on the Depth setting.
  5. The resulting message list flows out.

Tips

  • The output is a Message List, not a string. Connect it to an LLM Agent's "Chat History" input or a JavaScript node for processing.
  • Depth controls token usage. More messages means more context for the AI, but also more tokens. Start with 10–20 and adjust based on your needs.
  • Combine with Participant Picker to get only one character's messages — useful for summarization or analysis tasks.

Clone this wiki locally