> ## Documentation Index
> Fetch the complete documentation index at: https://mux.coder.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Runtimes
> Configure where and how Mux executes agent workspaces
Runtimes determine where and how Mux executes agent workspaces.
| Runtime | Isolation | Best For |
| ------------------------------------------ | ------------------------------------------ | ------------------------------------------- |
| **[Local](/runtime/local)** | All workspaces share the project directory | Quick edits to your working copy |
| **[Worktree](/runtime/worktree)** | Each workspace gets its own directory | Running multiple agents in parallel |
| **[SSH](/runtime/ssh)** | Remote execution over SSH | Security, performance, heavy parallelism |
| **[Docker](/runtime/docker)** | Isolated container per workspace | Full isolation, reproducible environments |
| **[Dev Container](/runtime/devcontainer)** | Container from devcontainer.json | Projects with existing devcontainer configs |
## Choosing a Runtime
Choose a runtime when creating a workspace.
## Init Hooks
[Init hooks](/hooks/init) and agent bash tool executions can detect the runtime type via the `MUX_RUNTIME` environment variable:
* `local` — Local runtime
* `worktree` — Worktree runtime
* `ssh` — SSH runtime
* `docker` — Docker runtime
* `devcontainer` — Dev Container runtime
This lets your init hook adapt behavior, e.g., skip worktree-specific setup when running in local mode.