Language

DelegatingAgentSessionStore Class

Definition

Provides an abstract base class for agent session stores that delegate operations to an inner store instance while allowing for extensibility and customization.

public abstract class DelegatingAgentSessionStore : Microsoft.Agents.AI.Hosting.AgentSessionStore
type DelegatingAgentSessionStore = class
    inherit AgentSessionStore
Public MustInherit Class DelegatingAgentSessionStore
Inherits AgentSessionStore
Inheritance
DelegatingAgentSessionStore
Derived

Remarks

DelegatingAgentSessionStore implements the decorator pattern for AgentSessionStores, enabling the creation of pipelines where each layer can add functionality while delegating core operations to an underlying store.

The default implementation provides transparent pass-through behavior, forwarding all operations to the inner store. Derived classes can override specific methods to add custom behavior while maintaining compatibility with the store interface.

Constructors

Name Description
DelegatingAgentSessionStore(AgentSessionStore)

Initializes a new instance of the DelegatingAgentSessionStore class with the specified inner store.

Properties

Name Description
InnerStore

Gets the inner session store instance that receives delegated operations.

Methods

Name Description
GetService(Type, Object)

Asks the AgentSessionStore for an object of the specified type serviceType.

GetService<TService>(Object)

Asks the AgentSessionStore for an object of type TService.

(Inherited from AgentSessionStore)
GetSessionAsync(AIAgent, String, CancellationToken)

Retrieves a serialized agent session from persistent storage.

SaveSessionAsync(AIAgent, String, AgentSession, CancellationToken)

Saves a serialized agent session to persistent storage.

Applies to