AgentSession.StateBag Property
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.
Gets any arbitrary state associated with this session.
[System.Text.Json.Serialization.JsonPropertyName("stateBag")]
public Microsoft.Agents.AI.AgentSessionStateBag StateBag { get; protected set; }
[<System.Text.Json.Serialization.JsonPropertyName("stateBag")>]
member this.StateBag : Microsoft.Agents.AI.AgentSessionStateBag with get, set
Public Property StateBag As AgentSessionStateBag
Property Value
- Attributes
Remarks
Data stored in the StateBag will be included when the session is serialized. Avoid storing secrets, credentials, or highly sensitive data in the state bag without appropriate encryption, as this data may be persisted to external storage.