function recordEvent({ agent, type, msg }) {
  const llmContext = extractLlmContext(agent)

  agent.customEventAggregator.add([
    { type, timestamp: Date.now() },
    Object.assign({}, msg, llmContext)
  ])
}
Enqueues a LLM event to the custom event aggregator

@param {object} params input params
@param {Agent} params.agent NR agent instance
@param {string} params.type LLM event type
@param {object} params.msg LLM event