Skip to content

Built-in tools are pre-configured tools provided by PydanticAI that offer common functionality like web search, code execution, and image generation.

Overview

LLMling-Agent 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: url_context
  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.

Usage Notes

  • Built-in tools require specific API keys or credentials depending on the provider
  • Tools can be restricted using the agent's capability system
  • Some tools (like code execution) may require additional security considerations
  • Memory tools persist data across agent runs
  • MCP Server tools allow integration with external MCP servers