CodeEnvironment
autogen.beta.tools.code.environment.base.CodeEnvironment #
Bases: Protocol
Backend that runs source code on behalf of :class:SandboxCodeTool.
Implementations may target a local subprocess, a remote sandbox (Daytona, e2b, …), a container, or anything else — :class:SandboxCodeTool only depends on this protocol.
supported_languages property #
Languages this environment is willing to run.
Surfaced in the tool description so the LLM knows what to ask for.
run async #
Execute code in language.
context is the active conversation context, forwarded by :class:SandboxCodeTool so backends can resolve :class:~autogen.beta.annotations.Variable markers from context.variables (e.g. per-tenant credentials). Backends with no runtime-configurable parameters can ignore it.