docs: add parallel tool calling docs (#5876)

* docs: add parallel tool calling docs

* docs: forgot the yaml

* fix: update
This commit is contained in:
Charles Packer
2025-10-30 23:06:54 -07:00
committed by Caren Thomas
parent cfeed463a9
commit 95f5d12b9f
2 changed files with 104 additions and 0 deletions

View File

@@ -152,6 +152,8 @@ navigation:
path: pages/agents/fetch_webpage.mdx
- page: Custom Tools
path: pages/agents/custom_tools.mdx
- page: Parallel Tool Calling
path: pages/agents/parallel_tool_calling.mdx
- page: Tool Rules
path: pages/agents/tool_rules.mdx
- page: Tool Variables

View File

@@ -0,0 +1,102 @@
---
title: Parallel Tool Calling
slug: guides/agents/parallel-tool-calling
---
When an agent calls multiple tools, Letta can execute them concurrently instead of sequentially.
Parallel tool calling has two configuration levels:
- **Agent LLM config**: Controls whether the LLM can request multiple tool calls at once
- **Individual tool settings**: Controls whether requested tools actually execute in parallel or sequentially
## Model Support
Parallel tool calling is supported for OpenAI and Anthropic models.
## Enabling Parallel Tool Calling
### Agent Configuration
Set `parallel_tool_calls: true` in the agent's LLM config:
<CodeGroup>
```typescript TypeScript
const agent = await client.agents.create({
llm_config: {
model: "anthropic/claude-sonnet-4-20250514",
parallel_tool_calls: true
}
});
```
```python Python
agent = client.agents.create(
llm_config={
"model": "anthropic/claude-sonnet-4-20250514",
"parallel_tool_calls": True
}
)
```
</CodeGroup>
### Tool Configuration
Individual tools must opt-in to parallel execution:
<CodeGroup>
```typescript TypeScript
await client.tools.update(toolId, {
enable_parallel_execution: true
});
```
```python Python
client.tools.update(
tool_id=tool_id,
enable_parallel_execution=True
)
```
</CodeGroup>
By default, tools execute sequentially (`enable_parallel_execution=False`).
<Warning>
Only enable parallel execution for tools safe to run concurrently. Tools that modify shared state or have ordering dependencies should remain sequential.
</Warning>
## ADE Configuration
### Agent Toggle
1. Open **Settings** → **LLM Config**
2. Enable **"Parallel tool calls"**
### Tool Toggle
1. Open the **Tools** panel
2. Click a tool to open it
3. Go to the **Settings** tab
4. Enable **"Enable parallel execution"**
## Execution Behavior
When the agent calls multiple tools:
- Sequential tools execute one-by-one
- Parallel-enabled tools execute concurrently
- Mixed: sequential tools complete first, then parallel tools execute together
Example:
```
Agent calls:
- search_web (parallel: true)
- search_database (parallel: true)
- send_message (parallel: false)
Execution:
1. send_message executes
2. search_web AND search_database execute concurrently
```
## Limitations
- Parallel execution is automatically disabled when [tool rules](/guides/agents/tool-rules) are configured
- Only enable for tools safe to run concurrently (e.g., read-only operations)
- Tools that modify shared state should remain sequential