Table of Contents

Method RunAsync

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

RunAsync(string, IReadOnlyDictionary<string, string>, OrchestrationOptions, string, CancellationToken)

Runs the workflow on an input.

public Task<WorkflowResult> RunAsync(string input, IReadOnlyDictionary<string, string> variables = null, OrchestrationOptions options = null, string runId = null, CancellationToken cancellationToken = default)

Parameters

input string

The workflow's input (input in its expressions).

variables IReadOnlyDictionary<string, string>

Values the steps read as vars.<name>; optional.

options OrchestrationOptions

Orchestration options; approvals are always deferred to the run state.

runId string

The run's identifier; a new one when null.

cancellationToken CancellationToken

A token to cancel the run.

Returns

Task<WorkflowResult>

The workflow's result, which may have stopped for a person.

Exceptions

InvalidOperationException

Thrown when the workflow is not valid; the message lists every fault.

Share