agentskit.js

ChatConfig

Auto-generated API reference for ChatConfig.

Interface: ChatConfig

Defined in: core/dist/chat-Du42KmMf.d.ts:170

#Properties

#adapter

adapter: AdapterFactory

Defined in: core/dist/chat-Du42KmMf.d.ts:171


#authorizeToolCall?

optional authorizeToolCall?: ToolAuthorizer

Defined in: core/dist/chat-Du42KmMf.d.ts:190


#initialMessages?

optional initialMessages?: MessageType[]

Defined in: core/dist/chat-Du42KmMf.d.ts:179


#maxTokens?

optional maxTokens?: number

Defined in: core/dist/chat-Du42KmMf.d.ts:174


#maxToolIterations?

optional maxToolIterations?: number

Defined in: core/dist/chat-Du42KmMf.d.ts:186

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-Du42KmMf.d.ts:177


#observers?

optional observers?: Observer[]

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


#onError?

optional onError?: (error) => void

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

#Parameters

error

Error

#Returns

void


#onMessage?

optional onMessage?: (message) => void

Defined in: core/dist/chat-Du42KmMf.d.ts:187

#Parameters

message

MessageType

#Returns

void


#onToolCall?

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

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

#Parameters

toolCall

ToolCall

context

ToolCallHandlerContext

#Returns

MaybePromise<void>


#retriever?

optional retriever?: Retriever

Defined in: core/dist/chat-Du42KmMf.d.ts:178


#skills?

optional skills?: SkillDefinition[]

Defined in: core/dist/chat-Du42KmMf.d.ts:176


#systemPrompt?

optional systemPrompt?: string

Defined in: core/dist/chat-Du42KmMf.d.ts:172


#temperature?

optional temperature?: number

Defined in: core/dist/chat-Du42KmMf.d.ts:173


#tools?

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

Defined in: core/dist/chat-Du42KmMf.d.ts:175


#validateArgs?

optional validateArgs?: ArgsValidator

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

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.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page

Ask the docs
Ask anything about AgentsKit. Answers come from the docs corpus and cite their sources.