Skip to content

Import Tools Toolset

Import arbitrary Python functions as agent tools via import paths.

Basic Usage

agents:
  my_agent:
    toolsets:
      - type: import_tools
        tools:
          - import_path: os.listdir
            name: list_files
            description: "List directory contents"
          - import_path: webbrowser.open
            description: "Open URL in browser"

Tool Configuration

Each tool supports these options:

Field Description
import_path Python import path (e.g., os.listdir, mymodule:func)
name Override the tool name
description Override the tool description
enabled Whether tool is initially enabled (default: true)
requires_confirmation Require user confirmation before execution
metadata Additional metadata dict

Configuration Reference

Import Tools Toolset

Configuration for importing individual functions as tools.

Allows adding arbitrary Python callables as agent tools via import paths.

Import Tools Toolset (YAML)
toolsets:
- type: import_tools
  tools:  # List of tool configurations to import.
  - type: import
    import_path: !!python/name:posix.listdir ''
    name: list_files
    description: null
    enabled: true
    requires_confirmation: false
    metadata: {}
    hints: null
  - type: import
    import_path: !!python/name:webbrowser.open ''
    name: null
    description: Open URL in browser
    enabled: true
    requires_confirmation: false
    metadata: {}
    hints: null
  namespace: null  # Optional namespace prefix for tool names

Use Cases

  • Quick addition of stdlib functions as tools
  • Exposing existing library functions to agents
  • Prototyping before creating a full toolset