spring-projects / spring-projects/spring-ai
Parallel Tool Execution
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.
Expected Behavior
The DefaultToolCallingManager should process tool calls in parallel rather than sequentially when multiple independent tool calls are present in an AssistantMessage. This would significantly improve performance for scenarios requiring multiple concurrent AI tool interactions.
Current Behavior
The DefaultToolCallingManager processes tool calls sequentially using a simple for-loop:
for (AssistantMessage.ToolCall toolCall : assistantMessage.getToolCalls()) {
// Sequential processing
}
This creates performance bottlenecks when dealing with multiple independent tool calls that could be executed concurrently.
Context
Proposed Solution
- Add parallel execution capability to DefaultToolCallingManager
- Ensure proper error handling and response ordering
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at DefaultToolCallingManager and inspect how it processes AssistantMessage tool calls in its current sequential loop. Trace the existing error-handling and response-assembly paths before deciding how independent calls should run concurrently. Done means independent calls execute in parallel while errors are handled correctly and responses retain the required order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- ai, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100