Skip to content

Remote Code Mode Toolset

Similar to Code Mode, but the generated code runs in an execution environment (Docker, E2B, Modal, ...).

Basic Usage

agents:
  remote_coder:
    model: openai:gpt-5-mini
    tools:
      - type: remote_code_mode
        environment:
          type: docker
        toolsets:
          - type: file_access
            fs: "file:///workspace"

The wrapped tools are served over HTTP on localhost; the code calls them through generated client functions that agentpool puts in front of it. The server answers only requests carrying its random bearer token, which those functions send, so other local processes can't call the tools.

Configuration Reference

RemoteCodeModeToolsetConfig

Configuration for code mode tools.

RemoteCodeModeToolsetConfig (YAML)
1
2
3
4
5
6
tools:
- type: remote_code_mode
  environment: a
  toolsets:
  - a
  namespace: null