Skip to content

Built-in tools are native tools provided by LLM providers that can be used to enhance your agent's capabilities. They are executed directly by the model provider.

Overview

AgentPool supports the following PydanticAI built-in tools:

  • Web Search: Search the web using various providers
  • Code Execution: Execute code in a sandboxed environment
  • URL Context: Fetch and process content from URLs
  • Image Generation: Generate images using AI models
  • Memory: Persistent memory storage for agents
  • MCP Server: Connect to MCP server tools

These tools integrate seamlessly with the agent's capability system and can be configured with provider-specific options.

Configuration Reference

Web Search Tool

Configuration for PydanticAI web search builtin tool.

Web Search Tool (YAML)
- type: web_search
  search_context_size: medium  # The search context size parameter controls how much context is retrieved.
  user_location: null  # User location for localizing search results (city, country, region, timezone).
  blocked_domains: null  # Domains that will never appear in results.
  allowed_domains: null  # Only these domains will be included in results.
  max_uses: null  # Maximum number of times the tool can be used.
  name: null  # Optional override for the tool name.
  description: null  # Optional override for the tool description.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.

Code Execution Tool

Configuration for PydanticAI code execution builtin tool.

Code Execution Tool (YAML)
1
2
3
4
5
6
7
- type: code_execution
  name: null  # Optional override for the tool name.
  description: null  # Optional override for the tool description.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.

Url Context Tool

Configuration for PydanticAI URL context builtin tool.

Url Context Tool (YAML)
1
2
3
4
5
6
7
- type: web_fetch
  name: null  # Optional override for the tool name.
  description: null  # Optional override for the tool description.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.

Image Generation Tool

Configuration for PydanticAI image generation builtin tool.

Image Generation Tool (YAML)
- type: image_generation
  background: auto  # Background type for the generated image.
  input_fidelity: null  # Control how much effort the model will exert to match input image features.
  moderation: auto  # Moderation level for the generated image.
  output_compression: 100  # Compression level for the output image.
  output_format: null  # The output format of the generated image.
  partial_images: 0  # Number of partial images to generate in streaming mode.
  quality: auto  # The quality of the generated image.
  size: auto  # The size of the generated image.
  name: null  # Optional override for the tool name.
  description: null  # Optional override for the tool description.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.

Memory Tool

Configuration for PydanticAI memory builtin tool.

Memory Tool (YAML)
1
2
3
4
5
6
7
- type: memory
  name: null  # Optional override for the tool name.
  description: null  # Optional override for the tool description.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.

MCP Server Tool

Configuration for PydanticAI MCP server builtin tool.

MCP Server Tool (YAML)
- type: mcp_server
  server_id: my_mcp_server
  url: https://api.example.com/mcp  # The URL of the MCP server to use.
  authorization_token: null  # Authorization header to use when making requests to the MCP server.
  description: null  # A description of the MCP server.
  allowed_tools: null  # A list of tools that the MCP server can use.
  headers: null  # Optional HTTP headers to send to the MCP server.
  name: null  # Optional override for the tool name.
  enabled: true  # Whether this tool is initially enabled.
  requires_confirmation: false  # Whether tool execution needs confirmation.
  metadata: {}  # Additional tool metadata.
  hints: null  # Hints for tool execution.