generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
area:toolsItems associated with tools.Items associated with tools.
Description
Summary
Configure tool calls to run either sequentially or concurrently when a model returns multiple tool calls.
Usage
⚠️ Agent-generated example - This is a preliminary API sketch and has not been finalized.
import { Agent } from '@strands-agents/sdk'
import { SequentialExecutor, ConcurrentExecutor } from '@strands-agents/sdk/tools'
// Sequential execution (default, safer)
const sequentialAgent = new Agent({
model,
tools: [tool1, tool2],
toolExecutor: new SequentialExecutor(),
})
// Concurrent execution (faster for independent tools)
const concurrentAgent = new Agent({
model,
tools: [tool1, tool2],
toolExecutor: new ConcurrentExecutor({
maxConcurrency: 5,
}),
})Documentation
https://strandsagents.com/latest/documentation/docs/user-guide/concepts/tools/executors/
Reference
https://github.com/strands-agents/sdk-python/tree/main/src/strands/tools/executors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:toolsItems associated with tools.Items associated with tools.