Skip to content
AgentsKit

@agentskit/react — Interfaces

API interfaces for @agentskit/react.

#Interface: AdapterContext

Defined in: core/dist/chat-DSVPk7dz.d.ts:125

#Properties

#maxTokens?

optional maxTokens?: number

Defined in: core/dist/chat-DSVPk7dz.d.ts:128


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/chat-DSVPk7dz.d.ts:130


#systemPrompt?

optional systemPrompt?: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:126


#temperature?

optional temperature?: number

Defined in: core/dist/chat-DSVPk7dz.d.ts:127


#tools?

optional tools?: ToolDefinition<Record<string, unknown>>[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:129


#Interface: AdapterRequest

Defined in: core/dist/chat-DSVPk7dz.d.ts:132

#Properties

#context?

optional context?: AdapterContext

Defined in: core/dist/chat-DSVPk7dz.d.ts:134


#correlation?

optional correlation?: AgentEventContext

Defined in: core/dist/chat-DSVPk7dz.d.ts:136

Optional identity propagated to adapters without coupling them to a runtime.


#messages

messages: MessageType[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:133


#Interface: ChatConfig

Defined in: core/dist/chat-DSVPk7dz.d.ts:188

#Properties

#adapter

adapter: AdapterFactory

Defined in: core/dist/chat-DSVPk7dz.d.ts:189


#authorizeToolCall?

optional authorizeToolCall?: ToolAuthorizer

Defined in: core/dist/chat-DSVPk7dz.d.ts:210


#correlation?

optional correlation?: AgentEventContext

Defined in: core/dist/chat-DSVPk7dz.d.ts:191

Optional identity propagated to adapter requests and runtime events.


#initialMessages?

optional initialMessages?: MessageType[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:199


#maxTokens?

optional maxTokens?: number

Defined in: core/dist/chat-DSVPk7dz.d.ts:194


#maxToolIterations?

optional maxToolIterations?: number

Defined in: core/dist/chat-DSVPk7dz.d.ts:206

Maximum number of LLM ↔ tool feedback turns per send(). After a tool call, the controller feeds the result back to the model so it can continue reasoning. This caps that loop to prevent runaway cost if a model keeps requesting tools. Default: 5. Set to 1 to disable.


#memory?

optional memory?: ChatMemory

Defined in: core/dist/chat-DSVPk7dz.d.ts:197


#observers?

optional observers?: Observer[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:211


#onError?

optional onError?: (error) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:208

#Parameters

error

Error

#Returns

void


#onMessage?

optional onMessage?: (message) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:207

#Parameters

message

MessageType

#Returns

void


#onToolCall?

optional onToolCall?: (toolCall, context) => MaybePromise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:209

#Parameters

toolCall

ToolCall

context

ToolCallHandlerContext

#Returns

MaybePromise<void>


#retriever?

optional retriever?: Retriever

Defined in: core/dist/chat-DSVPk7dz.d.ts:198


#skills?

optional skills?: SkillDefinition[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:196


#systemPrompt?

optional systemPrompt?: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:192


#temperature?

optional temperature?: number

Defined in: core/dist/chat-DSVPk7dz.d.ts:193


#tools?

optional tools?: ToolDefinition<Record<string, unknown>>[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:195


#validateArgs?

optional validateArgs?: ArgsValidator

Defined in: core/dist/chat-DSVPk7dz.d.ts:219

Opt-in runtime validator for tool-call arguments (ADR-0008). When set, args produced by the model are checked against each tool's JSON Schema before execution; mismatches raise AK_TOOL_INVALID_INPUT. Omit for the default passthrough behaviour. Use createAjvValidator() from @agentskit/tools/validation.


#Interface: ChatContainerProps

Defined in: react/src/components/ChatContainer.tsx:3

#Properties

#children

children: ReactNode

Defined in: react/src/components/ChatContainer.tsx:4


#className?

optional className?: string

Defined in: react/src/components/ChatContainer.tsx:5


#Interface: ChatController

Defined in: core/dist/chat-DSVPk7dz.d.ts:240

#Properties

#approve

approve: (toolCallId) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:263

#Parameters

toolCallId

string

#Returns

Promise<void>


#clear

clear: () => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:260

#Returns

Promise<void>


#deny

deny: (toolCallId, reason?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:264

#Parameters

toolCallId

string

reason?

string

#Returns

Promise<void>


#edit

edit: (messageId, newContent, opts?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:251

Edit a message by id. For user messages, truncates all subsequent turns and regenerates (unless opts.regenerate === false). For assistant messages, updates the content in place.

#Parameters

messageId

string

newContent

string

opts?

EditOptions

#Returns

Promise<void>


#getState

getState: () => ChatState

Defined in: core/dist/chat-DSVPk7dz.d.ts:241

#Returns

ChatState


#proposeToolCall

proposeToolCall: (proposal) => Promise<ToolCall>

Defined in: core/dist/chat-DSVPk7dz.d.ts:262

#Parameters

proposal

Pick<ToolCall, "id" | "name" | "args">

#Returns

Promise<ToolCall>


#regenerate

regenerate: (messageId?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:257

Regenerate the assistant response. If messageId names an assistant message, that one is replaced. Otherwise regenerates the last assistant turn (same as retry()).

#Parameters

messageId?

string

#Returns

Promise<void>


#retry

retry: () => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:245

#Returns

Promise<void>


#send

send: (text) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:243

#Parameters

text

string

#Returns

Promise<void>


#setInput

setInput: (value) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:258

#Parameters

value

string

#Returns

void


#setMessages

setMessages: (messages) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:259

#Parameters

messages

MessageType[]

#Returns

void


#stop

stop: () => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:244

#Returns

void


#subscribe

subscribe: (listener) => () => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:242

#Parameters

listener

() => void

#Returns

() => void


#updateConfig

updateConfig: (config) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:261

#Parameters

config

Partial<ChatConfig>

#Returns

void


#Interface: ChatMemory

Defined in: core/dist/memory-DT9jl_oe.d.ts:18

#Properties

#clear?

optional clear?: (options?) => MaybePromise<void>

Defined in: core/dist/memory-DT9jl_oe.d.ts:23

#Parameters

options?

MemoryOperationOptions

#Returns

MaybePromise<void>


#load

load: (options?) => MaybePromise<MessageType[]>

Defined in: core/dist/memory-DT9jl_oe.d.ts:21

#Parameters

options?

MemoryOperationOptions

#Returns

MaybePromise<MessageType[]>


#region?

optional region?: DataRegion

Defined in: core/dist/memory-DT9jl_oe.d.ts:20

Data-residency region for this memory backend, when known.


#save

save: (messages, options?) => MaybePromise<void>

Defined in: core/dist/memory-DT9jl_oe.d.ts:22

#Parameters

messages

MessageType[]

options?

MemoryOperationOptions

#Returns

MaybePromise<void>


#Interface: ChatReturn

Defined in: core/dist/chat-DSVPk7dz.d.ts:266

#Extends

#Properties

#approve

approve: (toolCallId) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:275

#Parameters

toolCallId

string

#Returns

Promise<void>


#clear

clear: () => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:273

#Returns

Promise<void>


#deny

deny: (toolCallId, reason?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:276

#Parameters

toolCallId

string

reason?

string

#Returns

Promise<void>


#edit

edit: (messageId, newContent, opts?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:270

#Parameters

messageId

string

newContent

string

opts?

EditOptions

#Returns

Promise<void>


#error

error: Error | null

Defined in: core/dist/chat-DSVPk7dz.d.ts:225

#Inherited from

ChatState.error


#input

input: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:224

#Inherited from

ChatState.input


#messages

messages: MessageType[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:222

#Inherited from

ChatState.messages


#proposeToolCall

proposeToolCall: (proposal) => Promise<ToolCall>

Defined in: core/dist/chat-DSVPk7dz.d.ts:274

#Parameters

proposal

Pick<ToolCall, "id" | "name" | "args">

#Returns

Promise<ToolCall>


#regenerate

regenerate: (messageId?) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:271

#Parameters

messageId?

string

#Returns

Promise<void>


#retry

retry: () => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:269

#Returns

Promise<void>


#send

send: (text) => Promise<void>

Defined in: core/dist/chat-DSVPk7dz.d.ts:267

#Parameters

text

string

#Returns

Promise<void>


#setInput

setInput: (value) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:272

#Parameters

value

string

#Returns

void


#status

status: StreamStatus

Defined in: core/dist/chat-DSVPk7dz.d.ts:223

#Inherited from

ChatState.status


#stop

stop: () => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:268

#Returns

void


#usage

usage: TokenUsage

Defined in: core/dist/chat-DSVPk7dz.d.ts:231

Token usage accumulated across every LLM call in this chat session. Populated when the adapter surfaces usage (OpenAI, Anthropic, Gemini, Ollama all do). Zeroed by clear().

#Inherited from

ChatState.usage


#Interface: ChatState

Defined in: core/dist/chat-DSVPk7dz.d.ts:221

#Extended by

#Properties

#error

error: Error | null

Defined in: core/dist/chat-DSVPk7dz.d.ts:225


#input

input: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:224


#messages

messages: MessageType[]

Defined in: core/dist/chat-DSVPk7dz.d.ts:222


#status

status: StreamStatus

Defined in: core/dist/chat-DSVPk7dz.d.ts:223


#usage

usage: TokenUsage

Defined in: core/dist/chat-DSVPk7dz.d.ts:231

Token usage accumulated across every LLM call in this chat session. Populated when the adapter surfaces usage (OpenAI, Anthropic, Gemini, Ollama all do). Zeroed by clear().


#Interface: CodeBlockProps

Defined in: react/src/components/CodeBlock.tsx:3

#Properties

#code

code: string

Defined in: react/src/components/CodeBlock.tsx:4


#copyable?

optional copyable?: boolean

Defined in: react/src/components/CodeBlock.tsx:6


#language?

optional language?: string

Defined in: react/src/components/CodeBlock.tsx:5


#Interface: InputBarProps

Defined in: react/src/components/InputBar.tsx:4

#Properties

#chat

chat: ChatReturn

Defined in: react/src/components/InputBar.tsx:5


#disabled?

optional disabled?: boolean

Defined in: react/src/components/InputBar.tsx:7


#placeholder?

optional placeholder?: string

Defined in: react/src/components/InputBar.tsx:6


#Interface: MarkdownProps

Defined in: react/src/components/Markdown.tsx:3

#Properties

#content

content: string

Defined in: react/src/components/Markdown.tsx:4


#streaming?

optional streaming?: boolean

Defined in: react/src/components/Markdown.tsx:5


#Interface: MemoryRecord

Defined in: core/dist/message-DlpY7JIR.d.ts:204

#Properties

#messages

messages: Omit<MessageType, "createdAt"> & object[]

Defined in: core/dist/message-DlpY7JIR.d.ts:206


#version

version: 1

Defined in: core/dist/message-DlpY7JIR.d.ts:205


#Interface: MessageProps

Defined in: react/src/components/Message.tsx:4

#Properties

#actions?

optional actions?: ReactNode

Defined in: react/src/components/Message.tsx:7


#avatar?

optional avatar?: ReactNode

Defined in: react/src/components/Message.tsx:6


#message

message: MessageType

Defined in: react/src/components/Message.tsx:5


#Interface: MessageType

Defined in: core/dist/message-DlpY7JIR.d.ts:187

#Properties

#content

content: string

Defined in: core/dist/message-DlpY7JIR.d.ts:191

Text projection of the message. Always populated, even for multi-modal.


#createdAt

createdAt: Date

Defined in: core/dist/message-DlpY7JIR.d.ts:202


#id

id: string

Defined in: core/dist/message-DlpY7JIR.d.ts:188


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/message-DlpY7JIR.d.ts:201


#parts?

optional parts?: ContentPart[]

Defined in: core/dist/message-DlpY7JIR.d.ts:197

Multi-modal parts. When provided, content is a text projection of these parts (see partsToText). Adapters that support the relevant modality should prefer parts over content.


#role

role: MessageRole

Defined in: core/dist/message-DlpY7JIR.d.ts:189


#status

status: MessageStatus

Defined in: core/dist/message-DlpY7JIR.d.ts:198


#toolCallId?

optional toolCallId?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:200


#toolCalls?

optional toolCalls?: ToolCall[]

Defined in: core/dist/message-DlpY7JIR.d.ts:199


#Interface: RetrievedDocument

Defined in: core/dist/memory-DT9jl_oe.d.ts:3

#Properties

#content

content: string

Defined in: core/dist/memory-DT9jl_oe.d.ts:5


#id

id: string

Defined in: core/dist/memory-DT9jl_oe.d.ts:4


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/memory-DT9jl_oe.d.ts:8


#score?

optional score?: number

Defined in: core/dist/memory-DT9jl_oe.d.ts:7


#source?

optional source?: string

Defined in: core/dist/memory-DT9jl_oe.d.ts:6


#Interface: Retriever

Defined in: core/dist/memory-DT9jl_oe.d.ts:14

#Properties

#retrieve

retrieve: (request) => MaybePromise<RetrievedDocument[]>

Defined in: core/dist/memory-DT9jl_oe.d.ts:15

#Parameters

request

RetrieverRequest

#Returns

MaybePromise<RetrievedDocument[]>


#Interface: RetrieverRequest

Defined in: core/dist/memory-DT9jl_oe.d.ts:10

#Properties

#messages

messages: MessageType[]

Defined in: core/dist/memory-DT9jl_oe.d.ts:12


#query

query: string

Defined in: core/dist/memory-DT9jl_oe.d.ts:11


#Interface: StreamChunk

Defined in: core/dist/chat-DSVPk7dz.d.ts:16

#Properties

#content?

optional content?: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:18


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/chat-DSVPk7dz.d.ts:21


#toolCall?

optional toolCall?: StreamToolCallPayload

Defined in: core/dist/chat-DSVPk7dz.d.ts:19


#type

type: "error" | "text" | "tool_call" | "tool_result" | "reasoning" | "usage" | "done"

Defined in: core/dist/chat-DSVPk7dz.d.ts:17


#usage?

optional usage?: TokenUsage

Defined in: core/dist/chat-DSVPk7dz.d.ts:20


#Interface: StreamSource

Defined in: core/dist/chat-DSVPk7dz.d.ts:23

#Properties

#abort

abort: () => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:25

#Returns

void


#stream

stream: () => AsyncIterableIterator<StreamChunk>

Defined in: core/dist/chat-DSVPk7dz.d.ts:24

#Returns

AsyncIterableIterator<StreamChunk>


#Interface: StreamToolCallPayload

Defined in: core/dist/chat-DSVPk7dz.d.ts:5

#Properties

#args

args: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:8


#id

id: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:6


#name

name: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:7


#result?

optional result?: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:9


#Interface: ThinkingIndicatorProps

Defined in: react/src/components/ThinkingIndicator.tsx:3

#Properties

#label?

optional label?: string

Defined in: react/src/components/ThinkingIndicator.tsx:5


#visible

visible: boolean

Defined in: react/src/components/ThinkingIndicator.tsx:4


#Interface: ToolCall

Defined in: core/dist/message-DlpY7JIR.d.ts:75

#Properties

#args

args: Record<string, unknown>

Defined in: core/dist/message-DlpY7JIR.d.ts:78


#error?

optional error?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:80


#id

id: string

Defined in: core/dist/message-DlpY7JIR.d.ts:76


#name

name: string

Defined in: core/dist/message-DlpY7JIR.d.ts:77


#result?

optional result?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:79


#status

status: ToolCallStatus

Defined in: core/dist/message-DlpY7JIR.d.ts:81


#Interface: ToolCallHandlerContext

Defined in: core/dist/message-DlpY7JIR.d.ts:171

#Properties

#messages

messages: MessageType[]

Defined in: core/dist/message-DlpY7JIR.d.ts:172


#tool?

optional tool?: ToolDefinition<Record<string, unknown>>

Defined in: core/dist/message-DlpY7JIR.d.ts:173


#Interface: ToolCallViewProps

Defined in: react/src/components/ToolCallView.tsx:4

#Properties

#toolCall

toolCall: ToolCall

Defined in: react/src/components/ToolCallView.tsx:5


#Interface: ToolConfirmationProps

Defined in: react/src/components/ToolConfirmation.tsx:4

#Properties

#onApprove

onApprove: (toolCallId) => void

Defined in: react/src/components/ToolConfirmation.tsx:6

#Parameters

toolCallId

string

#Returns

void


#onDeny

onDeny: (toolCallId, reason?) => void

Defined in: react/src/components/ToolConfirmation.tsx:7

#Parameters

toolCallId

string

reason?

string

#Returns

void


#toolCall

toolCall: ToolCall

Defined in: react/src/components/ToolConfirmation.tsx:5


#Interface: ToolDefinition<TArgs>

Defined in: core/dist/message-DlpY7JIR.d.ts:146

#Type Parameters

#TArgs

TArgs = Record<string, unknown>

#Properties

#category?

optional category?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:155


#description?

optional description?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:148


#dispose?

optional dispose?: () => MaybePromise<void>

Defined in: core/dist/message-DlpY7JIR.d.ts:153

#Returns

MaybePromise<void>


#execute?

optional execute?: (args, context) => unknown

Defined in: core/dist/message-DlpY7JIR.d.ts:151

#Parameters

args

TArgs

context

ToolExecutionContext

#Returns

unknown


#init?

optional init?: () => MaybePromise<void>

Defined in: core/dist/message-DlpY7JIR.d.ts:152

#Returns

MaybePromise<void>


#name

name: string

Defined in: core/dist/message-DlpY7JIR.d.ts:147


#requiresConfirmation?

optional requiresConfirmation?: boolean

Defined in: core/dist/message-DlpY7JIR.d.ts:150


#schema?

optional schema?: JSONSchema7

Defined in: core/dist/message-DlpY7JIR.d.ts:149


#tags?

optional tags?: string[]

Defined in: core/dist/message-DlpY7JIR.d.ts:154


#Interface: ToolExecutionContext

Defined in: core/dist/message-DlpY7JIR.d.ts:83

#Properties

#call

call: ToolCall

Defined in: core/dist/message-DlpY7JIR.d.ts:85


#messages

messages: MessageType[]

Defined in: core/dist/message-DlpY7JIR.d.ts:84


#runId?

optional runId?: string

Defined in: core/dist/message-DlpY7JIR.d.ts:87

Stable parent run identifier when the caller can provide one.


#Interface: TopologyGraphSource

Defined in: react/src/components/TopologyGraphView.tsx:39

#Properties

#subscribe

subscribe: (handler) => () => void

Defined in: react/src/components/TopologyGraphView.tsx:41

#Parameters

handler

(s) => void

#Returns

() => void


#toJSON

toJSON: () => TopologyGraphViewSnapshot

Defined in: react/src/components/TopologyGraphView.tsx:40

#Returns

TopologyGraphViewSnapshot


#Interface: TopologyGraphViewEdge

Defined in: react/src/components/TopologyGraphView.tsx:24

#Properties

#count

count: number

Defined in: react/src/components/TopologyGraphView.tsx:28


#from

from: string

Defined in: react/src/components/TopologyGraphView.tsx:26


#id

id: string

Defined in: react/src/components/TopologyGraphView.tsx:25


#lastResult?

optional lastResult?: string

Defined in: react/src/components/TopologyGraphView.tsx:30


#lastTask?

optional lastTask?: string

Defined in: react/src/components/TopologyGraphView.tsx:29


#to

to: string

Defined in: react/src/components/TopologyGraphView.tsx:27


#Interface: TopologyGraphViewNode

Defined in: react/src/components/TopologyGraphView.tsx:14

Headless renderer for a multi-agent topology graph. Pass any source that implements subscribe(snapshot => …) (e.g. the TopologyGraph from @agentskit/observability) and the component draws nodes + edges in an SVG with data-ak-* attributes for styling.

Click a node to drill into its session — wire onNodeClick to your devtools router.

#Properties

#endCount

endCount: number

Defined in: react/src/components/TopologyGraphView.tsx:19


#errorCount

errorCount: number

Defined in: react/src/components/TopologyGraphView.tsx:20


#id

id: string

Defined in: react/src/components/TopologyGraphView.tsx:15


#label

label: string

Defined in: react/src/components/TopologyGraphView.tsx:16


#lastActiveAt

lastActiveAt: number

Defined in: react/src/components/TopologyGraphView.tsx:21


#startCount

startCount: number

Defined in: react/src/components/TopologyGraphView.tsx:18


#topology

topology: string

Defined in: react/src/components/TopologyGraphView.tsx:17


#Interface: TopologyGraphViewProps

Defined in: react/src/components/TopologyGraphView.tsx:44

#Properties

#height?

optional height?: number

Defined in: react/src/components/TopologyGraphView.tsx:48


#onNodeClick?

optional onNodeClick?: (nodeId) => void

Defined in: react/src/components/TopologyGraphView.tsx:46

#Parameters

nodeId

string

#Returns

void


#source

source: TopologyGraphSource

Defined in: react/src/components/TopologyGraphView.tsx:45


#width?

optional width?: number

Defined in: react/src/components/TopologyGraphView.tsx:47


#Interface: TopologyGraphViewSnapshot

Defined in: react/src/components/TopologyGraphView.tsx:33

#Properties

#edges

edges: TopologyGraphViewEdge[]

Defined in: react/src/components/TopologyGraphView.tsx:35


#nodes

nodes: TopologyGraphViewNode[]

Defined in: react/src/components/TopologyGraphView.tsx:34


#updatedAt

updatedAt: string

Defined in: react/src/components/TopologyGraphView.tsx:36


#Interface: UseStreamOptions

Defined in: core/dist/chat-DSVPk7dz.d.ts:27

#Properties

#onChunk?

optional onChunk?: (chunk) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:28

#Parameters

chunk

StreamChunk

#Returns

void


#onComplete?

optional onComplete?: (text) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:29

#Parameters

text

string

#Returns

void


#onError?

optional onError?: (error) => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:30

#Parameters

error

Error

#Returns

void


#Interface: UseStreamReturn

Defined in: core/dist/chat-DSVPk7dz.d.ts:32

#Properties

#data

data: StreamChunk | null

Defined in: core/dist/chat-DSVPk7dz.d.ts:33


#error

error: Error | null

Defined in: core/dist/chat-DSVPk7dz.d.ts:36


#status

status: StreamStatus

Defined in: core/dist/chat-DSVPk7dz.d.ts:35


#stop

stop: () => void

Defined in: core/dist/chat-DSVPk7dz.d.ts:37

#Returns

void


#text

text: string

Defined in: core/dist/chat-DSVPk7dz.d.ts:34

Explore nearby

On this page

Interface: AdapterContextPropertiesmaxTokens?metadata?systemPrompt?temperature?tools?Interface: AdapterRequestPropertiescontext?correlation?messagesInterface: ChatConfigPropertiesadapterauthorizeToolCall?correlation?initialMessages?maxTokens?maxToolIterations?memory?observers?onError?ParameterserrorReturnsonMessage?ParametersmessageReturnsonToolCall?ParameterstoolCallcontextReturnsretriever?skills?systemPrompt?temperature?tools?validateArgs?Interface: ChatContainerPropsPropertieschildrenclassName?Interface: ChatControllerPropertiesapproveParameterstoolCallIdReturnsclearReturnsdenyParameterstoolCallIdreason?ReturnseditParametersmessageIdnewContentopts?ReturnsgetStateReturnsproposeToolCallParametersproposalReturnsregenerateParametersmessageId?ReturnsretryReturnssendParameterstextReturnssetInputParametersvalueReturnssetMessagesParametersmessagesReturnsstopReturnssubscribeParameterslistenerReturnsupdateConfigParametersconfigReturnsInterface: ChatMemoryPropertiesclear?Parametersoptions?ReturnsloadParametersoptions?Returnsregion?saveParametersmessagesoptions?ReturnsInterface: ChatReturnExtendsPropertiesapproveParameterstoolCallIdReturnsclearReturnsdenyParameterstoolCallIdreason?ReturnseditParametersmessageIdnewContentopts?ReturnserrorInherited frominputInherited frommessagesInherited fromproposeToolCallParametersproposalReturnsregenerateParametersmessageId?ReturnsretryReturnssendParameterstextReturnssetInputParametersvalueReturnsstatusInherited fromstopReturnsusageInherited fromInterface: ChatStateExtended byPropertieserrorinputmessagesstatususageInterface: CodeBlockPropsPropertiescodecopyable?language?Interface: InputBarPropsPropertieschatdisabled?placeholder?Interface: MarkdownPropsPropertiescontentstreaming?Interface: MemoryRecordPropertiesmessagesversionInterface: MessagePropsPropertiesactions?avatar?messageInterface: MessageTypePropertiescontentcreatedAtidmetadata?parts?rolestatustoolCallId?toolCalls?Interface: RetrievedDocumentPropertiescontentidmetadata?score?source?Interface: RetrieverPropertiesretrieveParametersrequestReturnsInterface: RetrieverRequestPropertiesmessagesqueryInterface: StreamChunkPropertiescontent?metadata?toolCall?typeusage?Interface: StreamSourcePropertiesabortReturnsstreamReturnsInterface: StreamToolCallPayloadPropertiesargsidnameresult?Interface: ThinkingIndicatorPropsPropertieslabel?visibleInterface: ToolCallPropertiesargserror?idnameresult?statusInterface: ToolCallHandlerContextPropertiesmessagestool?Interface: ToolCallViewPropsPropertiestoolCallInterface: ToolConfirmationPropsPropertiesonApproveParameterstoolCallIdReturnsonDenyParameterstoolCallIdreason?ReturnstoolCallInterface: ToolDefinition<TArgs>Type ParametersTArgsPropertiescategory?description?dispose?Returnsexecute?ParametersargscontextReturnsinit?ReturnsnamerequiresConfirmation?schema?tags?Interface: ToolExecutionContextPropertiescallmessagesrunId?Interface: TopologyGraphSourcePropertiessubscribeParametershandlerReturnstoJSONReturnsInterface: TopologyGraphViewEdgePropertiescountfromidlastResult?lastTask?toInterface: TopologyGraphViewNodePropertiesendCounterrorCountidlabellastActiveAtstartCounttopologyInterface: TopologyGraphViewPropsPropertiesheight?onNodeClick?ParametersnodeIdReturnssourcewidth?Interface: TopologyGraphViewSnapshotPropertiesedgesnodesupdatedAtInterface: UseStreamOptionsPropertiesonChunk?ParameterschunkReturnsonComplete?ParameterstextReturnsonError?ParameterserrorReturnsInterface: UseStreamReturnPropertiesdataerrorstatusstopReturnstext