Table of Contents

Method StreamAsync

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

StreamAsync(Agent, string, AgentStreamResult, AgentExecutionOptions, CancellationToken)

Streams agent output as an async enumerable.

public IAsyncEnumerable<AgentStreamToken> StreamAsync(Agent agent, string input, AgentStreamResult resultAccumulator = null, AgentExecutionOptions options = null, CancellationToken cancellationToken = default)

Parameters

agent Agent

The agent to execute.

input string

The input prompt.

resultAccumulator AgentStreamResult

Optional handler to accumulate the result.

options AgentExecutionOptions

Optional execution options.

cancellationToken CancellationToken

Cancellation token.

Returns

IAsyncEnumerable<AgentStreamToken>

An async enumerable of streaming tokens.