ProviderSessionState<TState>.SaveState(AgentSession, TState) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves the specified state to the session's StateBag using the configured state key and JSON serializer options. If the session is null, this method does nothing.
public void SaveState(Microsoft.Agents.AI.AgentSession? session, TState state);
member this.SaveState : Microsoft.Agents.AI.AgentSession * 'State -> unit
Public Sub SaveState (session As AgentSession, state As TState)
Parameters
- session
- AgentSession
The agent session containing the StateBag.
- state
- TState
The state to be saved.