Skip to main content

Interface: ToolLoopConfig

Defined in: packages/core/src/utils/tool-loop.ts:17

Deprecated

The AI SDK handles tool loops internally via streamText() with maxSteps. Use Baleybot.create() with tools instead. Will be removed in the next major version.

Properties

argsField?

optional argsField?: string

Defined in: packages/core/src/utils/tool-loop.ts:29

Field in bot response that contains tool arguments (default: 'arguments')


botName?

optional botName?: string

Defined in: packages/core/src/utils/tool-loop.ts:35

Bot name for streaming events


conversationKey?

optional conversationKey?: string

Defined in: packages/core/src/utils/tool-loop.ts:19

Key in state where conversation history is stored (default: 'conversationHistory')


onToolExecuted?

optional onToolExecuted?: (toolName, args, result, ctx) => void

Defined in: packages/core/src/utils/tool-loop.ts:31

Custom callback after tool execution

Parameters

toolName

string

args

any

result

any

ctx

LoopContext

Returns

void


processOptions?

optional processOptions?: ProcessOptions

Defined in: packages/core/src/utils/tool-loop.ts:33

ProcessOptions for streaming events


toolCallValue?

optional toolCallValue?: string

Defined in: packages/core/src/utils/tool-loop.ts:25

Value that indicates a tool call (default: 'tool_call')


toolNameField?

optional toolNameField?: string

Defined in: packages/core/src/utils/tool-loop.ts:27

Field in bot response that contains tool name (default: 'tool_name')


turnsKey?

optional turnsKey?: string

Defined in: packages/core/src/utils/tool-loop.ts:21

Key in state where tool execution results are stored (default: 'turns')


typeField?

optional typeField?: string

Defined in: packages/core/src/utils/tool-loop.ts:23

Field in bot response that indicates tool call (default: 'type')