Skip to main content
The Clear Conversation node removes data from the active conversation in the current workflow execution. You can selectively clear messages, metadata, state, or any combination of the three. Use it to reset a conversation before handing it to a new actor, to clean up after a completed interaction, or to start fresh within a long-running workflow.

When to use

  • Actor handoff reset — clear conversation history before a new actor takes over, so it starts with a clean slate
  • Long-running conversations — periodically clear old messages to keep the conversation context manageable for the LLM
  • Privacy and cleanup — remove sensitive data after it’s been processed
  • Conversation restart — let the user start over without creating a new conversation
Clear Conversation automatically finds the active conversation from the current workflow execution path. You don’t need to specify a conversation ID manually.

How it works

When executed, the Clear Conversation node:
  1. Finds the active conversation by scanning execution events in the current workflow branch
  2. Clears the selected sections from the conversation record in the database
  3. Returns a summary of what was cleared

What each section contains

SectionWhat it clearsWhen to clear it
MessagesAll conversation messages (user + assistant)Before an actor handoff so the new actor doesn’t see old history
MetadataConversation metadata (active actor info, actor history, custom data)When you want to fully reset actor tracking
StateSkillset Engine state (collected fields, conversation phase)When switching from one Communication Actor to another
Clearing metadata removes the active actor tracking. If a Communication Actor or LLM Actor is currently processing the conversation, clearing metadata may cause unexpected behavior. Use this between actors, not during an active actor session.

Example: clean handoff between actors

Clear history before a second actor takes over: The second actor starts fresh without seeing the first actor’s conversation, but the conversation ID remains the same so replies still come through.

Example: periodic cleanup in long conversations

For conversations that run over hours or days, clear old messages to keep the LLM context window manageable:

Example: full reset

Completely reset the conversation (messages + metadata + state):

Settings

clearMessages
boolean
default:"true"
Remove all conversation messages (user and assistant).
clearMetadata
boolean
default:"false"
Remove conversation metadata including active actor info and actor history.
clearState
boolean
default:"false"
Remove Skillset Engine state (collected field values, conversation phase, etc.).
At least one section must be selected. The node will fail if all three are unchecked.

Outputs

success
boolean
Whether the cleanup completed successfully.
conversationId
string
The ID of the conversation that was cleared.
clearedSections
array
List of sections that were cleared (e.g., ["messages", "state"]).
deletedMessagesCount
number
How many messages were removed (0 if messages were not cleared).

Communication Actor

Skillset-powered actor whose state can be reset with this node.

LLM Actor

LLM-powered actor — clear messages before handoff.

Send Message

Send a “starting fresh” message after clearing.

Channel Dispatcher

The channel node whose conversations this node clears.