Table of Contents

Class AgentStreamToken

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

Represents a token or chunk in a streaming agent response.

public sealed class AgentStreamToken
Inheritance
AgentStreamToken
Inherited Members

Constructors

AgentStreamToken(string, AgentStreamTokenType, string, int, bool, IReadOnlyDictionary<string, object>)

Initializes a new instance of the AgentStreamToken class.

Properties

CumulativeText

Gets the cumulative text so far (including this token).

Index

Gets the index of this token in the stream (0-based).

IsFinal

Gets a value indicating whether this is the final token.

Metadata

Gets optional metadata about this token.

Text

Gets the text content of this token.

Type

Gets the type of this token.

Methods

Content(string, string, int, bool)

Creates a content token.

Error(string, int)

Creates an error token.

Status(string, int)

Creates a status update token.

Thinking(string, string, int)

Creates a thinking/reasoning token.

ToString()
ToolCall(string, string, int)

Creates a tool call token.

ToolResult(string, string, int)

Creates a tool result token.