By default an agent can only call the tools you list in
tools=[...]. If you rely on @tool-decorated callables being auto-discovered from anywhere in the process, opt in with ToolConfig(allow_global_tools=True).ToolConfig.parallel is a deprecated alias for ExecutionConfig.parallel_tool_calls, the single source of truth for running batched LLM tool calls in parallel. Prefer execution=ExecutionConfig(parallel_tool_calls=True). ToolConfig(parallel=True) still works, but do not set both spellings to conflicting values — that raises TypeError.Quick Start
1
Simple Usage
Use
ToolConfig() defaults to get retry protection and safe output limits:2
With Custom Settings
Configure timeout and output limits on
ToolConfig, and enable parallel tool calls with ExecutionConfig:3
With Artifact Storage
How It Works
Configuration Options
ToolConfig SDK Reference
Full parameter reference for ToolConfig
Common Patterns
Pattern 1 — Timeout for slow external APIs
@tool discovery:
Best Practices
Set a timeout for external tool calls
Set a timeout for external tool calls
Any tool that calls an external API or runs a subprocess should have a
timeout. Without one, a hung tool call blocks your agent indefinitely. Start with 30–60 seconds and adjust based on your tool’s expected latency.Enable parallel for independent tools
Enable parallel for independent tools
Use
execution=ExecutionConfig(parallel_tool_calls=True) when your agent commonly calls multiple tools at once and those tools don’t depend on each other’s outputs. This can cut wall-clock time significantly. ExecutionConfig.parallel_tool_calls is the single source of truth; ToolConfig(parallel=True) is a deprecated alias for it.Enable artifacts for large data tools
Enable artifacts for large data tools
If your tools return large datasets (SQL queries, file reads, API responses), set
enable_artifacts=True. This prevents large outputs from filling the LLM context window, which wastes tokens and can cause errors.Keep redact_secrets=True
Keep redact_secrets=True
Leave
redact_secrets=True (the default) to prevent API keys, passwords, and tokens from being stored in artifact files or shown in tool outputs.Keep allow_global_tools=False unless you are a plugin host
Keep allow_global_tools=False unless you are a plugin host
Any module in the process that imports an
@tool-decorated function auto-registers it globally. With allow_global_tools=True, every such tool becomes callable by this agent whether you passed it or not — including unsafe ones from unrelated modules. Only opt in when your agent’s whole point is dynamic dispatch over the registry.Related
Artifact Storage
How artifacts are stored and retrieved
Async Tool Safety
Safe concurrent tool execution
Toolsets
Group and manage tools as sets
Tool Retry Policy
Configure retry behavior for failing tools

