diff --git a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs index 020d7a033c..6e8e2a3531 100644 --- a/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI.Abstractions/AIContextProvider.cs @@ -21,7 +21,7 @@ namespace Microsoft.Agents.AI; public abstract class AIContextProvider { /// - /// Called just before the Model/Agent/etc. is invoked + /// Called just before the Model/Agent/etc. is invoked. /// Implementers can load any additional context required at this time, /// and they should return any context that should be passed to the Model/Agent/etc. /// @@ -31,13 +31,18 @@ public abstract class AIContextProvider public abstract ValueTask InvokingAsync(InvokingContext context, CancellationToken cancellationToken = default); /// - /// Called just before the Model/Agent/etc. is invoked - /// Implementers can load any additional context required at this time, - /// and they should return any context that should be passed to the Model/Agent/etc. + /// Called just after the Model/Agent/etc. is invoked. + /// Implementers can use the request and response messages in the provided to update + /// any internal state or perform any necessary actions based on the outcome of the invocation. + /// E.g. extracting memories from the user messages to remember a user preference. /// /// Contains the event context. /// The to monitor for cancellation requests. The default is . /// A task that completes when the context has been rendered and returned. + /// + /// This method is called regardless of whether the invocation succeeded or failed. + /// To check if the invocation was successful, you can inspect the property. + /// public virtual ValueTask InvokedAsync(InvokedContext context, CancellationToken cancellationToken = default) => default;