SandboxBase
autogen.beta.tools.sandbox.base.SandboxBase #
Bases: ABC
ABC with default implementations for the optional :class:Sandbox methods.
Concrete backends subclass :class:SandboxBase and override :meth:exec, :attr:workdir, :attr:host_workdir. They opt into streaming and file IO by overriding the relevant methods.
exec abstractmethod async #
put_file async #
remove_file async #
Default cleanup: rm -f inside the sandbox.
Works on any POSIX backend that can exec. Backends with a native delete API (local filesystem, Daytona fs.delete_file) should override for directness. Never raises on a missing file.
Source code in autogen/beta/tools/sandbox/base.py
aclose async #
Default cleanup: nothing.
Backends that hold resources (containers, remote sandboxes) override this method.