Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84913d9

Browse files
committed
added examples of how to integrate CLI into workspace
1 parent97d3f23 commit84913d9

File tree

1 file changed

+93
-4
lines changed

1 file changed

+93
-4
lines changed

‎docs/ai-coder/agent-boundary.md‎

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Agent Boundaries are process-level firewalls that restrict and audit what autonomous programs, such as AI agents, can access and use.
44

5+
56
[insert screenshot here]
67

78

@@ -12,19 +13,107 @@ The easiest way to use Agent Boundaries is through existing Coder modules, such
1213
1314
#Supported Agents
1415

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.
1617

1718
#Features
1819

1920
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
2325

2426
#Architecture
2527

2628
#Getting Started with Boundary
2729

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+
2836
##Option 1) Apply Boundary through Coder modules
2937

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+
3040
##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:
49+
50+
`curl -fsSL https://raw.githubusercontent.com/coder/boundary/main/install.sh | bash`
51+
52+
2. Use the included`Makefile` to build your project. Here are a few example commands:
53+
54+
```
55+
make build # Build for current platform
56+
make build-all # Build for all platforms
57+
make test # Run tests
58+
make test-coverage # Run tests with coverage
59+
make clean # Clean build artifacts
60+
make fmt # Format code
61+
make lint # Lint code
62+
```
63+
64+
3. Wrap the tool you want to guard. Below are some examples of usage:
65+
66+
```
67+
# Allow only requests to github.com
68+
boundary --allow "github.com" -- curl https://github.com
69+
70+
# 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:
87+
88+
`curl -fsSL https://raw.githubusercontent.com/coder/boundary/main/install.sh | bash`
89+
90+
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.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp