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
Copy file name to clipboardExpand all lines: docs/ai-coder/agent-boundary.md
+93-4Lines changed: 93 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
Agent Boundaries are process-level firewalls that restrict and audit what autonomous programs, such as AI agents, can access and use.
4
4
5
+
5
6
[insert screenshot here]
6
7
7
8
@@ -12,19 +13,107 @@ The easiest way to use Agent Boundaries is through existing Coder modules, such
12
13
13
14
#Supported Agents
14
15
15
-
Coder Boundary supports the securing of any terminal-based agent, including your own custom agents.
16
+
Coder Boundary supports the securing of any terminal-based agent, including your own custom agents.
16
17
17
18
#Features
18
19
19
20
Boundaries extend Coder's trusted workspaces with a defense-in-depth model that detects and prevents destructive actions without reducing productivity by slowing down workflows or blocking automation. They offer the following features:
20
-
- Policy-driven access controls: limit what an agent can access (repos, registries, APIs, files, commands)
21
-
- Network policy enforcement: block domains, subnets, or HTTP verbs to prevent exfiltration
22
-
- Audit-ready: centralize logs, exportable for compliance, with full visibility into agent actions
21
+
22
+
-_Policy-driven access controls_: limit what an agent can access (repos, registries, APIs, files, commands)
23
+
-_Network policy enforcement_: block domains, subnets, or HTTP verbs to prevent exfiltration
24
+
-_Audit-ready_: centralize logs, exportable for compliance, with full visibility into agent actions
23
25
24
26
#Architecture
25
27
26
28
#Getting Started with Boundary
27
29
30
+
There are two ways to use Agent Boundaries in your project.
31
+
32
+
Users of Coder Premium can enable Agent Boundaries simply by updating to the latest versions of their preferred coding agent modules, which integrate with Coder with just a few lines of Terraform. Once configured by platform admins, developers get agent-ready environments automatically - no extra setup required.
33
+
34
+
All other users can use Agent Boundaries through its[open source CLI](https://github.com/coder/boundary), which can be run to wrap any process or invoked through rules in a YAML file.
35
+
28
36
##Option 1) Apply Boundary through Coder modules
29
37
38
+
This option is available to Coder Premium users. It is the easiest way to use Agent Boundaries and offers centralized policy management with strong isolation.
39
+
30
40
##Option 2) Wrap the agent process with the Boundary CLI
41
+
42
+
Users can also run Boundary directly in your workspace and configure it per template or per script. While free tier users won't get centralized policy management or the deeper, "strong isolation," they can still enforce per workspace network rules and log decisions locally.
43
+
44
+
There are two ways to integrate the open source Boundary CLI into a workspace.
45
+
46
+
###Wrap a command inline with flags
47
+
48
+
1. Install the[binary](https://github.com/coder/boundary) into the workspace image or at start-up. You can do so with the following command:
# Allow full access to GitHub issues API, but only GET/HEAD elsewhere on GitHub
71
+
boundary \
72
+
--allow "github.com/api/issues/*" \
73
+
--allow "GET,HEAD github.com" \
74
+
-- npm install
75
+
76
+
# Default deny-all: everything is blocked unless explicitly allowed
77
+
boundary -- curl https://example.com
78
+
```
79
+
80
+
Additional information, such as Allow Rules, can be found in the [repository README](https://github.com/coder/boundary).
81
+
82
+
### Use a config file (YAML) to set rules
83
+
84
+
Another option is to define rules in a YAML file, which only needs to be invoked once as opposed to through flags with each command.
85
+
86
+
1. Similarly to the previous method, install the [binary](https://github.com/coder/boundary) into the workspace image or at start-up. You can do so with the following command:
2. Use the included `Makefile` to build your project. Here are a few example commands:
91
+
92
+
```
93
+
make build # Build for current platform
94
+
make build-all # Build for all platforms
95
+
make test # Run tests
96
+
make test-coverage # Run tests with coverage
97
+
make clean # Clean build artifacts
98
+
make fmt # Format code
99
+
make lint # Lint code
100
+
```
101
+
3. Create a YAML file to store rules that will be applied to all `boundary` commands run in the Workspace. In this example, we call it `boundary.yaml`.
102
+
103
+
A config example can be seen below:
104
+
105
+
```
106
+
allow:
107
+
108
+
- domain: [github.com](http://github.com)
109
+
110
+
path: /api/issues/*
111
+
112
+
- domain: [github.com](http://github.com)
113
+
114
+
methods: [GET, HEAD]
115
+
```
116
+
4. Run a `boundary` command. For example:
117
+
`boundary run --config ./boundary.yaml -- claude`
118
+
119
+
You will notice that the rules are automatically applied without any need for additional customization.