Open source · Apache-2.0Kubernetes operator

Put your AI agents on aleash.

Leash decides where your agents can reach, what they can spend and which tools they can run. Risky calls wait for a human. One switch stops everything.

$ helm install leash oci://ghcr.io/simplyzee/charts/leash -n leash-system --create-namespace
claude-agent · Enforced
An agent pod's calls pass through the Leash gateway to allowed services. A call to an unlisted host is stopped at the namespace boundary. When the kill switch is pulled, every call is stopped.namespace: agentsleash-systemclaude-agentpod · no API keysleash-gatewaymodel · budget · toolapi.anthropic.comMCP: githubvaultpastebin.exampleFROZEN · all egress denied
allowed callnot on the allowlistthe leash (network policy)
Works with
  • Kubernetes
  • Cilium
  • HashiCorp Vault
  • Anthropic
  • OpenAI
  • Model Context Protocol
  • Slack
  • Prometheus
  • Grafana
  • Loki
  • Helm
  • Krew

The problem

An agent is a workload that makes its own decisions.

Kubernetes was built for code that does what it was written to do. Agents decide at runtime, so the defaults give them far more than they need.

Without LeashWith Leash

Reach

Open egress by default. One injected prompt and your data is on its way out.

Only the hosts you list. Everything else is dropped at the pod, DNS included.

Without LeashWith Leash

Spend

A provider key in an env var and no ceiling. A loop runs all night.

The gateway holds the keys, allows only your models and stops at the daily token budget.

Without LeashWith Leash

Actions

MCP tools can merge, delete and deploy. Nobody is asked.

Allow, deny or hold every tool. Held calls wait for Approve in Slack or kubectl.

Six guardrails

Everything an agent does goes through a check.

Read the guides →
01 · Kill switch

One field stops everything.

Set frozen: true or run kubectl leash freeze. Egress is cut, the agent's Vault identity is disabled, and optionally its Deployment is scaled to zero and its dynamic credentials revoked.

Use the kill switch →
02 · Egress allowlist

Only the hosts you list.

api.anthropic.comallow
api.github.comallow
everything elsedrop

Cilium FQDN rules, or a standard NetworkPolicy fallback that fails closed and says so.

03 · Models and budgets

A ceiling on every day.

Tokens today (example)1.6M / 2M

The gateway holds the provider keys, allows only the models you name and refuses calls once the day's budget is spent.

04 · Human approval

Risky tools wait for a yes.

Leash · claude-agent wants to call merge_pull_request on github
ApproveDeny

Decide in Slack or with kubectl leash approve. Signed, final and on record.

05 · Scoped Vault credentials

Short-lived, least privilege.

role leash.agents.claude-agent
paths secret/data/agents/claude/*
ttl 15m

One Vault role, policy and entity per agent, disabled the moment it's frozen.

06 · Audit trail

Every decision, on record.

An AgentRun per pod, a JSON line per decision and Prometheus metrics, for Loki and the bundled Grafana dashboard.

Audit trail and dashboards →

How it works

Declare it in YAML. Leash wires up the rest.

  1. You declareAn AgentPolicy and, if you use Vault, an AgentIdentity, next to the agent's Deployment in Git.
  2. The operator enforcesIt writes the network policy, the Vault role and entity, and flags anything that widens them.
  3. The gateway checksEvery model and MCP call: which agent, which model, how much budget, which tool, does it need a human.
  4. Everything is recordedAgentRuns, audit lines and Prometheus metrics, ready for your dashboards and alerts.
apiVersion: leash.simplyzee.dev/v1alpha1
kind: AgentPolicy
metadata: { name: claude-agent, namespace: agents }
spec:
  agentSelector:
    matchLabels: { app: claude-agent }
  egress:
    fqdns:
    - { matchName: api.github.com, ports: [443] }
  models:
    allow: ["claude-sonnet-*"]
    dailyTokenBudget: 2000000
  mcp:
    servers:
    - name: github
      denyTools: ["delete_*"]
      requireApproval: [merge_pull_request]
  frozen: false
  onFreeze: { scaleToZero: true }

Get started

Running in five minutes.

Pick how you install. Cilium and Vault are optional: without them Leash falls back and tells you exactly what it can't enforce.

Full install guide →
helm repo add simplyzee https://charts.simplyzee.dev
helm install leash simplyzee/leash \
  -n leash-system --create-namespace
From charts.simplyzee.dev

Cloud native, the boring way. On purpose.

Kubernetes-nativeCRDs, conditions and events. No extra control plane, database or UI to run.
Fails closedIf a rule can't be enforced, the agent loses access and the policy says why.
No lock-inCilium and Vault are optional. Standard NetworkPolicy works everywhere.
Small enough to auditOne operator, one gateway, Apache-2.0. Read every line that guards your agents.

Roadmap

Built in the open, headed for v1.0.

Follow along on GitHub →
  1. Shipped · v0.1 to v0.4The guardrailsEgress, kill switch, gateway and budgets, approvals, Vault, audit, kubectl plugin, HA gateway.
  2. Now · v0.5Adoption and trustThis website and docs, Krew, signed releases and SBOMs, EKS, GKE and AKS.
  3. Next · v0.6 to v0.8Deeper guardrailsTool argument rules, rate limits, cost budgets, redaction, more providers, tracing.
  4. Later · v1.0Stable and fleet-widev1 API, cluster-wide policies, a web UI, multi-cluster.

Leash is open source. Come build it.

Star the repo, open an issue with an idea or a bug, or pick something off the roadmap. Every guardrail started as somebody's "what if the agent…".