Skip to content

ConcurrentToolExecutor

Defined in: src/tools/executors/concurrent.ts:28

Executes tool calls concurrently.

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

ConcurrentToolExecutor

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