Optional
filterDetermines whether a message should be included in the history iteration.
The message to evaluate.
The client ID.
The name of the agent.
Whether the message passes the filter.
Fetches initial history data for an agent.
The client ID.
The name of the agent.
The initial array of history messages.
Optional
getRetrieves dynamic system prompt messages for an agent.
The client ID.
The name of the agent.
An array of system prompt message contents.
Called when the history array changes (e.g., after push or pop).
The updated array of history messages.
The client ID.
The name of the agent.
Called when the history instance is disposed.
The client ID.
Called when the history instance is initialized.
The client ID.
Called when the last message is popped from the history.
The popped message, or null if the history is empty.
The client ID.
The name of the agent.
Called when a new message is pushed to the history.
The newly pushed message.
The client ID.
The name of the agent.
Called for each message during iteration when reading.
The current message being read.
The client ID.
The name of the agent.
Called at the start of a history read operation.
The client ID.
The name of the agent.
Called at the end of a history read operation.
The client ID.
The name of the agent.
Provides a reference to the history instance after creation.
The history instance.
Callbacks for managing history instance lifecycle and message handling.