Table of Contents

Method ExecuteStreamingAsync

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

ExecuteStreamingAsync(Agent, string, IAgentStreamHandler, AgentExecutionOptions, CancellationToken)

Executes an agent with streaming output to a handler.

public Task<AgentExecutionResult> ExecuteStreamingAsync(Agent agent, string input, IAgentStreamHandler handler, AgentExecutionOptions options = null, CancellationToken cancellationToken = default)

Parameters

agent Agent

The agent to execute.

input string

The input prompt.

handler IAgentStreamHandler

The stream handler to receive tokens.

options AgentExecutionOptions

Optional execution options.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<AgentExecutionResult>

The final execution result.