FileMemoryProvider Constructor

Definition

Initializes a new instance of the FileMemoryProvider class.

public FileMemoryProvider(Microsoft.Agents.AI.AgentFileStore fileStore, Func<Microsoft.Agents.AI.AgentSession?,Microsoft.Agents.AI.FileMemoryState>? stateInitializer = default, Microsoft.Agents.AI.FileMemoryProviderOptions? options = default);
new Microsoft.Agents.AI.FileMemoryProvider : Microsoft.Agents.AI.AgentFileStore * Func<Microsoft.Agents.AI.AgentSession, Microsoft.Agents.AI.FileMemoryState> * Microsoft.Agents.AI.FileMemoryProviderOptions -> Microsoft.Agents.AI.FileMemoryProvider
Public Sub New (fileStore As AgentFileStore, Optional stateInitializer As Func(Of AgentSession, FileMemoryState) = Nothing, Optional options As FileMemoryProviderOptions = Nothing)

Parameters

fileStore
AgentFileStore

The file store implementation used for storage operations.

stateInitializer
Func<AgentSession,FileMemoryState>

An optional function that initializes the FileMemoryState for a new session. Use this to customize the working folder (e.g., per-user or per-session subfolders). When null, the default initializer creates state with an empty working folder.

options
FileMemoryProviderOptions

Optional settings that control provider behavior. When null, defaults are used.

Exceptions

Thrown when fileStore is null.

Applies to