-
-
Notifications
You must be signed in to change notification settings - Fork 5
Delete Message Node
Vitor Lima edited this page Mar 19, 2026
·
1 revision
The Delete Message node permanently removes messages from the chat. Use it for cleanup tasks like removing old messages, clearing generated content, or managing conversation length.
| Input | Type | Required | Description |
|---|---|---|---|
| Message IDs | String | No | A single message ID or a JSON array of IDs to delete. |
| Chat History | Message List | No | A message list (from a Chat History node) — all messages in the list will be deleted. |
| Participant ID | String | No | Narrow the deletion to messages from a specific participant. |
This node has no outputs.
Click the settings icon to configure:
- Node Name — A label for this node.
-
Delete Mode:
- All — Delete all messages matching the filters.
- Last N — Delete only the last N matching messages.
- Count (when "Last N" is selected) — How many messages to delete.
-
Sender Filter — Which messages to target:
- Any — All message types.
- User — Only user messages.
- Character — Only character messages (excludes agent-generated ones).
- Agent — Only messages created by agents.
The node uses a priority system for determining which messages to delete:
- Chat History input — If a message list is connected, those exact messages are deleted.
- Message IDs input — If IDs are provided (as a string or JSON array), those specific messages are deleted.
- Config filters — If neither input is connected, the node uses its configured Delete Mode, Count, and Sender Filter to find messages. If a Participant ID is also connected, it further narrows the results.
- Be careful — deleted messages are gone permanently.
- Use the Sender Filter to target specific types. For example, "Agent" lets you clean up old agent-generated messages without touching user or character content.
- Combine with "Every X Messages" trigger to keep the chat from growing too large — periodically delete old messages beyond a certain depth.