# Leash

> Open-source tool from StrongDM that wraps AI coding agents in containers, monitors their activity, and enforces Cedar policies.

Leash is an open-source project from StrongDM that runs AI coding agents inside containers, records their filesystem and network activity, and enforces authorization policies written in Cedar. It is a command-line tool that also exposes a local Control UI for observing agent behavior. The latest listed release is v1.1.7, and the project is released under the Apache 2.0 license.

## What It Is

Leash is a security and visibility layer for AI coding agents. You launch an agent such as claude, codex, gemini, qwen, or opencode through the leash command. The agent runs in a container with the current directory bind-mounted, so its tools see the same file tree they would on the host. A separate Leash container monitors system calls, applies Cedar policies, and serves the Control UI at localhost:18080.

## How Monitoring and Policy Enforcement Work

Leash captures every filesystem access and network connection the agent initiates, so policies and audit trails work from complete telemetry. Policies are defined in Cedar and enforced in real time, blocking actions outside the defined boundaries. An MCP observer inspects, records, and enforces Model Context Protocol tool calls, correlating them with filesystem and network telemetry so Cedar policies can govern tool use alongside other runtime activity.

## Setup Path

Leash requires Docker, Podman, or OrbStack on macOS or Linux (including WSL). It installs through npm, Homebrew on macOS, or a pre-built release binary. On first use it prompts about mounting the host agent config directory (for example ~/.claude) and stores the choice in ~/.config/leash/config.toml. It forwards common API keys such as ANTHROPIC_API_KEY and OPENAI_API_KEY automatically. The default coder image can be replaced or extended with custom Docker images, and extra mounts and environment variables can be passed with flags. The homepage describes the same policy model carrying from local development into deployment.

## Features
- Containerized sandboxed execution of AI coding agents
- Cedar policy enforcement in real time
- Full monitoring of filesystem access and network connections
- MCP observer that inspects, records, and enforces MCP tool calls
- Local Control UI for observing agent activity
- Automatic forwarding of common agent API keys
- Custom Docker image support
- Configurable mounts and environment variables
- Audit trails from complete telemetry

## Integrations
Claude, Codex, Gemini, Qwen, OpenCode, Docker, Podman, OrbStack, Model Context Protocol, Cedar, Homebrew, npm

## Platforms
MACOS, LINUX, API, CLI

## Pricing
Open Source

## Version
v1.1.7

## Links
- Website: https://leash.strongdm.ai/
- Documentation: https://github.com/strongdm/leash/tree/main/docs
- Repository: https://github.com/strongdm/leash
- EveryDev.ai: https://www.everydev.ai/tools/leash
