Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Workflows/Checkpointing/ICheckpointManager.cs
T
Ben ThomasandGitHub 647db9635a .NET: Rename workflows projects (#975)
* Renaming Microsoft.Agent.Workflows to Microsoft.Agents.AI.Workflows

* Removing local settings.

* Removing remining old files from merge.
2025-09-29 18:30:45 +00:00

31 lines
1.5 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.Agents.AI.Workflows.Checkpointing;
/// <summary>
/// A manager for storing and retrieving workflow execution checkpoints.
/// </summary>
internal interface ICheckpointManager
{
/// <summary>
/// Commits the specified checkpoint and returns information that can be used to retrieve it later.
/// </summary>
/// <param name="runId">The identifier for the current run or execution context.</param>
/// <param name="checkpoint">The checkpoint to commit.</param>
/// <returns>A <see cref="CheckpointInfo"/> representing the incoming checkpoint.</returns>
ValueTask<CheckpointInfo> CommitCheckpointAsync(string runId, Checkpoint checkpoint);
/// <summary>
/// Retrieves the checkpoint associated with the specified checkpoint information.
/// </summary>
/// <param name="runId">The identifier for the current run of execution context.</param>
/// <param name="checkpointInfo">The information used to identify the checkpoint.</param>
/// <returns>A <see cref="ValueTask{TResult}"/> representing the asynchronous operation. The result contains the <see
/// cref="Checkpoint"/> associated with the specified <paramref name="checkpointInfo"/>.</returns>
/// <exception cref="KeyNotFoundException">Thrown if the checkpoint is not found.</exception>
ValueTask<Checkpoint> LookupCheckpointAsync(string runId, CheckpointInfo checkpointInfo);
}