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

# Apple Container

> Run captured programs in containers under Apple's container tool on macOS.

What to install and a runnable Python example. The settings, how the workspace connects and the notes are on [Apple Container](https://docs.mirage.strukto.ai/home/setup/machine/apple_container.md), shared by both SDKs.

## Usage

`captures` defaults to [`@external`](https://docs.mirage.strukto.ai/home/setup/machine/overview#captures):
every program Mirage does not have itself. Name `@python` to run
Python in the container too. For one container per agent, make each
container a machine of its own and send each session to its machine with a
[route](https://docs.mirage.strukto.ai/home/policy/route-machine.md#route-a-line).

```python theme={null}
from mirage import RAMVFS, MountMode, Workspace

ws = Workspace(
    {"/data": RAMVFS()},
    mode=MountMode.EXEC,
    machines={"box": {"provider": "apple_container", "container": "my-sandbox", "captures": ["@python", "@external"]}},
)
await ws.shell("python3 -c 'print(1 + 1)'")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.