Message Management
Message management components handle the storage and retrieval of chat messages and conversation history.
Message Store
This component stores chat messages or text in BroxiAI tables or external memory.
In this example, the Message Store component stores the complete chat history in a local BroxiAI table, which the Message History component retrieves as context for the LLM to answer each question.

Inputs
message
Message
The chat message to be stored. (Required)
memory
External Memory
The external memory to store the message. If empty, it will use the BroxiAI tables.
sender
Sender
The sender of the message. Can be Machine or User. If empty, the current sender parameter will be used.
sender_name
Sender Name
The name of the sender. Can be AI or User. If empty, the current sender parameter will be used.
session_id
Session ID
The session ID of the chat. If empty, the current session ID parameter will be used.
Outputs
stored_messages
Stored Messages
The list of stored messages after the current message has been added.
Message History
This component retrieves chat messages from BroxiAI tables or external memory.
In this example, the Message Store component stores the complete chat history in a local BroxiAi table, which the Message History component retrieves as context for the LLM to answer each question.

Inputs
memory
External Memory
Retrieve messages from an external memory. If empty, it will use the BroxiAI tables.
sender
Sender Type
Filter by sender type.
sender_name
Sender Name
Filter by sender name.
n_messages
Number of Messages
Number of messages to retrieve.
session_id
Session ID
The session ID of the chat. If empty, the current session ID parameter will be used.
order
Order
Order of the messages.
template
Template
The template to use for formatting the data. It can contain the keys {text}
, {sender}
or any other key in the message data.
Outputs
messages
Messages (Data)
Retrieved messages as Data objects.
messages_text
Messages (Text)
Retrieved messages formatted as text.
Usage Notes
Persistent Storage: Messages are stored persistently for conversation continuity
External Memory: Can integrate with external memory systems for advanced use cases
Session Management: Support for multiple chat sessions with unique session IDs
Flexible Retrieval: Various options for filtering and formatting retrieved messages
LangChain Integration: Built-in compatibility with LangChain memory systems
Last updated