IngestionSettings

constructor(storage: WriteStorage<TextDocument>, documentExtractor: DocumentExtractor = MessagePassingDocumentExtractor(), enableAutomaticIngestion: Boolean = true, namespace: String? = null, failurePolicy: FailurePolicy = FailurePolicy.LOG_AND_CONTINUE)(source)

Parameters

storage

The ingestion storage where memory records will be persisted.

documentExtractor

The extractor that defines how to transform messages into memory records. Pre-built ingesters are available:

enableAutomaticIngestion

When true (default), ingestion happens automatically on agent completion. When false, the storage is still accessible for manual use inside graph strategy nodes via ai.koog.agents.longtermmemory.feature.withLongTermMemory.

namespace

Namespace (table/collection name) for a request

failurePolicy

How to react to failures from storage when persisting records. Defaults to FailurePolicy.LOG_AND_CONTINUE so transient ingestion errors do not abort the agent run. Set to FailurePolicy.FAIL_FAST for durable audit/logging use cases where losing memory records is worse than failing the run.