Add Message
v1.0.1Updated
Overview
Section titled “Overview”The Add Message operator injects a single message into a LOPs conversation table. Set a role (user, assistant, or system), enter or wire in text, toggle ‘Insert’ on, and the message appears in the output table. Commonly used to prepend system prompts, append user input, or build conversations from scratch before sending them to a Chat or Agent operator.
Input/Output
Section titled “Input/Output”Inputs
Section titled “Inputs”- Input 1 (Conversation Table DAT, optional): An existing conversation to build on. Must have columns:
role,message,id,timestamp. Enable ‘Use Input Conversation’ to include it in the output - Input 2 (Text DAT, optional): A DAT whose text content becomes the message body. Enable ‘Text From Dat [ in2 ]’ to use it instead of the ‘Message to Inject’ parameter
Outputs
Section titled “Outputs”- Output (Conversation Table DAT): The resulting conversation table containing any input conversation plus the injected message. Columns:
role,message,id,timestamp
Usage Examples
Section titled “Usage Examples”Adding a System Prompt to a Conversation
Section titled “Adding a System Prompt to a Conversation”- Wire your existing conversation table into the first input
- Toggle ‘Use Input Conversation’ to On
- Set ‘Message Role’ to
system - Enter your system prompt in ‘Message to Inject’
- Toggle ‘Insert’ to On
- Wire the output to your Chat or Agent operator
Building a Conversation from Scratch
Section titled “Building a Conversation from Scratch”- Leave ‘Use Input Conversation’ off — no input wire needed
- Set ‘Message Role’ to
user - Enter your message in ‘Message to Inject’
- Toggle ‘Insert’ to On
- The output contains a single-message conversation ready to wire downstream
Using a DAT as the Message Source
Section titled “Using a DAT as the Message Source”- Connect a Text DAT to the second input
- Toggle ‘Text From Dat [ in2 ]’ to On
- The DAT’s full text content is used as the message body, ignoring the ‘Message to Inject’ field
- This is useful for long prompts or dynamically generated text
Inserting at a Specific Position
Section titled “Inserting at a Specific Position”- Wire an existing conversation into the first input and enable ‘Use Input Conversation’
- Set ‘Inject Location’ to
index - Set ‘Insert Index’ to the row position where the message should appear
- Toggle ‘Insert’ to On — the message is inserted at that position, shifting later messages down
You can also set ‘Inject Location’ to start to always prepend the message before all existing messages, or leave it as end (default) to append after them.
Best Practices
Section titled “Best Practices”- Chain multiple Add Message operators to build multi-turn conversations — wire each output into the next input with ‘Use Input Conversation’ enabled
- Each operator auto-generates a unique ‘Inject ID’ on creation, which tags the message for tracking downstream. You can set a custom ID if needed
- When ‘Insert’ is off, the operator still passes through the input conversation (if enabled) without adding a message — useful for conditionally injecting
- Use ‘Inject Location’ set to
startwhen prepending system prompts to an existing conversation
Parameters
Section titled “Parameters”Inject Message
Section titled “Inject Message” Insert (Insert)
op('add_message').par.Insert Toggle - Default:
False
Message to Inject (Message)
op('add_message').par.Message Str - Default:
"" (Empty String)
Text From Dat [ in2 ] (Fromin2)
op('add_message').par.Fromin2 Toggle - Default:
False
Use Input Conversation (Useinput)
op('add_message').par.Useinput Toggle - Default:
False
Insert Index (Index)
op('add_message').par.Index Int - Default:
0- Range:
- 0 to 1
- Slider Range:
- 1 to 1
Inject ID (Injectid)
op('add_message').par.Injectid Str - Default:
"" (Empty String)
Header
Changelog
Section titled “Changelog”v1.0.12026-02-28
- Implement Inject Location parameter (start/index/end) for message insertion position
- Initial commit
v1.0.02025-01-13
Initial release