Skip to content

Code Mode Toolset

Wraps other toolsets to enable code-based tool invocation, allowing agents to call tools by generating code.

Basic Usage

agents:
  coder:
    toolsets:
      - type: code_mode
        toolsets:
          - type: file_access
            fs: "file:///workspace"

How It Works

Instead of calling tools directly, the agent generates Python code that invokes the wrapped tools. This enables more complex tool compositions and programmatic control flow.

Configuration Reference

CodeModeToolsetConfig

Configuration for code mode tools.

CodeModeToolsetConfig (YAML)
1
2
3
4
5
toolsets:
- type: code_mode
  toolsets:
  - a
  namespace: null