You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/builtin-tools.md
+27-28Lines changed: 27 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Builtin Tools
2
2
3
-
Builtin tools are native tools provided by LLM providers that can be used to enhance your agent's capabilities. Unlike [common tools](common-tools.md), which are custom implementations that PydanticAI executes, builtin tools are executed directly by the model provider.
3
+
Builtin tools are native tools provided by LLM providers that can be used to enhance your agent's capabilities. Unlike [common tools](common-tools.md), which are custom implementations that Pydantic AI executes, builtin tools are executed directly by the model provider.
4
4
5
5
## Overview
6
6
7
-
PydanticAI supports the following builtin tools:
7
+
Pydantic AI supports the following builtin tools:
8
8
9
9
-**[`WebSearchTool`][pydantic_ai.builtin_tools.WebSearchTool]**: Allows agents to search the web
10
10
-**[`CodeExecutionTool`][pydantic_ai.builtin_tools.CodeExecutionTool]**: Enables agents to execute code in a secure environment
@@ -13,7 +13,9 @@ PydanticAI supports the following builtin tools:
13
13
These tools are passed to the agent via the `builtin_tools` parameter and are executed by the model provider's infrastructure.
14
14
15
15
!!! warning "Provider Support"
16
-
Not all model providers support builtin tools. If you use a builtin tool with an unsupported provider, PydanticAI will raise a [`UserError`][pydantic_ai.exceptions.UserError] when you try to run the agent.
16
+
Not all model providers support builtin tools. If you use a builtin tool with an unsupported provider, Pydantic AI will raise a [`UserError`][pydantic_ai.exceptions.UserError] when you try to run the agent.
17
+
18
+
If a provider supports a built-in tool that is not currently supported by Pydantic AI, please file an issue.
17
19
18
20
## Web Search Tool
19
21
@@ -26,16 +28,13 @@ making it ideal for queries that require up-to-date data.
26
28
|----------|-----------|-------|
27
29
| OpenAI | ✅ | Full feature support |
28
30
| Anthropic | ✅ | Full feature support |
29
-
| Groq | ✅ | Limited parameter support |
30
-
| Google | ✅ | No parameter support |
31
+
| Groq | ✅ | Limited parameter support. To use web search capabilities with Groq, you need to use the [compound models](https://console.groq.com/docs/compound).|
32
+
| Google | ✅ | No parameter support. Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead.|
31
33
| Bedrock | ❌ | Not supported |
32
34
| Mistral | ❌ | Not supported |
33
35
| Cohere | ❌ | Not supported |
34
36
| HuggingFace | ❌ | Not supported |
35
37
36
-
!!! note "Groq Support"
37
-
To use web search capabilities with Groq, you need to use the [compound models](https://console.groq.com/docs/compound).
38
-
39
38
### Usage
40
39
41
40
```py title="web_search_basic.py"
@@ -97,16 +96,16 @@ in a secure environment, making it perfect for computational tasks, data analysi
97
96
98
97
### Provider Support
99
98
100
-
| Provider | Supported |
101
-
|----------|-----------|
102
-
| OpenAI | ✅ |
103
-
| Anthropic | ✅ |
104
-
| Google | ✅ |
105
-
| Groq | ❌ |
106
-
| Bedrock | ❌ |
107
-
| Mistral | ❌ |
108
-
| Cohere | ❌ |
109
-
| HuggingFace | ❌ |
99
+
| Provider | Supported | Notes |
100
+
|----------|-----------|-------|
101
+
| OpenAI | ✅ ||
102
+
| Anthropic | ✅ | Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead. |
103
+
| Google | ✅ ||
104
+
| Groq | ❌ ||
105
+
| Bedrock | ❌ ||
106
+
| Mistral | ❌ ||
107
+
| Cohere | ❌ ||
108
+
| HuggingFace | ❌ ||
110
109
111
110
### Usage
112
111
@@ -126,16 +125,16 @@ allowing it to pull up-to-date information from the web.
126
125
127
126
### Provider Support
128
127
129
-
| Provider | Supported |
130
-
|----------|-----------|
131
-
| Google | ✅ |
132
-
| OpenAI | ❌ |
133
-
| Anthropic | ❌ |
134
-
| Groq | ❌ |
135
-
| Bedrock | ❌ |
136
-
| Mistral | ❌ |
137
-
| Cohere | ❌ |
138
-
| HuggingFace | ❌ |
128
+
| Provider | Supported | Notes |
129
+
|----------|-----------|-------|
130
+
| Google | ✅ | Google does not support using built-in tools and user tools (including [output tools](output.md#tool-output)) at the same time. To use structured output, use [`PromptedOutput`](output.md#prompted-output) instead. |
0 commit comments