// Copyright (c) Microsoft. All rights reserved. using Microsoft.Shared.Diagnostics; namespace Microsoft.Agents.AI.Mem0; /// /// Allows scoping of memories for the . /// /// /// Mem0 memories can be scoped by one or more of: application, agent, thread, and user. /// At least one scope must be provided; otherwise Mem0 will reject requests. /// public sealed class Mem0ProviderScope { /// /// Initializes a new instance of the class. /// public Mem0ProviderScope() { } /// /// Initializes a new instance of the class by cloning an existing scope. /// /// The scope to clone. public Mem0ProviderScope(Mem0ProviderScope sourceScope) { Throw.IfNull(sourceScope); this.ApplicationId = sourceScope.ApplicationId; this.AgentId = sourceScope.AgentId; this.ThreadId = sourceScope.ThreadId; this.UserId = sourceScope.UserId; } /// /// Gets or sets an optional ID for the application to scope memories to. /// /// If not set, the scope of the memories will span all applications. public string? ApplicationId { get; set; } /// /// Gets or sets an optional ID for the agent to scope memories to. /// /// If not set, the scope of the memories will span all agents. public string? AgentId { get; set; } /// /// Gets or sets an optional ID for the thread to scope memories to. /// public string? ThreadId { get; set; } /// /// Gets or sets an optional ID for the user to scope memories to. /// /// If not set, the scope of the memories will span all users. public string? UserId { get; set; } }