Skip to content

createHistoryManager

createHistoryManager<TMeta>(config): HistoryManager<TMeta>

Defined in: packages/engine/src/lib/history/history-manager.ts:150

Construct a HistoryManager from the given config. The passed-in HistoryStore is the only persistence boundary; this manager adds per-session mutual exclusion (for recordTurn), truncation policy, and the default LLM-context projection on top.

Most consumers should let createEngine wire this up via EngineConfig.history. Construct directly only when assembling a custom engine pipeline that needs the manager outside createEngine.

TMeta = unknown

HistoryConfig<TMeta>

HistoryManager<TMeta>