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- 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.
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.
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.
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.
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.
Only the hosts you list.
Cilium FQDN rules, or a standard NetworkPolicy fallback that fails closed and says so.
A ceiling on every day.
The gateway holds the provider keys, allows only the models you name and refuses calls once the day's budget is spent.
Risky tools wait for a yes.
merge_pull_request on githubDecide in Slack or with kubectl leash approve. Signed, final and on record.
Short-lived, least privilege.
paths secret/data/agents/claude/*
ttl 15m
One Vault role, policy and entity per agent, disabled the moment it's frozen.
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.
- You declareAn AgentPolicy and, if you use Vault, an AgentIdentity, next to the agent's Deployment in Git.
- The operator enforcesIt writes the network policy, the Vault role and entity, and flags anything that widens them.
- The gateway checksEvery model and MCP call: which agent, which model, how much budget, which tool, does it need a human.
- 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 }
apiVersion: leash.simplyzee.dev/v1alpha1 kind: AgentIdentity metadata: { name: claude-agent, namespace: agents } spec: serviceAccountName: claude-agent policyRef: { name: claude-agent } vault: ttl: 15m secretPaths: - secret/data/agents/claude/* - database/creds/claude-agent revokeOnFreeze: - database/creds/claude-agent
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
helm install leash oci://ghcr.io/simplyzee/charts/leash \ -n leash-system --create-namespace
kubectl apply -f \ https://github.com/simplyzee/leash/releases/latest/download/install.yaml
git clone https://github.com/simplyzee/leash && cd leash ./hack/demo/up.sh # kind, Cilium, Vault and a leashed agent ./hack/demo/run.sh # walks through every guardrail
kubectl krew install leash kubectl leash status -A
Cloud native, the boring way. On purpose.
Roadmap
Built in the open, headed for v1.0.
- Shipped · v0.1 to v0.4The guardrailsEgress, kill switch, gateway and budgets, approvals, Vault, audit, kubectl plugin, HA gateway.
- Now · v0.5Adoption and trustThis website and docs, Krew, signed releases and SBOMs, EKS, GKE and AKS.
- Next · v0.6 to v0.8Deeper guardrailsTool argument rules, rate limits, cost budgets, redaction, more providers, tracing.
- 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…".