You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[42,000 live credentials leaked](https://www.wired.com/story/ai-agent-credential-leaks/) from AI agent workflows. The community's response? Buy a separate Mac Mini. **leashed replaces the Mac Mini** — software governance instead of hardware isolation.
24
-
25
20
## Quick Start
26
21
27
22
You need an [AnchorBrowser](https://anchorbrowser.io) API key: `export ANCHOR_API_KEY=your-key`
@@ -37,7 +32,7 @@ npm install leashed
37
32
Create `leash.yaml`:
38
33
39
34
```yaml
40
-
agent: my-openclaw-sales-bot
35
+
agent: my-sales-bot
41
36
rules:
42
37
allow:
43
38
- "read*"
@@ -68,223 +63,86 @@ const result2 = await leash.task('export all contacts to CSV')
That's it. Every `leash.task()` call is policy-checked, audited, and budgeted.
72
-
73
-
## Common Use Cases
74
-
75
-
People give agents their passwords every day. Here's what they're afraid of — and how `leashed` fixes it.
76
-
77
-
### 1. LinkedIn Sales Agent (OpenClaw)
78
-
79
-
**The fear:** Your bot has your LinkedIn password. It's supposed to read your inbox and check messages. But what if it starts mass-connecting, exporting contacts, or changing your profile?
80
-
81
-
**With leashed:**
82
-
83
-
```yaml
84
-
agent: linkedin-sales-bot
85
-
rules:
86
-
allow:
87
-
- "read*"
88
-
- "list*"
89
-
- "check*"
90
-
- "search*"
91
-
deny:
92
-
- "*send*"
93
-
- "*connect*"
94
-
- "*export*"
95
-
- "*settings*"
96
-
- "*password*"
97
-
default: deny
98
-
expire_after: 60min
99
-
max_actions: 50
100
-
```
101
-
102
-
Read inbox, check messages — allowed. Mass-connect, export contacts — blocked before it starts.
103
-
104
-
### 2. Email & Calendar Assistant
105
-
106
-
**The fear:** Your assistant has your Gmail. It reads your calendar and summarizes emails. But what if it deletes messages, forwards sensitive emails externally, or changes your billing settings?
107
-
108
-
**With leashed:**
109
-
110
-
```yaml
111
-
agent: daily-briefing
112
-
rules:
113
-
allow:
114
-
- "read*"
115
-
- "list*"
116
-
- "check*"
117
-
- "summarize*"
118
-
deny:
119
-
- "*delete*"
120
-
- "*forward*"
121
-
- "*billing*"
122
-
- "*settings*"
123
-
- "*password*"
124
-
default: deny
125
-
expire_after: 30min
126
-
max_actions: 100
127
-
```
128
-
129
-
Read calendar, list emails, summarize threads — allowed. Delete, forward, change settings — blocked.
130
-
131
-
### 3. CRM Data Entry Bot
66
+
Every `leash.task()` call is policy-checked, audited, and budgeted.
132
67
133
-
**The fear:** Your bot updates Salesforce records from your email threads. But what if it bulk-deletes contacts, exports your pipeline, or modifies deal values?
Think of a crane operator. The brain decides what to move — but the joystick decides how far the arm can reach. **leashed is the joystick between the AI agent and your accounts.**
163
-
164
-
### Without leashed
165
-
166
-
```mermaid
167
-
flowchart LR
168
-
A["🤖 AI Agent<br/><i>the brain</i>"]
169
-
B["📧 Your Accounts<br/><i>LinkedIn, Gmail, CRM</i>"]
170
-
171
-
A -- "🔴 your password<br/>full access" --> B
172
-
173
-
style A fill:#fef2f2,stroke:#fca5a5,color:#991b1b
174
-
style B fill:#fef2f2,stroke:#fca5a5,color:#991b1b
175
-
```
176
-
177
-
> **The agent IS you.** Full access. No limits. No off switch.
178
-
179
-
### With leashed
180
-
181
-
```mermaid
182
-
flowchart LR
183
-
A["🤖 AI Agent<br/><i>the brain</i>"]
184
-
S["🛡️ leashed<br/><i>the joystick</i>"]
185
-
B["📧 Your Accounts<br/><i>LinkedIn, Gmail, CRM</i>"]
186
-
187
-
A -- "requests action" --> S
188
-
S -- "🟢 scoped access" --> B
189
-
190
-
style A fill:#f0fdf4,stroke:#86efac,color:#166534
191
-
style S fill:#ede9fc,stroke:#6d5bd0,color:#6d5bd0
192
-
style B fill:#f0fdf4,stroke:#86efac,color:#166534
193
-
```
194
-
195
-
> **The agent works through controlled arms.** You decide what moves.
196
-
197
-
| | |
198
-
|---|---|
199
-
| ✅ read inbox | ✅ list messages |
200
-
| ❌ delete data | ❌ export contacts |
201
-
| ⏱️ 60 min limit | 🔢 50 actions max |
202
-
203
-
> *A crane operator doesn't carry the steel himself. He moves joysticks that control arms — limited to a work zone, every movement tracked, with an emergency stop within reach. That's what leashed does for AI agents.*
204
-
205
-
### Three layers of protection
68
+
## How It Works
206
69
207
70
1. **Credential isolation** — your password stays in an isolated cloud browser. The agent gets a pre-authenticated session, never the credentials themselves.
208
71
2. **Scoped boundaries** — tasks that don't match your policy are blocked before they start. Deny-first pattern matching with Unicode bypass protection.
209
72
3. **Audit + kill switch** — every action logged (allowed and blocked). Budget enforced. Session destruction when you're done.
210
73
211
74
## Security Model
212
75
213
-
In security terms, leashed is **application-layer authz for AI agents** — it governs what agents are *authorized to do*, not who they are or what credentials they hold. Think of it like an AWS IAM policy that checks what you *request*, not what the underlying service *executes*.
76
+
leashed is **application-layer authz for AI agents** — it governs what agents are *authorized to do*, not who they are or what credentials they hold.
| Browser action validation | Roadmap (v1.0) | AnchorBrowser executes tasks autonomously — leashed has no visibility into actual browser clicks/navigation |
231
-
| URL/domain restrictions | Roadmap (v1.0) | Requires AnchorBrowser session-level allowlists (not yet available in their SDK) |
232
-
| Semantic equivalence | By design | `"forward email"` and `"send email to myself"` are different strings — glob patterns match literally, not semantically |
91
+
| Layer | Why |
92
+
|-------|-----|
93
+
| Browser action validation | AnchorBrowser executes tasks autonomously — leashed gates the request, not the execution |
| Semantic equivalence | `"forward email"` and `"send email to myself"` are different strings — patterns match literally |
233
96
234
-
### The honest version
97
+
**The honest version:** leashed is a seatbelt, not a cage. It stops the 95% of accidents from misconfiguration, scope creep, and unintended actions. A deliberately adversarial agent that lies about what it's doing can bypass pattern matching. For defense-in-depth, see [SECURITY.md](./SECURITY.md).
235
98
236
-
The policy engine checks the **task description string** — the human-readable instruction you pass to `leash.task()`. If the string matches a deny pattern, it never reaches the browser. If it's allowed, AnchorBrowser's AI executes it autonomously.
99
+
## CLI
237
100
238
-
This means: a well-intentioned agent that uses descriptive task names gets real governance. A deliberately adversarial agent that lies about what it's doing can bypass pattern matching — just like a developer with an IAM read-only key could name their Lambda "ReadOnlyFunction" while it actually writes to S3.
**leashed is a seatbelt, not a cage.** It stops the 95% of accidents that come from misconfiguration, scope creep, and unintended actions. It does not stop a determined attacker with direct API access.
107
+
## API
241
108
242
-
For defense-in-depth, see [SECURITY.md](./SECURITY.md).
109
+
[Full API reference, policy examples, and audit log format →](./docs/API.md)
- URL allowlists at the session level — the browser itself refuses to navigate outside your policy
265
-
- Browser action audit trail — not just task requests, but actual clicks, form fills, and navigation
130
+
### v1.0 — Session-Level Enforcement
131
+
- URL allowlists enforced at the browser level
132
+
- Browser action audit trail (clicks, form fills, navigation)
266
133
- Webhook callbacks for real-time policy violation alerts
267
-
- This is the "IAM enforcement" layer — restrictions enforced by the infrastructure, not just the intent
268
134
269
-
Want to help shape v1.0? [Open an issue](https://github.com/dormstern/leashed/issues) or reach out.
135
+
[Open an issue](https://github.com/dormstern/leashed/issues) or see [CONTRIBUTING.md](./CONTRIBUTING.md) to help shape v1.0.
270
136
271
137
## Empowered by AnchorBrowser
272
138
273
-
leashed runs on [AnchorBrowser](https://anchorbrowser.io) — ephemeral, hardened cloud browser sessions purpose-built for AI agents. Each session is isolated, auto-expires, and leaves no trace. [Cloudflare](https://cloudflare.com) verified bot partner. SOC2 Type 2 and ISO27001 certified. Trusted by [Google](https://google.com), [Coinbase](https://coinbase.com), and [Composio](https://composio.dev). Stealth proxies, CAPTCHA solving, anti-fingerprinting, and full session isolation out of the box.
139
+
leashed runs on [AnchorBrowser](https://anchorbrowser.io) — ephemeral, hardened cloud browser sessions for AI agents. SOC2 Type 2, ISO27001 certified. Trusted by Google, Coinbase, and Groq.
274
140
275
141
AnchorBrowser handles the browser. leashed handles the rules.
276
142
277
-
[Get an API key →](https://anchorbrowser.io)
278
-
279
-
## Why This Exists
280
-
281
-
[Behalf](https://behalf.work) already powers safe delegation for humans — scoped sessions, audit trails, and instant revocation for people who delegate work through their accounts. We built the trust infrastructure, battle-tested it, and realized: **agents need the exact same thing.**
282
-
283
-
42,000 live credentials leaked from AI agent workflows. The community's best workaround is buying a separate Mac Mini. That's not security — that's surrender.
284
-
285
-
So we open-sourced the engine. `leashed` gives agents what they should have had from the start: **a policy file, an audit log, and a kill switch.** The same trust model that protects human delegation — now available for every agent operator.
143
+
## Contributing
286
144
287
-
Half the access. All the work done.
145
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, coding standards, and how to submit changes.
0 commit comments