Skip to content
AgentsKit

@agentskit/react β€” Interfaces

API interfaces for @agentskit/react.

#Interface: AdapterContext

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

Optional model settings and metadata supplied with an adapter request.

#Properties

#maxTokens?

optional maxTokens?: number

Defined in: core/dist/chat-C1aW2_Tp.d.ts:139


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:141


#systemPrompt?

optional systemPrompt?: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:137


#temperature?

optional temperature?: number

Defined in: core/dist/chat-C1aW2_Tp.d.ts:138


#tools?

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:140


#Interface: AdapterRequest

Defined in: core/dist/chat-C1aW2_Tp.d.ts:144

Messages and context passed to an adapter when creating a stream.

#Properties

#context?

optional context?: AdapterContext

Defined in: core/dist/chat-C1aW2_Tp.d.ts:146


#correlation?

optional correlation?: AgentEventContext

Defined in: core/dist/chat-C1aW2_Tp.d.ts:148

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


#messages

messages: MessageType[]

Defined in: core/dist/chat-C1aW2_Tp.d.ts:145


#Interface: ChatConfig

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

Configuration for a headless chat controller and its integrations.

#Example

const chat = createChatController({ adapter: openai({ apiKey, model: 'gpt-4o' }) })
await chat.send('Hello')

#Properties

#adapter

adapter: AdapterFactory

Defined in: core/dist/chat-C1aW2_Tp.d.ts:232


#authorizeToolCall?

optional authorizeToolCall?: ToolAuthorizer

Defined in: core/dist/chat-C1aW2_Tp.d.ts:255


#correlation?

optional correlation?: AgentEventContext

Defined in: core/dist/chat-C1aW2_Tp.d.ts:234

Optional identity propagated to adapter requests and runtime events.


#decisionStore?

optional decisionStore?: ToolDecisionStore

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

Required by decide; scope this store to the authorized conversation.


#initialMessages?

optional initialMessages?: MessageType[]

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


#maxTokens?

optional maxTokens?: number

Defined in: core/dist/chat-C1aW2_Tp.d.ts:237


#maxToolIterations?

optional maxToolIterations?: number

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

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-C1aW2_Tp.d.ts:240


#observers?

optional observers?: Observer[]

Defined in: core/dist/chat-C1aW2_Tp.d.ts:256


#onError?

optional onError?: (error) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:253

#Parameters

error

Error

#Returns

void


#onMessage?

optional onMessage?: (message) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:252

#Parameters

message

MessageType

#Returns

void


#onToolCall?

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:254

#Parameters

toolCall

ToolCall

context

ToolCallHandlerContext

#Returns

MaybePromise<void>


#retriever?

optional retriever?: Retriever

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


#skills?

optional skills?: SkillDefinition[]

Defined in: core/dist/chat-C1aW2_Tp.d.ts:239


#systemPrompt?

optional systemPrompt?: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:235


#temperature?

optional temperature?: number

Defined in: core/dist/chat-C1aW2_Tp.d.ts:236


#tools?

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:238


#validateArgs?

optional validateArgs?: ArgsValidator

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

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:4

Props for a chat region that scrolls as its rendered content changes.

#Properties

#children

children: ReactNode

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


#className?

optional className?: string

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


#Interface: ChatController

Defined in: core/dist/chat-C1aW2_Tp.d.ts:288

Imperative API for reading and controlling a chat session.

#Properties

#approve

approve: (toolCallId) => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:314

#Parameters

toolCallId

string

#Returns

Promise<void>

#Deprecated

Generation-local only. Use decide with a decisionStore for durable decisions.


#clear

clear: () => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:308

#Returns

Promise<void>


#decide

decide: (toolCallId, decision, reason?) => Promise<ToolCall>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:312

Resume a durable confirmation; terminal replay does not call tool or model again.

#Parameters

toolCallId

string

decision

"approve" | "deny"

reason?

string

#Returns

Promise<ToolCall>


#deny

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:316

#Parameters

toolCallId

string

reason?

string

#Returns

Promise<void>

#Deprecated

Generation-local only. Use decide for durable decisions.


#edit

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:299

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-C1aW2_Tp.d.ts:289

#Returns

ChatState


#proposeToolCall

proposeToolCall: (proposal) => Promise<ToolCall>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:310

#Parameters

proposal

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

#Returns

Promise<ToolCall>


#regenerate

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:305

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-C1aW2_Tp.d.ts:293

#Returns

Promise<void>


#send

send: (text) => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:291

#Parameters

text

string | ContentPart[]

#Returns

Promise<void>


#setInput

setInput: (value) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:306

#Parameters

value

string

#Returns

void


#setMessages

setMessages: (messages) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:307

#Parameters

messages

MessageType[]

#Returns

void


#stop

stop: () => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:292

#Returns

void


#subscribe

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:290

#Parameters

listener

() => void

#Returns

() => void


#updateConfig

updateConfig: (config) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:309

#Parameters

config

Partial<ChatConfig>

#Returns

void


#Interface: ChatMemory

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

Persistence contract for loading, saving, and clearing chat messages.

#Properties

#clear?

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

Defined in: core/dist/memory-DZZNsfnt.d.ts:27

#Parameters

options?

MemoryOperationOptions

#Returns

MaybePromise<void>


#load

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

Defined in: core/dist/memory-DZZNsfnt.d.ts:25

#Parameters

options?

MemoryOperationOptions

#Returns

MaybePromise<MessageType[]>


#region?

optional region?: DataRegion

Defined in: core/dist/memory-DZZNsfnt.d.ts:24

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


#save

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

Defined in: core/dist/memory-DZZNsfnt.d.ts:26

#Parameters

messages

MessageType[]

options?

MemoryOperationOptions

#Returns

MaybePromise<void>


#Interface: ChatReturn

Defined in: core/dist/chat-C1aW2_Tp.d.ts:319

Chat state combined with the actions exposed by framework bindings.

#Extends

#Properties

#approve

approve: (toolCallId) => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:328

#Parameters

toolCallId

string

#Returns

Promise<void>


#clear

clear: () => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:326

#Returns

Promise<void>


#deny

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:329

#Parameters

toolCallId

string

reason?

string

#Returns

Promise<void>


#edit

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:323

#Parameters

messageId

string

newContent

string

opts?

EditOptions

#Returns

Promise<void>


#error

error: Error | null

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

#Inherited from

ChatState.error


#input

input: string

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

#Inherited from

ChatState.input


#messages

messages: MessageType[]

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

#Inherited from

ChatState.messages


#proposeToolCall

proposeToolCall: (proposal) => Promise<ToolCall>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:327

#Parameters

proposal

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

#Returns

Promise<ToolCall>


#regenerate

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

Defined in: core/dist/chat-C1aW2_Tp.d.ts:324

#Parameters

messageId?

string

#Returns

Promise<void>


#retry

retry: () => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:322

#Returns

Promise<void>


#send

send: (text) => Promise<void>

Defined in: core/dist/chat-C1aW2_Tp.d.ts:320

#Parameters

text

string | ContentPart[]

#Returns

Promise<void>


#setInput

setInput: (value) => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:325

#Parameters

value

string

#Returns

void


#status

status: StreamStatus

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

#Inherited from

ChatState.status


#stop

stop: () => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:321

#Returns

void


#usage

usage: TokenUsage

Defined in: core/dist/chat-C1aW2_Tp.d.ts:277

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-C1aW2_Tp.d.ts:267

Current messages, input, stream status, error, and accumulated usage.

#Extended by

#Properties

#error

error: Error | null

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


#input

input: string

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


#messages

messages: MessageType[]

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


#status

status: StreamStatus

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


#usage

usage: TokenUsage

Defined in: core/dist/chat-C1aW2_Tp.d.ts:277

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:4

Props for displaying code with an optional clipboard control.

#Properties

#code

code: string

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


#copyable?

optional copyable?: boolean

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


#language?

optional language?: string

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


#Interface: ConfirmUndoCardProps

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

Props for confirming a reversible action and offering a time-limited undo.

#Properties

#approveLabel

approveLabel: string

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


#denyLabel

denyLabel: string

Defined in: react/src/components/ConfirmUndoCard.tsx:8


#description?

optional description?: string

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


#doneLabel?

optional doneLabel?: string

Defined in: react/src/components/ConfirmUndoCard.tsx:11

Text shown after the undo window closes without an undo.


#formatRemaining?

optional formatRemaining?: (seconds) => string

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

Builds the countdown text from the seconds left, e.g. s => \Undo in ${s}s``.

#Parameters

seconds

number

#Returns

string


#onApprove

onApprove: () => void

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

#Returns

void


#onDeny

onDeny: () => void

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

#Returns

void


#onUndo

onUndo: () => void

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

#Returns

void


#title

title: string

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


#undoLabel

undoLabel: string

Defined in: react/src/components/ConfirmUndoCard.tsx:9


#undoneLabel?

optional undoneLabel?: string

Defined in: react/src/components/ConfirmUndoCard.tsx:13

Text shown after the action was undone.


#undoWindowMs?

optional undoWindowMs?: number

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

How long the undo stays available after approval. Default 5000 ms.


#Interface: InputBarProps

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

Props for an input form bound to a chat return value.

#Properties

#chat

chat: ChatReturn

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


#disabled?

optional disabled?: boolean

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


#placeholder?

optional placeholder?: string

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


#Interface: MarkdownProps

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

Props for displaying message content with a streaming marker.

#Properties

#content

content: string

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


#streaming?

optional streaming?: boolean

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


#Interface: MemoryRecord

Defined in: core/dist/message-8TsZHkTl.d.ts:249

Versioned JSON-safe representation of messages stored by a memory backend.

#Properties

#messages

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

Defined in: core/dist/message-8TsZHkTl.d.ts:251


#version

version: 1

Defined in: core/dist/message-8TsZHkTl.d.ts:250


#Interface: MessageProps

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

Props for a message with optional avatar and action content.

#Properties

#actions?

optional actions?: ReactNode

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


#avatar?

optional avatar?: ReactNode

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


#message

message: MessageType

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


#Interface: MessageType

Defined in: core/dist/message-8TsZHkTl.d.ts:231

Conversation message with optional tool calls and multi-modal parts.

#Properties

#content

content: string

Defined in: core/dist/message-8TsZHkTl.d.ts:235

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


#createdAt

createdAt: Date

Defined in: core/dist/message-8TsZHkTl.d.ts:246


#id

id: string

Defined in: core/dist/message-8TsZHkTl.d.ts:232


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/message-8TsZHkTl.d.ts:245


#parts?

optional parts?: ContentPart[]

Defined in: core/dist/message-8TsZHkTl.d.ts:241

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-8TsZHkTl.d.ts:233


#status

status: MessageStatus

Defined in: core/dist/message-8TsZHkTl.d.ts:242


#toolCallId?

optional toolCallId?: string

Defined in: core/dist/message-8TsZHkTl.d.ts:244


#toolCalls?

optional toolCalls?: ToolCall[]

Defined in: core/dist/message-8TsZHkTl.d.ts:243


#Interface: RetrievedDocument

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

Document returned by a retriever for a query.

#Properties

#content

content: string

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


#id

id: string

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


#metadata?

optional metadata?: Record<string, unknown>

Defined in: core/dist/memory-DZZNsfnt.d.ts:9


#score?

optional score?: number

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


#source?

optional source?: string

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


#Interface: Retriever

Defined in: core/dist/memory-DZZNsfnt.d.ts:17

Retrieval contract used to add relevant documents to a chat request.

#Properties

#retrieve

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

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

#Parameters

request

RetrieverRequest

#Returns

MaybePromise<RetrievedDocument[]>


#Interface: RetrieverRequest

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

Query and conversation context supplied to a retriever.

#Properties

#messages

messages: MessageType[]

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


#query

query: string

Defined in: core/dist/memory-DZZNsfnt.d.ts:13


#Interface: StreamChunk

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

One text, tool, reasoning, usage, error, or completion event from a stream.

#Properties

#content?

optional content?: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:22


#metadata?

optional metadata?: Record<string, unknown>

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


#toolCall?

optional toolCall?: StreamToolCallPayload

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


#type

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

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


#usage?

optional usage?: TokenUsage

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


#Interface: StreamSource

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

Abortable asynchronous source of model response chunks.

#Properties

#abort

abort: () => void

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

#Returns

void


#stream

stream: () => AsyncIterableIterator<StreamChunk>

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

#Returns

AsyncIterableIterator<StreamChunk>


#Interface: StreamToolCallPayload

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

Tool call data carried by a streamed response chunk.

#Properties

#args

args: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:10


#id

id: string

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


#name

name: string

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


#result?

optional result?: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:11


#Interface: ThinkingIndicatorProps

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

Props for showing a labeled thinking indicator.

#Properties

#label?

optional label?: string

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


#visible

visible: boolean

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


#Interface: ToolCall

Defined in: core/dist/message-8TsZHkTl.d.ts:101

Tool call requested by a model, including parsed arguments and outcome.

#Properties

#args

args: Record<string, unknown>

Defined in: core/dist/message-8TsZHkTl.d.ts:104


#error?

optional error?: string

Defined in: core/dist/message-8TsZHkTl.d.ts:106


#id

id: string

Defined in: core/dist/message-8TsZHkTl.d.ts:102


#name

name: string

Defined in: core/dist/message-8TsZHkTl.d.ts:103


#result?

optional result?: string

Defined in: core/dist/message-8TsZHkTl.d.ts:105


#status

status: ToolCallStatus

Defined in: core/dist/message-8TsZHkTl.d.ts:107


#Interface: ToolCallHandlerContext

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

Messages and resolved tool supplied to call and authorization handlers.

#Properties

#messages

messages: MessageType[]

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


#tool?

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

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


#Interface: ToolCallViewProps

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

Props for displaying a tool call and its expandable details.

#Properties

#toolCall

toolCall: ToolCall

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


#Interface: ToolConfirmationLabels

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

Text overrides for the tool confirmation controls.

#Properties

#approve?

optional approve?: string

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


#deny?

optional deny?: string

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


#status?

optional status?: string

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


#undo?

optional undo?: string

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


#Interface: ToolConfirmationProps

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

Props for approving or denying a tool call that requires confirmation.

#Properties

#labels?

optional labels?: ToolConfirmationLabels

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

Overrides for the default English texts.


#onApprove

onApprove: (toolCallId) => void

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

#Parameters

toolCallId

string

#Returns

void


#onDeny

onDeny: (toolCallId, reason?) => void

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

#Parameters

toolCallId

string

reason?

string

#Returns

void


#onUndo?

optional onUndo?: (toolCallId) => void

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

When set, an undo button is rendered once the call was approved.

#Parameters

toolCallId

string

#Returns

void


#toolCall

toolCall: ToolCall

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


#Interface: ToolDefinition<TArgs>

Defined in: core/dist/message-8TsZHkTl.d.ts:178

Executable tool contract, including optional schema and lifecycle hooks.

#Type Parameters

#TArgs

TArgs = Record<string, unknown>

#Properties

#category?

optional category?: string

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


#description?

optional description?: string

Defined in: core/dist/message-8TsZHkTl.d.ts:180


#dispose?

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

Defined in: core/dist/message-8TsZHkTl.d.ts:185

#Returns

MaybePromise<void>


#execute?

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

Defined in: core/dist/message-8TsZHkTl.d.ts:183

#Parameters

args

TArgs

context

ToolExecutionContext

#Returns

unknown


#init?

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

Defined in: core/dist/message-8TsZHkTl.d.ts:184

#Returns

MaybePromise<void>


#name

name: string

Defined in: core/dist/message-8TsZHkTl.d.ts:179


#requiresConfirmation?

optional requiresConfirmation?: boolean

Defined in: core/dist/message-8TsZHkTl.d.ts:182


#schema?

optional schema?: JSONSchema7

Defined in: core/dist/message-8TsZHkTl.d.ts:181


#tags?

optional tags?: string[]

Defined in: core/dist/message-8TsZHkTl.d.ts:186


#Interface: ToolExecutionContext

Defined in: core/dist/message-8TsZHkTl.d.ts:110

Conversation context passed to a tool's execute function.

#Properties

#call

call: ToolCall

Defined in: core/dist/message-8TsZHkTl.d.ts:112


#messages

messages: MessageType[]

Defined in: core/dist/message-8TsZHkTl.d.ts:111


#runId?

optional runId?: string

Defined in: core/dist/message-8TsZHkTl.d.ts:114

Stable parent run identifier when the caller can provide one.


#Interface: TopologyGraphSource

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

A source that exposes graph snapshots and notifies subscribers of changes.

#Properties

#subscribe

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

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

#Parameters

handler

(s) => void

#Returns

() => void


#toJSON

toJSON: () => TopologyGraphViewSnapshot

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

#Returns

TopologyGraphViewSnapshot


#Interface: TopologyGraphViewEdge

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

An edge between two topology nodes with an event count.

#Properties

#count

count: number

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


#from

from: string

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


#id

id: string

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


#lastResult?

optional lastResult?: string

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


#lastTask?

optional lastTask?: string

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


#to

to: string

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


#Interface: TopologyGraphViewNode

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

A topology node with activity counts and its last active timestamp.

#Properties

#endCount

endCount: number

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


#errorCount

errorCount: number

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


#id

id: string

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


#label

label: string

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


#lastActiveAt

lastActiveAt: number

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


#startCount

startCount: number

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


#topology

topology: string

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


#Interface: TopologyGraphViewProps

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

Props for rendering a topology source with optional node-click handling.

#Properties

#height?

optional height?: number

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


#onNodeClick?

optional onNodeClick?: (nodeId) => void

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

#Parameters

nodeId

string

#Returns

void


#source

source: TopologyGraphSource

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


#width?

optional width?: number

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


#Interface: TopologyGraphViewSnapshot

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

A complete graph snapshot with nodes, edges, and update time.

#Properties

#edges

edges: TopologyGraphViewEdge[]

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


#nodes

nodes: TopologyGraphViewNode[]

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


#updatedAt

updatedAt: string

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


#Interface: UsageMeterProps

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

Props for the presentational usage/quota bar. All text comes from props.

#Properties

#formatPercent?

optional formatPercent?: (percent) => string

Defined in: react/src/components/UsageMeter.tsx:22

Formats the percentage text. Defaults to "&lt;n>%".

#Parameters

percent

number

#Returns

string


#label

label: string

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

Visible label, e.g. "Monthly usage".


#outLabel?

optional outLabel?: string

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

Text shown in the out state.


#warningLabel?

optional warningLabel?: string

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

Text shown in the warning state.


#warningThreshold?

optional warningThreshold?: number

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

Utilization (0-1) at which the bar enters the warning state. Default 0.8.


#window

window: UsageMeterWindow

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


#Interface: UsageMeterWindow

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

Structural subset of the observability CostWindow, so no dependency is needed.

#Properties

#capUsd?

optional capUsd?: number

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


#reservedUsd?

optional reservedUsd?: number

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


#spentUsd

spentUsd: number

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


#utilization?

optional utilization?: number

Defined in: react/src/components/UsageMeter.tsx:8


#Interface: UseStreamOptions

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

Callbacks for observing chunks and completion from a stream hook.

#Properties

#onChunk?

optional onChunk?: (chunk) => void

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

#Parameters

chunk

StreamChunk

#Returns

void


#onComplete?

optional onComplete?: (text) => void

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

#Parameters

text

string

#Returns

void


#onError?

optional onError?: (error) => void

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

#Parameters

error

Error

#Returns

void


#Interface: UseStreamReturn

Defined in: core/dist/chat-C1aW2_Tp.d.ts:39

Latest chunk and accumulated text exposed by a stream hook.

#Properties

#data

data: StreamChunk | null

Defined in: core/dist/chat-C1aW2_Tp.d.ts:40


#error

error: Error | null

Defined in: core/dist/chat-C1aW2_Tp.d.ts:43


#status

status: StreamStatus

Defined in: core/dist/chat-C1aW2_Tp.d.ts:42


#stop

stop: () => void

Defined in: core/dist/chat-C1aW2_Tp.d.ts:44

#Returns

void


#text

text: string

Defined in: core/dist/chat-C1aW2_Tp.d.ts:41

Explore nearby

On this page

Interface: AdapterContextPropertiesmaxTokens?metadata?systemPrompt?temperature?tools?Interface: AdapterRequestPropertiescontext?correlation?messagesInterface: ChatConfigExamplePropertiesadapterauthorizeToolCall?correlation?decisionStore?initialMessages?maxTokens?maxToolIterations?memory?observers?onError?ParameterserrorReturnsonMessage?ParametersmessageReturnsonToolCall?ParameterstoolCallcontextReturnsretriever?skills?systemPrompt?temperature?tools?validateArgs?Interface: ChatContainerPropsPropertieschildrenclassName?Interface: ChatControllerPropertiesapproveParameterstoolCallIdReturnsDeprecatedclearReturnsdecideParameterstoolCallIddecisionreason?ReturnsdenyParameterstoolCallIdreason?ReturnsDeprecatededitParametersmessageIdnewContentopts?ReturnsgetStateReturnsproposeToolCallParametersproposalReturnsregenerateParametersmessageId?ReturnsretryReturnssendParameterstextReturnssetInputParametersvalueReturnssetMessagesParametersmessagesReturnsstopReturnssubscribeParameterslistenerReturnsupdateConfigParametersconfigReturnsInterface: ChatMemoryPropertiesclear?Parametersoptions?ReturnsloadParametersoptions?Returnsregion?saveParametersmessagesoptions?ReturnsInterface: ChatReturnExtendsPropertiesapproveParameterstoolCallIdReturnsclearReturnsdenyParameterstoolCallIdreason?ReturnseditParametersmessageIdnewContentopts?ReturnserrorInherited frominputInherited frommessagesInherited fromproposeToolCallParametersproposalReturnsregenerateParametersmessageId?ReturnsretryReturnssendParameterstextReturnssetInputParametersvalueReturnsstatusInherited fromstopReturnsusageInherited fromInterface: ChatStateExtended byPropertieserrorinputmessagesstatususageInterface: CodeBlockPropsPropertiescodecopyable?language?Interface: ConfirmUndoCardPropsPropertiesapproveLabeldenyLabeldescription?doneLabel?formatRemaining?ParameterssecondsReturnsonApproveReturnsonDenyReturnsonUndoReturnstitleundoLabelundoneLabel?undoWindowMs?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: ToolConfirmationLabelsPropertiesapprove?deny?status?undo?Interface: ToolConfirmationPropsPropertieslabels?onApproveParameterstoolCallIdReturnsonDenyParameterstoolCallIdreason?ReturnsonUndo?ParameterstoolCallIdReturnstoolCallInterface: ToolDefinition<TArgs>Type ParametersTArgsPropertiescategory?description?dispose?Returnsexecute?ParametersargscontextReturnsinit?ReturnsnamerequiresConfirmation?schema?tags?Interface: ToolExecutionContextPropertiescallmessagesrunId?Interface: TopologyGraphSourcePropertiessubscribeParametershandlerReturnstoJSONReturnsInterface: TopologyGraphViewEdgePropertiescountfromidlastResult?lastTask?toInterface: TopologyGraphViewNodePropertiesendCounterrorCountidlabellastActiveAtstartCounttopologyInterface: TopologyGraphViewPropsPropertiesheight?onNodeClick?ParametersnodeIdReturnssourcewidth?Interface: TopologyGraphViewSnapshotPropertiesedgesnodesupdatedAtInterface: UsageMeterPropsPropertiesformatPercent?ParameterspercentReturnslabeloutLabel?warningLabel?warningThreshold?windowInterface: UsageMeterWindowPropertiescapUsd?reservedUsd?spentUsdutilization?Interface: UseStreamOptionsPropertiesonChunk?ParameterschunkReturnsonComplete?ParameterstextReturnsonError?ParameterserrorReturnsInterface: UseStreamReturnPropertiesdataerrorstatusstopReturnstext