Class SandboxAcquireResult

java.lang.Object
io.agentscope.harness.agent.sandbox.SandboxAcquireResult

public final class SandboxAcquireResult extends Object
Result of acquiring a Sandbox from SandboxManager.

Two ownership modes:

  • self-managed (selfManaged=true): the SDK created the sandbox and is responsible for its full lifecycle — stop() + shutdown() are both called after each agent call.
  • user-managed (selfManaged=false): the caller injected a pre-existing sandbox; the SDK only calls stop() and never calls shutdown().

When a SandboxExecutionGuard is configured, the result also carries the SandboxLease that was acquired before sandbox resume/create. The harness closes it after SandboxManager.release(io.agentscope.harness.agent.sandbox.SandboxAcquireResult) completes to cover the full call window.