The unique identifier of the client session whose raw history is to be retrieved.
Optional
methodName: anyThe name of the calling method, used for validation and logging (defaults to METHOD_NAME
).
A promise that resolves to an array containing the raw history entries.
Retrieves the raw, unmodified history for a given client session.
This function fetches the complete history associated with a client’s active agent in a swarm session, without any filtering or modifications. It is wrapped in
beginContext
for a clean execution environment and logs the operation if enabled viaGLOBAL_CONFIG
. The function validates the session and swarm, retrieves the current agent, and useshistoryPublicService.toArrayForRaw
to obtain the raw history as an array. The result is a fresh copy of the history array.Throws
If session or swarm validation fails, or if history retrieval encounters an issue.
Example