Table of Contents

Method RetryAsync

Namespace
LMKit.Agents.Workflows
Assembly
LM-Kit.NET.dll

RetryAsync(AgentRunState, string, IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, bool>, string, OrchestrationOptions, CancellationToken)

Resumes a failed run of this workflow from its failing step: the steps it completed replay their recorded output and never run again, the failing step is attempted afresh (its retry policy anew), with the input and variables corrected when given. See PrepareRetry(WorkflowDefinition, AgentRunState, string, IReadOnlyDictionary<string, string>, IReadOnlyDictionary<string, bool>, string) for what is changed and how a write in doubt is settled.

public Task<WorkflowResult> RetryAsync(AgentRunState state, string input = null, IReadOnlyDictionary<string, string> variables = null, IReadOnlyDictionary<string, bool> reconciled = null, string detail = null, OrchestrationOptions options = null, CancellationToken cancellationToken = default)

Parameters

state AgentRunState

The failed run.

input string

A corrected input, or null to keep the run's.

variables IReadOnlyDictionary<string, string>

Variables to set or replace, or null.

reconciled IReadOnlyDictionary<string, bool>

For a write whose outcome is unknown, by call id: true when it happened, false when it did not; or null.

detail string

Who retries and why, recorded on the timeline.

options OrchestrationOptions

The orchestration options, or null.

cancellationToken CancellationToken

Cancels the play.

Returns

Task<WorkflowResult>

The result of the resumed play.

Exceptions

InvalidOperationException

Thrown when the run did not fail, or is not a run of this workflow.

Share