SRTExecutionEnvironmentConfig
Base classes¶
⋔ Inheritance diagram¶
graph TD
724606211["configs.SRTExecutionEnvironmentConfig"]
2844377061["configs.BaseExecutionEnvironmentConfig"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
2844377061 --> 724606211
330168112 --> 2844377061
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: BaseExecutionEnvironmentConfig
Sandboxed execution environment using Anthropic's sandbox-runtime.
Executes code locally with OS-level sandboxing for network and filesystem restrictions.
Requires srt CLI: npm install -g @anthropic-ai/sandbox-runtime
dependencies are installed with pip install outside the sandbox (they come from
this configuration, not from the sandboxed code).
Source code in src/exxec_config/configs.py
executable
class-attribute
instance-attribute
¶
executable: str | None = Field(
default=None, title="Executable", examples=["/usr/bin/python3", "python3.13"]
)
Executable to use (auto-detect if None).
language
class-attribute
instance-attribute
¶
language: Language = Field(
default="python", title="Programming Language", examples=["python", "javascript", "typescript"]
)
Programming language to use.
sandbox
class-attribute
instance-attribute
¶
sandbox: SandboxConfig = Field(default_factory=SandboxConfig)
Sandbox restrictions configuration.
get_provider
¶
get_provider(
lifespan_handler: AbstractAsyncContextManager[ServerInfo] | None = None,
) -> SRTExecutionEnvironment
Create sandboxed execution environment instance.