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
protected executeTool(
options,
toolUseBlock,
invocationState): AsyncGenerator<AgentStreamEvent, ToolResultBlock, undefined>;

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

ParameterType
optionsToolExecutorOptions
toolUseBlockToolUseBlock
invocationStateInvocationState

AsyncGenerator<AgentStreamEvent, ToolResultBlock, undefined>

ToolExecutor.executeTool

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

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

ParameterType
optionsToolExecutorOptions
assistantMessageMessage
completedToolResultsReadonlyMap<string, ToolResultBlock>

void

ToolExecutor._storePendingToolExecution