> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox Config • AI Agent SDK

> SandboxConfig: Configuration for sandbox execution.

# SandboxConfig

> Defined in the [**config**](../modules/config) module.

<Badge color="blue">AI Agent</Badge>

Configuration for sandbox execution.

Attributes:
sandbox\_type: Type of sandbox (docker, subprocess, e2b)
image: Docker image to use (for docker sandbox)
working\_dir: Working directory within sandbox
env: Environment variables
resource\_limits: Resource limits
security\_policy: Security policy
auto\_cleanup: Whether to auto-cleanup after execution
persist\_files: Whether to persist files between executions
mount\_paths: Paths to mount into sandbox (host:container)
metadata: Additional configuration

## Properties

<ResponseField name="sandbox_type" type="str">
  No description available.
</ResponseField>

<ResponseField name="image" type="str">
  No description available.
</ResponseField>

<ResponseField name="working_dir" type="str">
  No description available.
</ResponseField>

<ResponseField name="env" type="Dict">
  No description available.
</ResponseField>

<ResponseField name="resource_limits" type="ResourceLimits">
  No description available.
</ResponseField>

<ResponseField name="security_policy" type="SecurityPolicy">
  No description available.
</ResponseField>

<ResponseField name="auto_cleanup" type="bool">
  No description available.
</ResponseField>

<ResponseField name="persist_files" type="bool">
  No description available.
</ResponseField>

<ResponseField name="mount_paths" type="List">
  No description available.
</ResponseField>

<ResponseField name="metadata" type="Dict">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="docker()" icon="function" href="../functions/SandboxConfig-docker">
    Create a Docker sandbox configuration.
  </Card>

  <Card title="subprocess()" icon="function" href="../functions/SandboxConfig-subprocess">
    Create a subprocess sandbox configuration.
  </Card>

  <Card title="e2b()" icon="function" href="../functions/SandboxConfig-e2b">
    Create an E2B sandbox configuration.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/sandbox/config.py#L92">
  `praisonaiagents/sandbox/config.py` at line 92
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/configuration/agent-config" />

  <Card title="Sandbox Feature" icon="box" href="/docs/features/sandbox" />
</CardGroup>
