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
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