Skip to main content

Conversation history

Pipelines do not hold global conversation state. Use explicit history for stateless calls or create one session for each conversation.

Pass history explicitly

The pipeline copies message dictionaries before sending them to the LLM and does not mutate the caller’s sequence.

Use a classic session

history returns a detached immutable snapshot. Mutating a returned message does not mutate committed session state.

Stream within a session

A streamed turn is committed only after the iterator is fully consumed. A generation failure, streaming failure, or abandoned stream leaves history unchanged.

Initialize and clear a session

clear() removes messages without changing the session ID.

Concurrency

Operations inside one session are serialized so a turn observes complete history. Separate sessions do not share history or a session lock and may reuse the same configured pipeline.

Limit retained history

RAGLight does not silently truncate conversation state. Apply an application policy before creating a session or before passing explicit history:
The same ownership rules apply to sessions returned by AgenticPipeline.