Class SandboxClientOptions

java.lang.Object
io.agentscope.harness.agent.sandbox.SandboxClientOptions
Direct Known Subclasses:
DockerSandboxClientOptions

public abstract class SandboxClientOptions extends Object
Base class for sandbox client configuration options.

Each concrete subclass describes a specific sandbox backend (e.g. Docker) and can self-instantiate the corresponding SandboxClient via createClient(). This allows callers to configure only the options object and rely on HarnessAgent.Builder to derive the client automatically.

  • Constructor Details

    • SandboxClientOptions

      public SandboxClientOptions()
  • Method Details

    • getType

      public abstract String getType()
      Returns the type discriminator used in JSON serialization.
      Returns:
      type string (e.g. "docker")
    • createClient

      public abstract SandboxClient<? extends SandboxClientOptions> createClient()
      Creates the SandboxClient implementation that corresponds to these options.

      Called by HarnessAgent.Builder when no explicit client has been provided, so callers only need to configure the options object.

      Returns:
      a new client instance ready for use
    • getWorkspaceRoot

      public String getWorkspaceRoot()
      Returns the absolute workspace root path inside the sandbox container.

      Defaults to /workspace. Concrete subclasses override this when the sandbox backend uses a different root (e.g. AgentRun uses /home/agentscope/workspace).

      Returns:
      workspace root path string