Skip to content

SequentialToolExecutor

Defined in: src/tools/executors/sequential.ts:23

Executes tool calls one at a time.

import { Agent, SequentialToolExecutor } from '@strands-agents/sdk'
// The string shorthand keeps imports minimal.
const agent = new Agent({ toolExecutor: 'sequential' })
// Passing an instance is equivalent if you prefer to be explicit.
const explicitAgent = new Agent({ toolExecutor: new SequentialToolExecutor() })
  • ToolExecutor
new SequentialToolExecutor(): SequentialToolExecutor;

SequentialToolExecutor

ToolExecutor.constructor
executeBackground(
options,
toolUse,
tool,
invocationState,
onEvent
): Promise<ToolResultBlock>;

Defined in: src/tools/executors/executor.ts:81

ParameterType
optionsToolExecutorOptions
toolUseToolUseData
toolTool
invocationStateInvocationState
onEvent(event) => Promise<unknown>

Promise<ToolResultBlock>

ToolExecutor.executeBackground

protected executeTool(
options,
toolUseBlock,
invocationState
): AsyncGenerator<AgentStreamEvent, ToolResultBlock, undefined>;

Defined in: src/tools/executors/executor.ts:107

ParameterType
optionsToolExecutorOptions
toolUseBlockToolUseBlock
invocationStateInvocationState

AsyncGenerator<AgentStreamEvent, ToolResultBlock, undefined>

ToolExecutor.executeTool

protected _storePendingToolExecution(
options,
assistantMessage,
completedToolResults
): void;

Defined in: src/tools/executors/executor.ts:238

ParameterType
optionsToolExecutorOptions
assistantMessageMessage
completedToolResultsReadonlyMap<string, ToolResultBlock>

void

ToolExecutor._storePendingToolExecution