native • AI Agent SDK
native: Create an OS-native sandbox configuration.
native
Method
</div>
This is a method of the SandboxConfig class in the config module.
Create an OS-native sandbox configuration.
Uses platform-specific sandboxing:
- macOS: Seatbelt (sandbox-exec)
- Linux: Landlock + bubblewrap
- Fallback: subprocess with restricted security policy
Signature
def native(writable_paths: List[str], network: bool) -> 'SandboxConfig'Parameters
ParamField
List[str]Directories the agent may write to. Defaults to current directory only.
ParamField
boolWhether to allow network access. Defaults to False.
Returns
ResponseField
'SandboxConfig':
sandbox = SandboxConfig.native( writable_paths=[“./src”, “./tests”], network=False, )
Uses
os.getcwdabspathclsSecurityPolicy
Source
View on GitHubpraisonaiagents/sandbox/config.py at line 181